JP5160260B2 - Vehicle motor control device - Google Patents

Vehicle motor control device Download PDF

Info

Publication number
JP5160260B2
JP5160260B2 JP2008033403A JP2008033403A JP5160260B2 JP 5160260 B2 JP5160260 B2 JP 5160260B2 JP 2008033403 A JP2008033403 A JP 2008033403A JP 2008033403 A JP2008033403 A JP 2008033403A JP 5160260 B2 JP5160260 B2 JP 5160260B2
Authority
JP
Japan
Prior art keywords
correction value
target
duty
motor
motor drive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008033403A
Other languages
Japanese (ja)
Other versions
JP2008259408A (en
Inventor
哲郎 田村
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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems 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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2008033403A priority Critical patent/JP5160260B2/en
Priority to US12/046,831 priority patent/US7768224B2/en
Publication of JP2008259408A publication Critical patent/JP2008259408A/en
Application granted granted Critical
Publication of JP5160260B2 publication Critical patent/JP5160260B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/64Electric machine technologies in electromobility
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/72Electric energy management in electromobility

Landscapes

  • Control Of Electric Motors In General (AREA)

Description

本発明は、モータ駆動回路をPWM制御して車載モータを駆動する車両用モータ制御装置に関する。   The present invention relates to a vehicle motor control device that drives a vehicle-mounted motor by PWM control of a motor drive circuit.

特許文献1に開示されるように、従来から、モータ駆動回路をPWM制御して車載モータを駆動する電動パワーステアリング装置などの車両用モータ制御装置が知られている。
また、特許文献2には、PWM信号の通信装置において、受信側で検出した基準パルスのパルス幅と予め設定された基準パルスのパルス幅とから、送受信過程で生じるパルス幅の偏差を検出し、受信したPWM変調データパルスのパルス幅を、前記偏差に基づき補正することが記載されている。
特開平05−213207号公報 特開平05−292042号公報
As disclosed in Patent Document 1, conventionally, a vehicle motor control device such as an electric power steering device that drives a vehicle-mounted motor by PWM control of a motor drive circuit is known.
Further, in Patent Document 2, in a PWM signal communication device, a pulse width deviation generated in a transmission / reception process is detected from a pulse width of a reference pulse detected on the receiving side and a preset pulse width of a reference pulse, It is described that the pulse width of the received PWM modulation data pulse is corrected based on the deviation.
JP 05-213207 A Japanese Patent Laid-Open No. 05-292042

ところで、前記特許文献2に開示される通信装置によれば、PWM信号を正確に送受信させることができるが、このPWM信号に基づいてモータ駆動回路を制御して、車載モータを駆動する場合、モータ駆動回路自体の発熱やモータ駆動回路のばらつきによって、モータ駆動回路から出力される駆動信号のデューティが、前記PWM信号のデューティとは異なるようになってしまうことがあり、これによってモータ駆動の制御精度が低下してしまうことがあった。   By the way, according to the communication device disclosed in Patent Document 2, the PWM signal can be transmitted and received accurately. When the motor drive circuit is controlled based on the PWM signal to drive the in-vehicle motor, the motor Due to heat generation in the drive circuit itself and variations in the motor drive circuit, the duty of the drive signal output from the motor drive circuit may be different from the duty of the PWM signal, which controls the motor drive control accuracy. Sometimes dropped.

本願発明は上記実情に鑑みなされたものであり、モータ駆動回路自体の発熱やモータ駆動回路のばらつきがあっても、PWM制御における目標デューティで車載モータを駆動できるようにして、車載モータの制御精度を向上させることを目的とする。   The present invention has been made in view of the above circumstances, and it is possible to drive a vehicle-mounted motor with a target duty in PWM control even if there is heat generation in the motor drive circuit itself or variations in the motor drive circuit. It aims at improving.

そのため請求項1記載の発明は、モータ駆動回路をPWM制御して、車両の前後輪へのトルク分配比を可変とするモータを駆動する車両用モータ制御装置であって、前記モータ駆動回路から出力信号のデューティを計測し、そのときのPWM制御における目標デューティと前記計測したデューティとの偏差を求め、前記偏差が解消される方向に、前記目標デューティを補正するための補正値を変化させると共に、前記トルク分配比の変更時に前記補正値の更新周期を短くする。
上記発明によると、モータ駆動回路をPWM制御するときの目標デューティと、前記モータ駆動回路の出力信号(モータ駆動信号)のデューティとは、本来一致するはずであるが、モータ駆動回路自体の発熱やモータ駆動回路のばらつきなどによって、目標デューティ(指示デューティ)と実際のデューティとに偏差が生じると、この偏差に基づいて目標デューティを補正する。
Therefore, the invention described in claim 1 is a vehicle motor control device that drives a motor that varies the torque distribution ratio to the front and rear wheels of the vehicle by PWM control of the motor drive circuit, and outputs from the motor drive circuit. Measuring the duty of the signal, obtaining a deviation between the target duty in the PWM control at that time and the measured duty, and changing a correction value for correcting the target duty in a direction in which the deviation is eliminated, The update period of the correction value is shortened when the torque distribution ratio is changed.
According to the above invention, the target duty when the motor drive circuit is PWM-controlled and the duty of the output signal (motor drive signal) of the motor drive circuit should be essentially the same. If a deviation occurs between the target duty (instructed duty) and the actual duty due to variations in the motor drive circuit, the target duty is corrected based on this deviation.

これによって、モータ駆動回路自体の発熱やモータ駆動回路のばらつきなどがあっても、モータ駆動信号の実際のデューティを目標とするデューティに制御することができ、PWM制御によってモータの電流(印加電圧)を精度良く制御できる。
また、モータ駆動回路から出力信号のデューティの計測結果とそのときのPWM制御における目標デューティとに偏差が生じても、該偏差に見合う補正値を設定して、前記偏差を直ちに解消させるのではなく、前記偏差が解消される方向に補正値を変化させる。
従って、前記偏差を解消させるために、モータ駆動信号のデューティが急激に変化して、モータ発生トルク・回転速度が急激に変化することを回避でき、モータを安定的に制御できる。
例えば、モータの回転軸の角度位置を目標に向けて制御する場合、目標デューティと実際のデューティとの偏差を解消する補正値を瞬時に与えると、モータ発生トルクが目標位置に見合う目標トルクよりも大きくなり過ぎたり、逆に小さくなり過ぎたりすることによって、実際の位置が目標位置から大きくずれてしまい、目標位置に戻すためのモータ制御を行う必要が生じるが、前述のように、補正値を変化させれば、補正による目標位置からのずれを抑制でき、モータの揺り返しが発生しないので、モータを安定的に制御できる。
また、前記トルク分配比の変更時に前記補正値の更新周期を短くするので、実際のデューティを目標デューティに速く収束させ、必要なトルク分配に速やかに移行させることができる。
請求項2記載の発明では、前記補正値の更新の禁止状態から更新を再開した直後に、前記補正値の更新周期を短くする。
上記発明によると、例えばノイズ検出などに基づいて補正値の更新が禁止された場合には、その間に補正要求が変化している可能性があるため、少なくとも更新禁止前の補正要求にまで応答良く変化させ、目標デューティに対してモータ駆動信号のデューティが大幅に異なる状態を発生させないようにする。
As a result, even if there is heat generation in the motor drive circuit itself or variations in the motor drive circuit, the actual duty of the motor drive signal can be controlled to the target duty, and the motor current (applied voltage) can be controlled by PWM control. Can be accurately controlled.
Even if a deviation occurs between the measurement result of the duty of the output signal from the motor drive circuit and the target duty in the PWM control at that time, a correction value corresponding to the deviation is not set and the deviation is not immediately eliminated. The correction value is changed in the direction in which the deviation is eliminated.
Therefore, in order to eliminate the deviation, it is possible to avoid a sudden change in the duty of the motor drive signal and a sudden change in the motor generated torque / rotation speed, and the motor can be controlled stably.
For example, when controlling the angular position of the rotation axis of the motor toward the target, if a correction value that eliminates the deviation between the target duty and the actual duty is given instantaneously, the motor generated torque will be more than the target torque that matches the target position. If it becomes too large, or conversely becomes too small, the actual position will deviate greatly from the target position, and it will be necessary to perform motor control to return it to the target position. If it is changed, the deviation from the target position due to the correction can be suppressed, and the motor does not sway, so the motor can be controlled stably.
Further, since the update period of the correction value is shortened when the torque distribution ratio is changed, the actual duty can be quickly converged to the target duty, and the required torque distribution can be promptly shifted.
According to a second aspect of the present invention, the update period of the correction value is shortened immediately after the update is restarted from the update state of the correction value.
According to the above invention, when correction value updating is prohibited based on noise detection, for example, there is a possibility that the correction request may have changed during that time. It is changed so that a state in which the duty of the motor drive signal is significantly different from the target duty is not generated.

以下に、本発明の一実施形態を図面に基づいて詳細に説明する。
図1は、実施形態における車両のトランスファ制御システムを示すブロック図である。
図1において、車両10に搭載されるエンジン11の出力トルクは、変速機12及びトランスファ13を介して前輪FW・後輪RWに分配される。
エンジン11は、エンジン制御用のECU(電子コントロールユニット)20によって制御され、変速機12は、変速制御用のECU21によって制御され、トランスファ13は、トランスファ制御用のECU201によって制御される。
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram illustrating a vehicle transfer control system according to an embodiment.
In FIG. 1, the output torque of an engine 11 mounted on a vehicle 10 is distributed to a front wheel FW and a rear wheel RW via a transmission 12 and a transfer 13.
The engine 11 is controlled by an ECU (electronic control unit) 20 for engine control, the transmission 12 is controlled by an ECU 21 for shift control, and the transfer 13 is controlled by an ECU 201 for transfer control.

また、各車輪のブレーキを制御するABS用のECU22が設けられている。
前記トランスファ13は、前輪FWに対して略100%のトルクを分配する前輪駆動状態から、前輪FWと後輪RWとのトルク分配を50:50程度とする4WD状態まで変化させる機能を有し、内蔵するモータの回転角によって後輪RWへのトルク伝達を行うクラッチの押し付け力を制御することで、後輪RWへの伝達トルクを制御するようになっている。
In addition, an ABS ECU 22 is provided for controlling the brake of each wheel.
The transfer 13 has a function of changing from a front wheel drive state in which approximately 100% torque is distributed to the front wheel FW to a 4WD state in which torque distribution between the front wheel FW and the rear wheel RW is about 50:50, The torque transmitted to the rear wheel RW is controlled by controlling the pressing force of the clutch that transmits torque to the rear wheel RW according to the rotation angle of the built-in motor.

前記ECU201は、トランスファ13(後述するモータ101)の駆動回路401、メモリ601、マイコン25、入力回路26、通信回路27などを含んで構成され、4WDモード切替えスイッチ28からの信号を入力し、また、インジケータランプ29の点灯も制御する。
そして、前記ECU201は、車速、前輪FWのスリップ量、エンジン出力トルク、変速機12のギア位置(変速比)等の状態に応じて、トランスファ13の伝達トルク(トルク分配比)を算出し、目標とする伝達トルクを実現するため、モータに印加する電圧を制御し、最終的にモータの回転角度(モータ出力軸の角度)を制御する。
The ECU 201 includes a drive circuit 401 for the transfer 13 (motor 101 described later), a memory 601, a microcomputer 25, an input circuit 26, a communication circuit 27, etc., and inputs a signal from the 4WD mode changeover switch 28. The lighting of the indicator lamp 29 is also controlled.
The ECU 201 calculates the transmission torque (torque distribution ratio) of the transfer 13 according to the vehicle speed, the slip amount of the front wheel FW, the engine output torque, the gear position (transmission ratio) of the transmission 12, and the like. In order to realize the transmission torque, the voltage applied to the motor is controlled, and finally the rotation angle of the motor (angle of the motor output shaft) is controlled.

ここで、モータの回転角度と伝達トルクとは比例関係にあり、モータ回転角度を制御することで、後輪RWへの伝達トルクが制御されるようになっている。
図2は、前記トランスファ13の各モードと、モータ回転角との相関を示す図であり、モータの回転角に応じてモード切り替えがなされるようになっている。
2WDモード(前輪駆動モード)では、2WDモードの角度位置にモータ出力軸を回転させることで、前輪FWに対して略100%のトルクが分配される状態となり、AUTOモード(分配比の自動制御モード)では、モータ回転角をAUTO位置から4H(50:50モード)位置までの範囲で変化させることで、前輪FWに対して略100%のトルクが分配される状態(前輪駆動状態)から、前輪FWと後輪RWとのトルク分配を50:50程度とする状態(4輪駆動状態)にまで可変に制御される。
Here, the rotation angle of the motor and the transmission torque are in a proportional relationship, and the transmission torque to the rear wheel RW is controlled by controlling the motor rotation angle.
FIG. 2 is a diagram showing the correlation between each mode of the transfer 13 and the motor rotation angle, and the mode is switched according to the rotation angle of the motor.
In the 2WD mode (front wheel drive mode), the motor output shaft is rotated to the angular position of the 2WD mode, so that approximately 100% of torque is distributed to the front wheel FW, and the AUTO mode (automatic distribution ratio control mode) ), By changing the motor rotation angle in the range from the AUTO position to the 4H (50:50 mode) position, from the state in which approximately 100% torque is distributed to the front wheels FW (front wheel drive state), the front wheels Control is variably controlled to a state where the torque distribution between the FW and the rear wheel RW is about 50:50 (four-wheel drive state).

4Hモードでは、モータを最大トルクで4H位置に向けて駆動して4Hの位置に固定することで、トルク分配が50:50に維持される。
更に、4Lモードでは、クラッチの押し付け力によって後輪RWへのトルク分配を行うのではなく、機械的に前後輪の締結状態として、トルク分配を50:50に維持する。
4Lモード及び2WDモードでは、モータの回転軸を4Lモード或いは2WDモードの位置まで回転させると、その後は、モータ駆動が停止されて4Lモード及び2WDモードが保持される。また、前記AUTOモードでは、図3に示すように、4H位置に近いほど、モータの負荷トルクが大きくなり、モータの負荷トルクが増えるに従って、後輪RWへのトルク分配量が増えるようになっている。
In the 4H mode, the torque distribution is maintained at 50:50 by driving the motor toward the 4H position with the maximum torque and fixing the motor at the 4H position.
Further, in the 4L mode, the torque distribution to the rear wheels RW is not performed by the pressing force of the clutch, but the torque distribution is maintained at 50:50 by mechanically engaging the front and rear wheels.
In the 4L mode and the 2WD mode, when the rotation shaft of the motor is rotated to the position of the 4L mode or the 2WD mode, the motor drive is stopped and the 4L mode and the 2WD mode are maintained. In the AUTO mode, as shown in FIG. 3, the closer to the 4H position, the greater the motor load torque, and the more the motor load torque, the greater the amount of torque distribution to the rear wheels RW. Yes.

そして、前記AUTOモードでは、前記クラッチが締結し始める位置でのモータ電流及びモータ回転角を予め記憶していて、図4に示すように、目標モータトルク(後輪への目標伝達トルク)に見合う目標電流Itgtを算出し、次いで、該目標電流Itgtが得られる目標電圧Vtgtを算出し、該目標電圧Vtgtに対応するデューティでモータへの通電のオン・オフをPWM制御することで、モータへの平均印加電圧を、前記目標電圧Vtgtに制御する。   In the AUTO mode, the motor current and the motor rotation angle at the position where the clutch starts to be engaged are stored in advance, and as shown in FIG. 4, it matches the target motor torque (target transmission torque to the rear wheels). The target current Itgt is calculated, then the target voltage Vtgt from which the target current Itgt is obtained is calculated, and the on / off of the motor is PWM controlled with the duty corresponding to the target voltage Vtgt. The average applied voltage is controlled to the target voltage Vtgt.

前述のように、前記AUTOモードでは、後輪RWへのトルク伝達の要求変化に基づいてモータの回転角を変化させるが、AUTOモードの位置からクラッチの締結が開始するまでの時間が無駄時間となり、更に、締結開始後にモータの回転角変化に対して負荷が急激に変化するため、前記目標電流と実際の電流との偏差に基づくPID制御(比例・積分・微分制御)でモータ電流をフィードバック制御させる場合に、目標トルクの変化に対する応答性を確保しつつ、ハンチングや収束性の悪化などが発生することを回避することは困難である。   As described above, in the AUTO mode, the rotation angle of the motor is changed based on a change in the request for torque transmission to the rear wheel RW, but the time from the AUTO mode position to the start of clutch engagement is wasted time. Furthermore, since the load changes rapidly with respect to the change in the rotation angle of the motor after the start of fastening, the motor current is feedback-controlled by PID control (proportional / integral / derivative control) based on the deviation between the target current and the actual current. In this case, it is difficult to avoid the occurrence of hunting, deterioration of convergence, and the like while ensuring responsiveness to changes in the target torque.

更に、フィードバックゲインを適合したとしても、クラッチ磨耗等によりモータ負荷の変化特性が変化するため、長期に渡って応答性・収束性を維持することは困難である。
そこで、目標電流Itgtを目標電圧Vtgtに変換し、目標電圧Vtgtに基づいてモータへの通電をPWM制御するようにしているが、トルク制御の精度を確保するためには、目標電圧Vtgtに基づいて設定される目標デューティに対して、実際の通電のデューティが精度良く対応していることが要求される。
Furthermore, even if the feedback gain is adapted, the change characteristic of the motor load changes due to clutch wear or the like, so that it is difficult to maintain responsiveness / convergence over a long period of time.
Therefore, the target current Itgt is converted into the target voltage Vtgt, and PWM control is performed on the energization of the motor based on the target voltage Vtgt. However, in order to ensure the accuracy of torque control, the target current Itgt is based on the target voltage Vtgt. It is required that the duty ratio of actual energization accurately corresponds to the set target duty.

このため、前記ECU201では、図4に概略的に示すように、目標電圧Vtgtに基づいて設定される目標デューティと実際の通電のデューティとの偏差に応じて、目標デューティを補正し、目標電圧Vtgtに高精度に制御できるようにしている。
上記のようにして、目標電圧Vtgtに高精度に制御できるようにしてあれば、過剰・過小な制御を回避して、目標角度位置に定着するまでの時間を短くでき、誤差も少なくなる。従って、例えば、雪道などで車輪が滑ったときに、滑りを解消するためのトルク分配の変更を高応答で行え、雪道などの滑り易い路面での安定走行に寄与できる。
For this reason, the ECU 201 corrects the target duty according to the deviation between the target duty set based on the target voltage Vtgt and the actual energization duty, as schematically shown in FIG. It is possible to control with high accuracy.
As described above, if the target voltage Vtgt can be controlled with high accuracy, excessive and excessive control can be avoided, the time required for fixing at the target angular position can be shortened, and errors can be reduced. Therefore, for example, when a wheel slips on a snowy road or the like, a change in torque distribution for eliminating the slip can be made with high response, which can contribute to stable running on a slippery road surface such as a snowy road.

図5は、ECU201における、目標デューティの補正制御機能を詳細に示すブロック図である。
前記ECU201には、PWM信号を出力する信号出力装置301、前記PWM信号を増幅して前記モータ101に出力するモータ駆動回路401、前記モータ駆動回路401からモータ101に出力される駆動信号を検出する信号検出装置501が設けられている。
FIG. 5 is a block diagram showing in detail the target duty correction control function in the ECU 201.
The ECU 201 detects a signal output device 301 that outputs a PWM signal, a motor drive circuit 401 that amplifies the PWM signal and outputs it to the motor 101, and a drive signal output from the motor drive circuit 401 to the motor 101. A signal detection device 501 is provided.

前記モータ101は、前述のトランスファ13においてモード切り替えを行うと共に、クラッチの押し付けトルクを発生するモータである。
更に、前記信号出力装置301は、信号制御手段311及び信号出力手段312を含んで構成される。
前記信号制御手段311は、各種センサからの信号や外部からの指令信号などに基づいて、前記モータ101への通電のON・OFFをデューティ制御(PWM制御)するときの目標オンデューティを算出し、更に、該目標オンデューティを後述する適用補正値で補正し、該補正後の目標オンデューティを前記信号出力手段312に出力する。
The motor 101 is a motor that performs mode switching in the transfer 13 and generates a clutch pressing torque.
Further, the signal output device 301 includes a signal control means 311 and a signal output means 312.
The signal control means 311 calculates a target on-duty when duty-controlling (PWM control) ON / OFF of energization to the motor 101 based on signals from various sensors, command signals from the outside, etc. Further, the target on-duty is corrected with an application correction value described later, and the corrected target on-duty is output to the signal output means 312.

前記信号出力手段312では、前記補正後の目標オンデューティに対応するオンデューティのPWM信号を生成して、これを前記モータ駆動回路401に出力する。
前記モータ駆動回路401では、前記PWM信号に基づいてモータ電源ON・OFFを高速で切り替えることで、モータ101の平均印加電圧を制御すると共に、モータ電源の印加方向を制御して、モータ101の回転方向及びモータトルクを制御する。
The signal output means 312 generates an on-duty PWM signal corresponding to the corrected target on-duty, and outputs this to the motor drive circuit 401.
The motor drive circuit 401 controls the average applied voltage of the motor 101 and the motor power application direction by switching the motor power ON / OFF at high speed based on the PWM signal, thereby rotating the motor 101. Control direction and motor torque.

前記信号検出装置501は、信号入力手段511,割り込み発生手段512,差分検出手段513,ノイズ検出手段514,補正値算出手段515,カウンタ手段516を含んで構成され、最終的に、目標補正値及び適用補正値を出力する。
前記適用補正値は、前記信号出力装置301の信号制御手段311に入力され、目標オンデューティの補正に用いられ、前記目標補正値は、後述するように、イグニッションスイッチ(エンジンスイッチ)のOFF時に、電子コントロールユニット201に備えられたバックアップメモリ(EEPROM)601に記憶される。
The signal detection apparatus 501 includes a signal input unit 511, an interrupt generation unit 512, a difference detection unit 513, a noise detection unit 514, a correction value calculation unit 515, and a counter unit 516. Finally, a target correction value and Outputs the applied correction value.
The applied correction value is input to the signal control means 311 of the signal output device 301 and used to correct the target on-duty. The target correction value is set to OFF when an ignition switch (engine switch) is turned off, as will be described later. The data is stored in a backup memory (EEPROM) 601 provided in the electronic control unit 201.

前記信号入力手段511は、前記モータ駆動回路401の出力(モータ駆動信号)を、パルス検出回路701を介して入力し、割り込み発生手段512は、前記モータ駆動信号のエッジを検出して割り込み信号を発生させ、該割り込み信号と前記カウンタ手段516(フリーランカウンタ)のカウント値とから、前記モータ駆動信号のオンデューティ(オンパルス幅)を計測する。   The signal input means 511 inputs the output (motor drive signal) of the motor drive circuit 401 via the pulse detection circuit 701, and the interrupt generation means 512 detects the edge of the motor drive signal and outputs an interrupt signal. The on-duty (on-pulse width) of the motor drive signal is measured from the interrupt signal and the count value of the counter means 516 (free-run counter).

前記差分検出手段513は、前記計測したモータ駆動信号のオンデューティ(実オンパルス幅)と、前記目標オンデューティ(目標オンパルス幅)との偏差(差分)を算出し、前記ノイズ検出手段514では、前記偏差に基づいてオンデューティ(オンパルス幅)の計測結果が、ノイズの影響を受けたものであるか否かを判断する。
前記偏差は、例えば、目標オンデューティが50%であるときに、実際のオンデューティが40%である場合のように、目標オンデューティに対する実オンデューティの誤差を示すことになるが、モータ駆動信号にノイズが重畳すると、デューティ比の検出結果が実際値とは大きく異なる値として検出され、極端に大きな偏差が算出されることになる。
The difference detection unit 513 calculates a deviation (difference) between the measured on-duty (actual on-pulse width) of the motor drive signal and the target on-duty (target on-pulse width), and the noise detection unit 514 Based on the deviation, it is determined whether or not the measurement result of the on-duty (on-pulse width) is influenced by noise.
For example, when the target on-duty is 50%, the deviation indicates an error of the actual on-duty with respect to the target on-duty as in the case where the actual on-duty is 40%. If noise is superimposed on the signal, the detection result of the duty ratio is detected as a value that is significantly different from the actual value, and an extremely large deviation is calculated.

そこで、前記ノイズ検出手段514では、前記偏差の絶対値が閾値を超えるときには、オンデューティ(オンパルス幅)の検出結果がノイズの影響を受けていると判断し、当該検出結果に基づく補正値の算出を禁止する。
そして、前記補正値算出手段515では、前記差分検出手段513で算出された偏差、及び、前記ノイズ検出手段514におけるノイズ判定の結果に基づいて、実際のモータ駆動信号のオンデューティを目標オンデューティに一致させるための補正値を設定する。
Therefore, when the absolute value of the deviation exceeds the threshold value, the noise detection unit 514 determines that the detection result of on-duty (on-pulse width) is affected by noise, and calculates a correction value based on the detection result. Is prohibited.
The correction value calculation means 515 sets the actual motor drive signal on-duty to the target on-duty based on the deviation calculated by the difference detection means 513 and the result of the noise determination by the noise detection means 514. Set a correction value to match.

前記補正値の設定を概略的に述べると、例えば、オンデューティを50%としたい条件下で、実際のオンデューティが40%であったとすると、目標オンデューティを50%よりも大きな値に補正することで、実際のオンデューティを50%にまで増大補正することが可能であり、逆に、オンデューティを50%としたい条件下で、実際のオンデューティが60%であったとすると、目標オンデューティを50%よりも小さい値に補正することで、実際のオンデューティを50%にまで減少補正することが可能である。   The setting of the correction value is roughly described. For example, if the actual on-duty is 40% under the condition where the on-duty is set to 50%, the target on-duty is corrected to a value larger than 50%. Thus, the actual on-duty can be increased up to 50%. Conversely, if the actual on-duty is 60% under the condition that the on-duty is to be 50%, the target on-duty By correcting the value to a value smaller than 50%, the actual on-duty can be corrected to decrease to 50%.

前記モータ駆動回路401、より具体的には、前記モータ駆動回路401を構成するトランジスタ等のスイッチング素子の温度変化による特性変化や個々の製品毎の特性ばらつきなどによって、モータ駆動回路401に入力されるPWM信号のデューティと、モータ駆動回路401から出力されるモータ駆動信号のオンデューティとが一致しない場合が生じることがある。   The motor drive circuit 401, more specifically, the motor drive circuit 401 is input due to a characteristic change due to a temperature change of a switching element such as a transistor constituting the motor drive circuit 401 or a characteristic variation for each product. The duty of the PWM signal may not match the on-duty of the motor drive signal output from the motor drive circuit 401.

このように、目標デューティと実際のモータ101の通電デューティとにずれが生じると、例えば、上記トランスファ制御システムでは、トルク配分が設定値と異なることになって、車両の走行・操縦の安定性や運動性に差が生じ、更に、トルク配分が急変すると、前記車両の走行・操縦の安定性や運動性が急変することになってしまう。
しかし、前述のように、実際のモータ駆動信号のオンデューティに基づいて目標オンデューティを補正することで、前記温度変化上昇や特性ばらつきがあっても、モータ101を目標のオンデューティで駆動させることができ、車両の走行・操縦の安定性や運動性を、本来の特性に制御でき、また、安定性・運転性が急変することを回避できる。
In this way, when a deviation occurs between the target duty and the actual duty of the motor 101, for example, in the above transfer control system, the torque distribution is different from the set value, so If there is a difference in mobility and the torque distribution changes abruptly, the stability and mobility of the vehicle traveling and maneuvering will change suddenly.
However, as described above, by correcting the target on-duty based on the on-duty of the actual motor drive signal, the motor 101 can be driven at the target on-duty even if the temperature change rises or the characteristics vary. It is possible to control the stability and motility of the vehicle running / maneuvering to the original characteristics, and to avoid sudden changes in stability / drivability.

ここで、前記目標補正値と適用補正値との関係を以下に説明する。
本実施形態では、目標補正値を100ms毎に更新演算し、適用補正値を10ms毎に更新演算し、前記適用補正値を増減変化させるときには、予め設定された修正値(例えば1)だけ増減され、かつ、前記目標補正値及び適用補正値の初期値は0であるものとする。
また、目標補正値は、目標補正値=偏差+適用補正値として算出されるものとする。
Here, the relationship between the target correction value and the applied correction value will be described below.
In this embodiment, when the target correction value is updated every 100 ms, the applied correction value is updated every 10 ms, and the applied correction value is increased or decreased, the target correction value is increased or decreased by a preset correction value (for example, 1). The initial values of the target correction value and the application correction value are 0.
The target correction value is calculated as target correction value = deviation + applied correction value.

例えば、図6に示すように、目標オンデューティの60%に相当するオンパルス幅の計測値が300であるとしたときに、実際の計測結果が314であったとすると、偏差は、300−314=−14となり、目標に対して実際のオンパルス幅が14だけ大きいことになる。
そして、目標補正値=偏差+適用補正値であるから、適用補正値が初期値の0であったとすると、目標補正値は、目標補正値=−14+0=−14と算出されることになる。
For example, as shown in FIG. 6, when the measured value of the on-pulse width corresponding to 60% of the target on-duty is 300, and the actual measurement result is 314, the deviation is 300-314 = -14, and the actual on-pulse width is 14 larger than the target.
Since target correction value = deviation + application correction value, if the application correction value is the initial value 0, the target correction value is calculated as target correction value = −14 + 0 = −14.

このとき、パルス幅の誤差が単純にオフセット誤差であると仮定すると、オンパルス幅の目標を前記目標補正値に基づいて14だけ小さくすれば、実際のパルス幅は、314から300まで減少し、デューティは本来の60%に修正されることになる。
但し、前記目標補正値に基づいて目標デューティ比をステップ的に補正すると、モータ101の回転が急激に変化することになり、モータ101の制御安定性が損なわれる。
At this time, assuming that the pulse width error is simply an offset error, if the on-pulse width target is reduced by 14 based on the target correction value, the actual pulse width decreases from 314 to 300, and the duty Will be corrected to the original 60%.
However, if the target duty ratio is corrected stepwise based on the target correction value, the rotation of the motor 101 changes abruptly, and the control stability of the motor 101 is impaired.

そこで、本実施形態では、前記補正要求に見合う値にまで前記適用補正値を徐々に変化させ、該適用補正値で目標デューティを補正することで、ステップ的に目標デューティが補正されることがなく、モータ101を安定的に制御できるようにしてある。
即ち、偏差=−14が検出され、目標補正値=−14とされた演算タイミングから、10msが経過した適用補正値の更新演算タイミングにおいて、図7に示すように、前記目標補正値(=−14)に適用補正値を近づけるように、適用補正値を1だけ減少変化させる。
Therefore, in this embodiment, the target duty is not corrected stepwise by gradually changing the applied correction value to a value that meets the correction request and correcting the target duty with the applied correction value. The motor 101 can be stably controlled.
That is, at the update calculation timing of the applied correction value after 10 ms from the calculation timing when the deviation = −14 is detected and the target correction value = −14, as shown in FIG. The applied correction value is decreased and changed by 1 so that the applied correction value is brought close to 14).

この場合、前回まで適用補正値は初期値の0であったから、上記更新演算タイミングでは、適用補正値は−1に更新され、この適用補正値(=−1)で目標デューティ比(目標パルス幅=300)を補正し、目標パルス幅を299とすることで、目標パルス幅(目標デューティ比)を300としたときに、300よりも14だけ大きくなってしまうモータ駆動信号のオンパルス幅を313にまで減少させる。   In this case, since the applied correction value was the initial value 0 until the previous time, the applied correction value is updated to −1 at the update calculation timing, and the target duty ratio (target pulse width) is updated with the applied correction value (= −1). = 300) and the target pulse width is set to 299, and when the target pulse width (target duty ratio) is set to 300, the on-pulse width of the motor drive signal that is larger by 14 than 300 is set to 313. To decrease.

更に、10msが経過すると、図8に示すように、適用補正値は−1から更に1だけ減算されて−2に設定される結果、目標オンパルス幅が298にまで減少され、実際のモータ駆動信号のオンパルス幅も更に1だけ小さい312にまで減少することになる。
上記のようにして適用補正値の10ms毎の更新演算を繰り返すと、目標補正値を更新演算したタイミングから100msが経過した時点では、図9に示すように、適用補正値は−10にまで変化することになり、目標オンパルス幅は290まで減少補正され、実際のモータ駆動信号のオンパルス幅も304にまで減少することになり、偏差は当初の−14から−4にまで減少する。
When 10 ms elapses, as shown in FIG. 8, the applied correction value is further subtracted by 1 from -1 and set to -2, so that the target on-pulse width is reduced to 298, and the actual motor drive signal The on-pulse width of is further reduced to 312 which is smaller by one.
When the update calculation for the applied correction value is repeated every 10 ms as described above, the applied correction value changes to −10 as shown in FIG. 9 when 100 ms has elapsed from the timing of updating the target correction value. Therefore, the target on-pulse width is corrected to decrease to 290, the on-pulse width of the actual motor drive signal is also decreased to 304, and the deviation is decreased from the initial -14 to -4.

適用補正値が−10に更新される上記のタイミングは、同時に、目標補正値の更新演算タイミングでもあり、目標補正値は、図10に示すように、目標補正値=−4+(−10)=−14として算出されることになる。
そして、前記目標補正値の更新演算タイミング(図10)から更に10msが経過した適用補正値の更新演算タイミングでは、図11に示すように、適用補正値が更に1だけ減算されて−11に更新され、その後10ms毎に1だけ減算されることで、図12に示すように、目標補正値の更新演算タイミングから40msが経過した時点で適用補正値は−14にまで減少変化し、適用補正値が−14になれば、該適用補正値で目標デューティを補正することで、モータ駆動信号のオンパルス幅は、本来の300に一致するようになる。
The above timing at which the applied correction value is updated to −10 is also the update calculation timing of the target correction value, and the target correction value is, as shown in FIG. 10, target correction value = −4 + (− 10) = It will be calculated as -14.
Then, at the update calculation timing of the applied correction value when 10 ms has elapsed from the update calculation timing of the target correction value (FIG. 10), the applied correction value is further subtracted by 1 and updated to -11 as shown in FIG. Then, by subtracting 1 every 10 ms, as shown in FIG. 12, when 40 ms elapses from the update calculation timing of the target correction value, the applied correction value decreases to −14, and the applied correction value If -14 becomes -14, the target duty is corrected with the applied correction value, so that the on-pulse width of the motor drive signal coincides with the original 300.

適用補正値が目標補正値に一致する−14になると、図13に示すように、適用補正値の更新は停止され、そのときの値を保持することになり、再度、目標補正値の演算タイミングになったときに、偏差が0であると、図14に示すように、目標補正値は、目標補正値=0+(−14)=−14として算出され、その後も、適用補正値は−14を保持することになる。   When the applied correction value becomes -14 that matches the target correction value, as shown in FIG. 13, the update of the applied correction value is stopped and the value at that time is held, and the calculation timing of the target correction value again. As shown in FIG. 14, when the deviation is 0, the target correction value is calculated as target correction value = 0 + (− 14) = − 14, and thereafter, the applied correction value is −14. Will hold.

そして、再度、目標オンデューティと実際のオンデューティとの間に差異が生じるようになると、その分、目標補正値がステップ的に変化し、これに近づくように(偏差を解消する方向に)適用補正値が徐々に更新される。
図15に示すように、前記目標補正値は、車両のイグニッションスイッチ(エンジンスイッチ)がオフされたときに、バックアップメモリ(EEPROM)601に対して書き込まれ、イグニッションスイッチ(エンジンスイッチ)がオンされたときに、バックアップメモリ(EEPROM)601に書き込まれている前記目標補正値の値が読み出される。
When the difference between the target on-duty and the actual on-duty occurs again, the target correction value changes stepwise, and is applied so as to approach this (in the direction to eliminate the deviation). The correction value is gradually updated.
As shown in FIG. 15, the target correction value is written in the backup memory (EEPROM) 601 when the vehicle ignition switch (engine switch) is turned off, and the ignition switch (engine switch) is turned on. Sometimes, the value of the target correction value written in the backup memory (EEPROM) 601 is read out.

そして、バックアップメモリ(EEPROM)601から読み出された前記目標補正値が、目標補正値の初期値に設定され、更に、読み出した目標補正値と同じ値に前記適用補正値の初期値が設定される。
例えば、目標補正値=適用補正値になる前の時点でイグニッションスイッチ(エンジンスイッチ)がオフされた場合であっても、イグニッションスイッチ(エンジンスイッチ)がオンされたときには、適用補正値を目標補正値と同じ値にして、目標デューティに一致させるための要求補正を直ちに実行させる。
Then, the target correction value read from the backup memory (EEPROM) 601 is set as the initial value of the target correction value, and the initial value of the applied correction value is set to the same value as the read target correction value. The
For example, even when the ignition switch (engine switch) is turned off before the target correction value = applied correction value, when the ignition switch (engine switch) is turned on, the applied correction value is set to the target correction value. And the required correction for matching with the target duty is immediately executed.

これは、モータ駆動制御の途中からの補正と異なり、適用補正値の初期値を補正要求レベルとしても、モータ101のモータ発生トルク・回転速度が急激に変化することにはならず、むしろ、目標デューティで実際にモータ101を駆動できる制御を当初から行えるという利点があるためである。
モータ101の発生トルク・回転速度が制御途中で急激に変化すると、例えば、上記トランスファ制御システムでは、トルク配分が急激に変化することになり、車両の走行・操縦の安定性や運動性が急変してしまうが、制御の開始時であれば、最初から補正されたデューティで駆動することになるので、発生トルク・回転速度の急変は起こらず、車両の走行・操縦の安定性や運動性が急変してしまうことがない。
This is different from the correction in the middle of the motor drive control, and even if the initial value of the applied correction value is set as the correction request level, the motor generated torque / rotational speed of the motor 101 does not change abruptly. This is because there is an advantage that control capable of actually driving the motor 101 with the duty can be performed from the beginning.
If the generated torque / rotational speed of the motor 101 changes suddenly during the control, for example, in the above transfer control system, the torque distribution will change abruptly, and the stability and motility of the running / control of the vehicle will change suddenly. However, at the start of control, the motor is driven with the corrected duty from the beginning, so that the generated torque and rotational speed do not suddenly change, and the stability and mobility of the vehicle running and maneuvering change suddenly. There is no end to it.

次に、上記のモータ駆動回路401のPWM制御を、図16〜図21のフローチャートに従って詳細に説明する。
図16のフローチャートは、モータ駆動信号の出力制御を行うルーチンを示し、このルーチンは所定の微小時間毎に実行される。
まず、ステップS10では、モータ印加電圧の目標(目標電圧)に基づいて目標オンデューティ(目標オンパルス幅)を算出する。
Next, the PWM control of the motor drive circuit 401 will be described in detail according to the flowcharts of FIGS.
The flowchart in FIG. 16 shows a routine for controlling the output of the motor drive signal, and this routine is executed every predetermined minute time.
First, in step S10, a target on-duty (target on-pulse width) is calculated based on the target (target voltage) of the motor applied voltage.

ステップS11では、モータ101の正転が要求されているのか、逆転が要求されているのかを判別する。
正転要求時であれば、ステップS12へ進み、前記目標オンデューティを正転用の適用補正値に基づいて補正して、補正後の目標オンデューティを求める。
一方、逆転要求時であれば、ステップS13へ進み、前記目標オンデューティを逆転用の適用補正値に基づいて補正して、補正後の目標オンデューティを求める。
In step S11, it is determined whether forward rotation of the motor 101 is requested or whether reverse rotation is requested.
If the normal rotation is requested, the process proceeds to step S12, where the target on-duty is corrected based on the applied correction value for normal rotation, and the corrected target on-duty is obtained.
On the other hand, if the reverse rotation is requested, the process proceeds to step S13, and the target on-duty is corrected based on the applied correction value for reverse rotation to obtain the corrected target on-duty.

モータ101の回転方向によって、目標オンデューティと実際の駆動信号のデューティとの相関に違いが生じることがあるので、本実施形態では、回転方向が正転方向であるか逆転方向であるかによって、個別に目標補正値・適用補正値を設定させるようにしてある。
一般的に、モータ101の回転方向を切り換える場合には、トランジスタなどのスイッチング素子でブリッジ回路を形成し、モータ101に流れる電流の向きを切り換えるが、この場合、モータ101の回転方向によって、オンするスイッチング素子が異なり、また、オンされるスイッチング素子の温度環境も異なるため、回転方向によって目標デューティと実際のデューティとのずれ特性が異なってくる。
Since the correlation between the target on-duty and the actual drive signal duty may vary depending on the rotation direction of the motor 101, in the present embodiment, depending on whether the rotation direction is the normal rotation direction or the reverse rotation direction, The target correction value and the applied correction value are set individually.
Generally, when the rotation direction of the motor 101 is switched, a bridge circuit is formed by a switching element such as a transistor, and the direction of the current flowing through the motor 101 is switched. In this case, the current is turned on depending on the rotation direction of the motor 101. Since the switching elements are different and the temperature environment of the switching elements that are turned on is also different, the deviation characteristics between the target duty and the actual duty differ depending on the rotation direction.

そこで、目標デューティと実際のデューティとのずれ特性を、回転方向毎に検出して、回転方向毎に補正値を学習させるようにしてあり、これによって、回転方向が切り換えられても、実際のデューティと目標デューティとのずれを解消できる。
ステップS14では、前記ステップS12又はステップS13で算出された補正後の目標オンデューティと、モータ駆動制御における周期とに基づいて、補正後の目標オフデューティ(補正後の目標オフパルス幅)を算出する。
Therefore, the deviation characteristic between the target duty and the actual duty is detected for each rotation direction, and the correction value is learned for each rotation direction, so that even if the rotation direction is switched, the actual duty is changed. And the target duty can be eliminated.
In step S14, a corrected target off-duty (corrected target off-pulse width) is calculated based on the corrected target on-duty calculated in step S12 or step S13 and the cycle in the motor drive control.

上記ステップS11〜ステップS14の処理は、前記信号制御手段311で行われる。
ステップS15では、前記補正後の目標オンデューティ(オンパルス幅)及び補正後の目標オフデューティ(オフパルス幅)に基づいて、前記信号出力手段312が、モータ駆動回路401へのPWM指示(PWM制御信号の出力)を行う。
図17のフローチャートは、目標補正値の算出開始を判定するルーチンを示し、このルーチンは所定の微小時間毎に実行される。
The processing of steps S11 to S14 is performed by the signal control means 311.
In step S15, based on the corrected target on-duty (on-pulse width) and the corrected target off-duty (off-pulse width), the signal output means 312 outputs a PWM instruction (a PWM control signal of the PWM control signal) to the motor drive circuit 401. Output).
The flowchart of FIG. 17 shows a routine for determining the start of calculation of the target correction value, and this routine is executed every predetermined minute time.

尚、前記図17及び後述の図18,図19のフローチャートに示される処理は、前記モータ駆動回路401の出力が前記パルス検出回路701によって反転されることなく、前記信号検出装置501にそのまま読み込まれ、前記信号検出装置501に読み込まれた信号の立ち上がりから立ち下がりまでが、モータ101のオンデューティ(オンパルス幅)を示す場合に適用される処理である。   Note that the processing shown in the flowcharts of FIG. 17 and FIGS. 18 and 19 described later is read as it is into the signal detection device 501 without the output of the motor drive circuit 401 being inverted by the pulse detection circuit 701. The process from the rising edge to the falling edge of the signal read into the signal detection device 501 is a process applied when the on-duty (on-pulse width) of the motor 101 is indicated.

ステップS20では、モータ101の駆動中であるか、停止中であるかを判定し、モータ101の駆動中であるときに、ステップS21へ進む。
ステップS21では、前回の目標補正値の算出から所定の算出周期(100ms)が経過しているか否かを判定する。
前記算出周期が経過していない場合には、そのまま本ルーチンを終了させ、前記算出周期が経過していれば、目標補正値の更新演算タイミングを判定してステップS22へ進む。
In step S20, it is determined whether the motor 101 is being driven or stopped. When the motor 101 is being driven, the process proceeds to step S21.
In step S21, it is determined whether or not a predetermined calculation cycle (100 ms) has elapsed since the previous calculation of the target correction value.
If the calculation period has not elapsed, the routine is terminated as it is. If the calculation period has elapsed, the update calculation timing of the target correction value is determined, and the process proceeds to step S22.

ステップS22では、モータ101が正転方向に駆動されているか、逆転方向に駆動されているかを判別する。
モータ101が正転方向に駆動されている場合には、ステップS23へ進み、信号入力手段511に入力される正転側のモータ駆動信号に対して、立ち上がり(OFF→ON)エッジ割り込みを発生させる設定を前記割り込み発生手段512に対して行い、次のステップS24では、正転側のモータ駆動信号の立ち上がりエッジでの割り込み処理を許可する。
In step S22, it is determined whether the motor 101 is driven in the forward direction or the reverse direction.
If the motor 101 is driven in the forward direction, the process proceeds to step S23, and a rising (OFF → ON) edge interrupt is generated for the forward side motor drive signal input to the signal input means 511. Setting is performed for the interrupt generation means 512, and in the next step S24, interrupt processing is permitted at the rising edge of the motor drive signal on the forward rotation side.

一方、モータ101が逆転方向に駆動されている場合には、ステップS25へ進み、信号入力手段511に入力される逆転側のモータ駆動信号に対して、立ち上がりエッジ割り込みを発生させる設定を前記割り込み発生手段512に対して行い、次のステップS26では、逆転側のモータ駆動信号の立ち上がりエッジでの割り込み処理を許可する。
図18のフローチャートは、正転側のモータ駆動信号の検出処理を示すルーチンであり、正転側のモータ駆動信号のエッジ検出に基づく割り込み処理で実行される。
On the other hand, when the motor 101 is driven in the reverse rotation direction, the process proceeds to step S25, where the interrupt generation is set to generate a rising edge interrupt for the reverse-side motor drive signal input to the signal input means 511. In the next step S26, interrupt processing is permitted at the rising edge of the reverse-side motor drive signal.
The flowchart of FIG. 18 is a routine showing the detection process of the motor drive signal on the normal rotation side, and is executed by an interrupt process based on edge detection of the motor drive signal on the normal rotation side.

ステップS30では、今回の割り込み処理が正転側のモータ駆動信号の立ち上がりエッジに基づく処理であるか否かを判断する。
立ち上がりエッジによる割り込みである場合には、ステップS31へ進んで、カウンタ手段516におけるフリーランカウンタの値を読み込み、次のステップS32では、正転側のモータ駆動信号の立ち下がり(ON→OFF)エッジで割り込みが発生するように設定する。
In step S30, it is determined whether or not the current interrupt process is a process based on the rising edge of the forward motor drive signal.
If the interrupt is due to a rising edge, the process proceeds to step S31, where the value of the free-run counter in the counter means 516 is read, and in the next step S32, the falling edge (ON → OFF) of the motor drive signal on the forward rotation side. Set to generate an interrupt.

前記ステップS32で立ち下がりエッジでの割り込み設定を行った後に、正転側のモータ駆動信号のエッジ検出に基づく割り込み処理がなされ、ステップS30で、今回の割り込み処理が正転側のモータ駆動信号の立ち下がりエッジに基づく処理であると判断されると、ステップS33へ進む。
ステップS33では、正転側のモータ駆動信号のエッジに基づく割り込み処理を禁止し、次のステップS34では、カウンタ手段516のフリーランカウンタの値を読み込む。
After interrupt setting at the falling edge in step S32, interrupt processing based on edge detection of the forward rotation motor drive signal is performed, and in step S30, the current interrupt processing is performed for the forward rotation motor drive signal. If it is determined that the process is based on the falling edge, the process proceeds to step S33.
In step S33, interrupt processing based on the edge of the motor drive signal on the forward rotation side is prohibited, and in the next step S34, the value of the free run counter of the counter means 516 is read.

ステップS35では、正転側のモータ駆動信号の立ち上がりエッジに基づく割り込み処理のときに読み込んだフリーランカウンタの値と、今回の正転側のモータ駆動信号の立ち下がりエッジに基づく割り込み処理で読み込んだフリーランカウンタの値との差として、正転側モータ駆動信号のオンパルス時間(オンデューティ)を算出する。
ステップS36では、差分検出手段513にて、前記ステップS35で算出したオンデューティと、前記目標オンデューティとの偏差を算出する。
In step S35, the value of the free-run counter read at the time of interrupt processing based on the rising edge of the normal rotation side motor drive signal and the current interrupt processing based on the falling edge of the current rotation side motor drive signal are read. The on-pulse time (on-duty) of the forward rotation side motor drive signal is calculated as the difference from the value of the free-run counter.
In step S36, the difference detection means 513 calculates the deviation between the on-duty calculated in step S35 and the target on-duty.

ステップS37では、前記偏差の絶対値と予め設定された閾値とを比較し、偏差の絶対値が閾値を超える場合には、正転側のモータ駆動信号のオンパルス時間(オンデューティ)の計測結果は、ノイズに影響されたものであると判断し、ステップS38を迂回して本ルーチンをそのまま終了させることで、前記計測結果に基づく正転側目標補正値の更新を禁止する。   In step S37, the absolute value of the deviation is compared with a preset threshold value. If the absolute value of the deviation exceeds the threshold value, the measurement result of the on-pulse time (on duty) of the motor drive signal on the forward rotation side is Then, it is determined that it is influenced by noise, and the routine is terminated as it is by bypassing step S38, thereby prohibiting the update of the normal rotation side target correction value based on the measurement result.

従って、ステップS38を迂回して本ルーチンをそのまま終了させた場合には、正転側目標補正値は、前回値を保持することになる。
一方、偏差の絶対値が閾値以下であれば、正転側のモータ駆動信号のオン時間(オンデューティ比)の計測結果はノイズに影響されていないと判断し、ステップS38へ進む。
ステップS38では、正転側の目標補正値を、前記ステップS35で求めたオンパルス時間(オンデューティ)の偏差と、正転側の適用補正値とに基づき、下式に従って演算する。
Therefore, when step S38 is bypassed and this routine is ended as it is, the forward rotation side target correction value holds the previous value.
On the other hand, if the absolute value of the deviation is less than or equal to the threshold value, it is determined that the measurement result of the on-time (on duty ratio) of the motor drive signal on the forward rotation side is not affected by noise, and the process proceeds to step S38.
In step S38, the target correction value on the forward rotation side is calculated according to the following equation based on the deviation of the on-pulse time (on duty) obtained in step S35 and the applied correction value on the forward rotation side.

正転側の目標補正値=偏差+正転側の適用補正値
図19のフローチャートは、逆転側のモータ駆動信号の検出処理を示すルーチンであり、逆転側のモータ駆動信号のエッジ検出に基づく割り込む処理で実行される。
ステップS40では、今回の割り込み処理が逆転側のモータ駆動信号の立ち上がりエッジに基づく処理であるか否かを判断する。
Normal rotation-side target correction value = deviation + normal rotation-side applied correction value The flowchart of FIG. 19 is a routine showing a detection process of the reverse-rotation side motor drive signal, and interrupts based on edge detection of the reverse-rotation side motor drive signal. Executed in the process.
In step S40, it is determined whether or not the current interrupt process is a process based on the rising edge of the reverse-side motor drive signal.

立ち上がりエッジによる割り込みである場合には、ステップS41へ進んで、カウンタ手段516におけるフリーランカウンタの値を読み込み、次のステップS42では、逆転側のモータ駆動信号の立ち下がりエッジで割り込みが発生するようにする。
前記ステップS42で立ち下がりエッジでの割り込み設定を行った後に、逆転側のモータ駆動信号のエッジ検出に基づく割り込み処理がなされ、ステップS40で、今回の割り込み処理が逆転側のモータ駆動信号の立ち下がりエッジに基づく処理であると判断されると、ステップS43へ進む。
If the interrupt is due to a rising edge, the process proceeds to step S41, the value of the free-run counter in the counter means 516 is read, and in the next step S42, an interrupt is generated at the falling edge of the motor drive signal on the reverse side. To.
After interrupt setting at the falling edge in step S42, interrupt processing based on edge detection of the reverse-side motor drive signal is performed, and in step S40, the current interrupt processing is performed when the reverse-side motor drive signal falls. If it is determined that the processing is based on an edge, the process proceeds to step S43.

ステップS43では、逆転側のモータ駆動信号のエッジに基づく割り込み処理を禁止し、次のステップS44では、カウンタ手段516のフリーランカウンタの値を読み込む。
ステップS45では、逆転側のモータ駆動信号の立ち上がりエッジに基づく割り込み処理のときに読み込んだフリーランカウンタの値と、今回の逆転側のモータ駆動信号の立ち下がりエッジに基づく割り込み処理で読み込んだフリーランカウンタの値との差として、逆転側のモータ駆動信号のオンパルス時間(オンデューティ)を算出する。
In step S43, interrupt processing based on the edge of the reverse-side motor drive signal is prohibited, and in the next step S44, the value of the free-run counter of the counter means 516 is read.
In step S45, the value of the free run counter read during the interrupt process based on the rising edge of the reverse rotation side motor drive signal and the free run read by the interrupt process based on the falling edge of the current reverse rotation side motor drive signal are read. The on-pulse time (on-duty) of the reverse-side motor drive signal is calculated as the difference from the counter value.

ステップS46では、差分検出手段513にて、前記ステップS45で算出したオンデューティと、前記目標オンデューティとの偏差を算出する。
ステップS47では、前記偏差の絶対値と予め設定された閾値とを比較し、偏差の絶対値が閾値を超える場合には、逆転側のモータ駆動信号のオンパルス時間(オンデューティ)の計測結果は、ノイズに影響されたものであると判断し、ステップS48を迂回して本ルーチンをそのまま終了させることで、前記計測結果に基づく逆転側目標補正値の更新を禁止する。
In step S46, the difference detection means 513 calculates the deviation between the on-duty calculated in step S45 and the target on-duty.
In step S47, the absolute value of the deviation is compared with a preset threshold value. If the absolute value of the deviation exceeds the threshold value, the measurement result of the on-pulse time (on duty) of the reverse-side motor drive signal is: It is determined that it is affected by noise, and the routine is terminated as it is bypassing step S48, thereby prohibiting the update of the reverse side target correction value based on the measurement result.

従って、ステップS48を迂回して本ルーチンをそのまま終了させた場合には、逆転側目標補正値は、前回値を保持することになる。
一方、前記偏差の絶対値が閾値以下であれば、逆転側のモータ駆動信号のオンパルス時間(オンデューティ)の計測結果はノイズに影響されていないと判断し、ステップS48へ進む。
Therefore, when step S48 is bypassed and this routine is ended as it is, the reverse rotation side target correction value holds the previous value.
On the other hand, if the absolute value of the deviation is less than or equal to the threshold value, it is determined that the measurement result of the on-pulse time (on duty) of the reverse-side motor drive signal is not affected by noise, and the process proceeds to step S48.

ステップS48では、逆転側の目標補正値を、前記ステップS45で求めたオンパルス時間(オンデューティ)の偏差と、逆転側の適用補正値とに基づき、下式に従って演算する。
逆転側の目標補正値=偏差+逆転側の適用補正値
上記図17〜図19に示される処理は、前述のように、前記モータ駆動回路401の出力が前記パルス検出回路701によって反転されることなく、前記信号検出装置501にそのまま読み込まれ、前記信号検出装置501に読み込まれた信号の立ち上がりから立ち下がりまでが、モータ101のオンデューティを示す場合に適用される処理を示す。
In step S48, a target correction value on the reverse side is calculated according to the following equation based on the deviation of the on-pulse time (on duty) obtained in step S45 and the applied correction value on the reverse side.
Reverse rotation target correction value = deviation + reverse rotation applied correction value In the processing shown in FIGS. 17 to 19, the output of the motor drive circuit 401 is inverted by the pulse detection circuit 701 as described above. Rather, the processing is applied to the case where the on-duty of the motor 101 is read from the signal detection device 501 as it is and the rising and falling edges of the signal read into the signal detection device 501 indicate the on-duty of the motor 101.

そして、前記モータ駆動回路401の出力が前記パルス検出回路701によって反転されて前記信号検出装置501に読み込まれ、前記信号検出装置501に読み込まれた信号の立ち下がりから立ち上がりまでが、モータ101のオンデューティ(オンパルス幅)を示す場合には、図17〜図19に示される処理に代えて、図20〜図22のフローチャートに示される処理を実行する。   The output of the motor drive circuit 401 is inverted by the pulse detection circuit 701 and read into the signal detection device 501, and the motor 101 is turned on from the fall of the signal read into the signal detection device 501 until the rise. When the duty (on pulse width) is indicated, the processing shown in the flowcharts of FIGS. 20 to 22 is executed instead of the processing shown in FIGS.

図20のフローチャートは、目標補正値の算出開始を判定するルーチンを示し、このルーチンは所定の微小時間毎に実行される。
ステップS90では、モータ101の駆動中であるか、停止中であるかを判定し、モータ101の駆動中であるときに、ステップS91へ進む。
ステップS91では、前回の目標補正値の算出から所定の算出周期(100ms)が経過しているか否かを判定する。
The flowchart of FIG. 20 shows a routine for determining the start of calculation of the target correction value, and this routine is executed every predetermined minute time.
In step S90, it is determined whether the motor 101 is being driven or stopped. When the motor 101 is being driven, the process proceeds to step S91.
In step S91, it is determined whether or not a predetermined calculation cycle (100 ms) has elapsed since the previous calculation of the target correction value.

前記算出周期が経過していない場合には、そのまま本ルーチンを終了させ、前記算出周期が経過していれば、目標補正値の更新演算タイミングを判定してステップS92へ進む。
ステップS92では、モータ101が正転方向に駆動されているか、逆転方向に駆動されているかを判別する。
If the calculation cycle has not elapsed, the routine is terminated as it is. If the calculation cycle has elapsed, the update calculation timing of the target correction value is determined, and the process proceeds to step S92.
In step S92, it is determined whether the motor 101 is driven in the forward direction or the reverse direction.

モータ101が正転方向に駆動されている場合には、ステップS93へ進み、信号入力手段511に入力される正転側のモータ駆動信号に対して、立ち下がり(ON→OFF)エッジ割り込みを発生させる設定を前記割り込み発生手段512に対して行い、次のステップS94では、正転側のモータ駆動信号の立ち下がりエッジでの割り込み処理を許可する。   If the motor 101 is driven in the forward direction, the process proceeds to step S93, and a falling (ON → OFF) edge interrupt is generated for the forward-side motor drive signal input to the signal input means 511. The interrupt generation unit 512 is set so that interrupt processing is permitted at the falling edge of the motor drive signal on the forward rotation side in the next step S94.

一方、モータ101が逆転方向に駆動されている場合には、ステップS95へ進み、信号入力手段511に入力される逆転側のモータ駆動信号に対して、立ち下がりエッジ割り込みを発生させる設定を前記割り込み発生手段512に対して行い、次のステップS96では、逆転側のモータ駆動信号の立ち下がりエッジでの割り込み処理を許可する。
図20のフローチャートに示される処理が実行されるのは、前記パルス検出回路701がモータ駆動回路401の出力を反転して出力する場合であり、前記立ち下がり(ON→OFF)エッジ割り込みは、実際には、モータ101への通電開始タイミングでの割り込みとなる。
On the other hand, if the motor 101 is driven in the reverse rotation direction, the process proceeds to step S95, and the interrupt is set to generate a falling edge interrupt for the reverse-side motor drive signal input to the signal input means 511. In the next step S96, interrupt processing is permitted at the falling edge of the reverse motor drive signal.
The processing shown in the flowchart of FIG. 20 is executed when the pulse detection circuit 701 inverts the output of the motor drive circuit 401 and outputs the falling edge (ON → OFF) edge interrupt. Is interrupted at the timing of starting energization of the motor 101.

図21のフローチャートは、正転側のモータ駆動信号の検出処理を示すルーチンであり、正転側のモータ駆動信号のエッジ検出に基づく割り込み処理で実行される。
ステップS100では、今回の割り込み処理が正転側のモータ駆動信号の立ち下がりエッジに基づく処理であるか否かを判断する。
立ち下がりエッジによる割り込みである場合には、ステップS101へ進んで、カウンタ手段516におけるフリーランカウンタの値を読み込み、次のステップS102では、正転側のモータ駆動信号の立ち上がり(OFF→ON)エッジで割り込みが発生するように設定する。
The flowchart of FIG. 21 is a routine showing detection processing for the motor drive signal on the normal rotation side, and is executed in interrupt processing based on edge detection of the motor drive signal on the normal rotation side.
In step S100, it is determined whether or not the current interrupt process is a process based on the falling edge of the motor drive signal on the forward rotation side.
If the interrupt is due to a falling edge, the process proceeds to step S101 to read the value of the free-run counter in the counter means 516, and in the next step S102, the rising (OFF → ON) edge of the motor drive signal on the forward rotation side. Set to generate an interrupt.

前記ステップS102で立ち上がりエッジでの割り込み設定を行った後に、正転側のモータ駆動信号のエッジ検出に基づく割り込み処理がなされ、ステップS100で、今回の割り込み処理が正転側のモータ駆動信号の立ち上がりエッジに基づく処理であると判断されると、ステップS103へ進む。
ステップS103では、正転側のモータ駆動信号のエッジに基づく割り込み処理を禁止し、次のステップS104では、カウンタ手段516のフリーランカウンタの値を読み込む。
After setting the interrupt at the rising edge in step S102, an interrupt process is performed based on the edge detection of the forward motor drive signal. In step S100, the current interrupt process is performed when the forward motor drive signal rises. If it is determined that the processing is based on an edge, the process proceeds to step S103.
In step S103, interrupt processing based on the edge of the motor drive signal on the forward rotation side is prohibited, and in the next step S104, the value of the free run counter of the counter means 516 is read.

ステップS105では、正転側のモータ駆動信号の立ち下がりエッジに基づく割り込み処理のときに読み込んだフリーランカウンタの値と、今回の正転側のモータ駆動信号の立ち上がりエッジに基づく割り込み処理で読み込んだフリーランカウンタの値との差として、正転側モータ駆動信号のオンパルス時間(オンデューティ)を算出する。
図21のフローチャートに示される処理が実行されるのは、前記パルス検出回路701がモータ駆動回路401の出力を反転して出力する場合であり、前記立ち下がり(ON→OFF)エッジ割り込みは、実際には、モータ101への通電開始タイミングでの割り込みとなり、前記立ち上がり(OFF→ON)エッジ割り込みは、実際には、モータ101への通電遮断タイミングでの割り込みとなり、立ち下がりから立ち上がりまでの時間は、モータ101のオン時間(オンデューティ)を示すことになる。
In step S105, the value of the free run counter read at the time of interrupt processing based on the falling edge of the motor drive signal on the normal rotation side and the interrupt processing based on the rising edge of the current motor drive signal on the normal rotation side are read. The on-pulse time (on-duty) of the forward rotation side motor drive signal is calculated as the difference from the value of the free-run counter.
The processing shown in the flowchart of FIG. 21 is executed when the pulse detection circuit 701 inverts the output of the motor drive circuit 401 and outputs the falling (ON → OFF) edge interrupt. Is an interrupt at the start of energization of the motor 101, and the rising (OFF → ON) edge interrupt is actually an interrupt at the energization cut-off timing of the motor 101, and the time from the fall to the rise is The on-time (on-duty) of the motor 101 is indicated.

ステップS106では、差分検出手段513にて、前記ステップS105で算出したオンデューティと、前記目標オンデューティとの偏差を算出する。
ステップS107では、前記偏差の絶対値と予め設定された閾値とを比較し、偏差の絶対値が閾値を超える場合には、正転側のモータ駆動信号のオンパルス時間(オンデューティ)の計測結果は、ノイズに影響されたものであると判断し、ステップS108を迂回して本ルーチンをそのまま終了させることで、前記計測結果に基づく正転側目標補正値の更新を禁止する。
In step S106, the difference detection means 513 calculates a deviation between the on-duty calculated in step S105 and the target on-duty.
In step S107, the absolute value of the deviation is compared with a preset threshold value. If the absolute value of the deviation exceeds the threshold value, the measurement result of the on-pulse time (on duty) of the motor drive signal on the forward rotation side is Then, it is determined that the noise is affected, and the routine is terminated as it is bypassing step S108, thereby prohibiting the update of the forward rotation target correction value based on the measurement result.

従って、ステップS108を迂回して本ルーチンをそのまま終了させた場合には、正転側目標補正値は、前回値を保持することになる。
一方、偏差の絶対値が閾値以下であれば、正転側のモータ駆動信号のオン時間(オンデューティ比)の計測結果はノイズに影響されていないと判断し、ステップS108へ進む。
Therefore, when step S108 is bypassed and this routine is ended as it is, the forward rotation side target correction value holds the previous value.
On the other hand, if the absolute value of the deviation is less than or equal to the threshold value, it is determined that the measurement result of the on-time (on duty ratio) of the motor drive signal on the forward rotation side is not affected by noise, and the process proceeds to step S108.

ステップS108では、正転側の目標補正値を、前記ステップS105で求めたオンパルス時間(オンデューティ)の偏差と、正転側の適用補正値とに基づき、下式に従って演算する。
正転側の目標補正値=偏差+正転側の適用補正値
図22のフローチャートは、逆転側のモータ駆動信号の検出処理を示すルーチンであり、逆転側のモータ駆動信号のエッジ検出に基づく割り込む処理で実行される。
In Step S108, the target correction value on the forward rotation side is calculated according to the following formula based on the deviation of the on-pulse time (on duty) obtained in Step S105 and the applied correction value on the forward rotation side.
Normal rotation-side target correction value = deviation + forward rotation-side applied correction value The flowchart of FIG. 22 is a routine showing detection processing of the reverse-rotation side motor drive signal, and interrupts based on edge detection of the reverse-rotation-side motor drive signal. Executed in the process.

ステップS110では、今回の割り込み処理が逆転側のモータ駆動信号の立ち下がりエッジに基づく処理であるか否かを判断する。
立ち下がりエッジによる割り込みである場合には、ステップS111へ進んで、カウンタ手段516におけるフリーランカウンタの値を読み込み、次のステップS112では、逆転側のモータ駆動信号の立ち上がりエッジで割り込みが発生するようにする。
In step S110, it is determined whether or not the current interrupt process is a process based on the falling edge of the reverse-side motor drive signal.
If the interrupt is due to a falling edge, the process proceeds to step S111, where the value of the free-run counter in the counter means 516 is read, and in the next step S112, an interrupt is generated at the rising edge of the reverse-side motor drive signal. To.

前記ステップS112で立ち上がりエッジでの割り込み設定を行った後に、逆転側のモータ駆動信号のエッジ検出に基づく割り込み処理がなされ、ステップS110で、今回の割り込み処理が逆転側のモータ駆動信号の立ち上がりエッジに基づく処理であると判断されると、ステップS113へ進む。
ステップS113では、逆転側のモータ駆動信号のエッジに基づく割り込み処理を禁止し、次のステップS114では、カウンタ手段516のフリーランカウンタの値を読み込む。
After the interrupt setting at the rising edge in step S112, interrupt processing based on edge detection of the reverse side motor drive signal is performed, and in step S110, the current interrupt processing is performed on the rising edge of the reverse side motor drive signal. If it is determined that the process is based, the process proceeds to step S113.
In step S113, interrupt processing based on the edge of the reverse motor drive signal is prohibited, and in the next step S114, the value of the free-run counter of the counter means 516 is read.

ステップS115では、逆転側のモータ駆動信号の立ち下がりエッジに基づく割り込み処理のときに読み込んだフリーランカウンタの値と、今回の逆転側のモータ駆動信号の立ち上がりエッジに基づく割り込み処理で読み込んだフリーランカウンタの値との差として、逆転側のモータ駆動信号のオンパルス時間(オンデューティ)を算出する。
図22のフローチャートに示される処理が実行されるのは、前記パルス検出回路701がモータ駆動回路401の出力を反転して出力する場合であり、前記立ち下がり(ON→OFF)エッジ割り込みは、実際には、モータ101への通電開始タイミングでの割り込みとなり、前記立ち上がり(OFF→ON)エッジ割り込みは、実際には、モータ101への通電遮断タイミングでの割り込みとなり、立ち下がりから立ち上がりまでの時間は、モータ101のオン時間(オンデューティ)を示すことになる。
In step S115, the value of the free run counter read during the interrupt processing based on the falling edge of the reverse-side motor drive signal and the free run read by the interrupt processing based on the current rising edge of the reverse-side motor drive signal are read. The on-pulse time (on-duty) of the reverse-side motor drive signal is calculated as the difference from the counter value.
The processing shown in the flowchart of FIG. 22 is executed when the pulse detection circuit 701 inverts the output of the motor drive circuit 401 and outputs the falling edge (ON → OFF) edge interrupt. Is an interrupt at the start of energization of the motor 101, and the rising (OFF → ON) edge interrupt is actually an interrupt at the energization cut-off timing of the motor 101, and the time from the fall to the rise is The on-time (on-duty) of the motor 101 is indicated.

ステップS116では、差分検出手段513にて、前記ステップS115で算出したオンデューティと、前記目標オンデューティとの偏差を算出する。
ステップS117では、前記偏差の絶対値と予め設定された閾値とを比較し、偏差の絶対値が閾値を超える場合には、逆転側のモータ駆動信号のオンパルス時間(オンデューティ)の計測結果は、ノイズに影響されたものであると判断し、ステップS118を迂回して本ルーチンをそのまま終了させることで、前記計測結果に基づく逆転側目標補正値の更新を禁止する。
In step S116, the difference detection means 513 calculates the deviation between the on-duty calculated in step S115 and the target on-duty.
In step S117, the absolute value of the deviation is compared with a preset threshold value. If the absolute value of the deviation exceeds the threshold value, the measurement result of the on-pulse time (on duty) of the reverse side motor drive signal is: It is determined that it is affected by noise, and the routine is terminated as it is bypassing step S118, thereby prohibiting the update of the reverse side target correction value based on the measurement result.

従って、ステップS118を迂回して本ルーチンをそのまま終了させた場合には、逆転側目標補正値は、前回値を保持することになる。
一方、前記偏差の絶対値が閾値以下であれば、逆転側のモータ駆動信号のオンパルス時間(オンデューティ)の計測結果はノイズに影響されていないと判断し、ステップS118へ進む。
Therefore, when step S118 is bypassed and this routine is ended as it is, the reverse rotation-side target correction value holds the previous value.
On the other hand, if the absolute value of the deviation is less than or equal to the threshold value, it is determined that the measurement result of the on-pulse time (on duty) of the reverse-side motor drive signal is not affected by noise, and the process proceeds to step S118.

ステップS118では、逆転側の目標補正値を、前記ステップS115で求めたオンパルス時間(オンデューティ)の偏差と、逆転側の適用補正値とに基づき、下式に従って演算する。
逆転側の目標補正値=偏差+逆転側の適用補正値
図23のフローチャートは、適用補正値の算出を行うルーチンを示し、このルーチンは所定の微小時間毎に実行される。
In step S118, the target correction value on the reverse side is calculated according to the following equation based on the deviation of the on-pulse time (on duty) obtained in step S115 and the applied correction value on the reverse side.
Reverse rotation target correction value = deviation + reverse rotation applied correction value The flowchart of FIG. 23 shows a routine for calculating the applied correction value, and this routine is executed every predetermined minute time.

ステップS50では、前回の適用補正値の算出から所定の算出周期(10ms)が経過しているか否かを判定し、前記算出周期が経過しているときには、適用補正値の更新演算タイミングを判定してステップS51へ進む。
ステップS51では、正転側目標補正値よりも正転側適用補正値が大きいか否かを判断する。
In step S50, it is determined whether or not a predetermined calculation cycle (10 ms) has elapsed since the previous calculation of the applied correction value. When the calculated cycle has elapsed, an update calculation timing of the applied correction value is determined. Then, the process proceeds to step S51.
In step S51, it is determined whether or not the forward rotation side applied correction value is larger than the forward rotation side target correction value.

そして、正転側目標補正値<正転側適用補正値であれば、ステップS52へ進んで、正転側適用補正値を修正単位である1だけ小さくする。
一方、正転側目標補正値≧正転側適用補正値であれば、ステップS53へ進み、正転側目標補正値>正転側適用補正値であるか否かを判断する。
そして、正転側目標補正値>正転側適用補正値であれば、ステップS54へ進んで、正転側適用補正値を修正単位である1だけ大きくする。
If the normal rotation side target correction value <the normal rotation side applied correction value, the process proceeds to step S52, and the normal rotation side applied correction value is decreased by 1 which is a correction unit.
On the other hand, if the forward rotation side target correction value ≧ the forward rotation side applied correction value, the process proceeds to step S53, and it is determined whether or not the forward rotation side target correction value> the forward rotation side applied correction value.
If normal rotation side target correction value> normal rotation side application correction value, the process proceeds to step S54, and the normal rotation side application correction value is increased by 1 as a correction unit.

また、ステップS53で正転側目標補正値>正転側適用補正値でないと判断された場合には、正転側目標補正値=正転側適用補正値であるので、ステップS55へ進んで、そのときの正転側適用補正値を保持させるようにする。
上記ステップS51〜ステップS55の処理によって、正転側適用補正値は、所定の算出周期毎に正転側目標補正値に近づく方向に徐々に変更され、正転側目標補正値に一致するようになるとそのときの値を保持する(図25参照)。
When it is determined in step S53 that the forward rotation side target correction value is not greater than the forward rotation side applied correction value, the forward rotation side target correction value is equal to the forward rotation side applied correction value, and thus the process proceeds to step S55. The normal rotation side applied correction value at that time is held.
By the processing in steps S51 to S55, the forward rotation side applied correction value is gradually changed in a direction approaching the normal rotation side target correction value every predetermined calculation cycle so as to coincide with the normal rotation side target correction value. Then, the value at that time is held (see FIG. 25).

ステップS56では、逆転側目標補正値よりも逆転側適用補正値が大きいか否かを判断する。
そして、逆転側目標補正値<逆転側適用補正値であれば、ステップS57へ進んで、逆転側適用補正値を修正単位である1だけ小さくする。
一方、逆転側目標補正値≧逆転側適用補正値であれば、ステップS58へ進み、逆転側目標補正値>逆転側適用補正値であるか否かを判断する。
In step S56, it is determined whether or not the reverse rotation applied correction value is larger than the reverse rotation target correction value.
If the reverse rotation side target correction value is smaller than the reverse rotation side application correction value, the process proceeds to step S57, and the reverse rotation side application correction value is decreased by 1 which is a correction unit.
On the other hand, if the reverse rotation side target correction value ≧ the reverse rotation side application correction value, the process proceeds to step S58, and it is determined whether or not the reverse rotation side target correction value> the reverse rotation side application correction value.

そして、逆転側目標補正値>逆転側適用補正値であれば、ステップS59へ進んで、逆転側適用補正値を修正単位である1だけ大きくする。
また、ステップS58で逆転側目標補正値>逆転側適用補正値でないと判断された場合には、逆転側目標補正値=逆転側適用補正値であるので、ステップS60へ進んで、そのときの逆転側適用補正値を保持させるようにする。
If the reverse rotation side target correction value> the reverse rotation side application correction value, the process proceeds to step S59, and the reverse rotation side application correction value is increased by 1 which is a correction unit.
If it is determined in step S58 that the reverse rotation side target correction value is not greater than the reverse rotation side application correction value, since the reverse rotation side target correction value is equal to the reverse rotation side application correction value, the process proceeds to step S60. The side applied correction value is held.

上記ステップS56〜ステップS60の処理によって、逆転側適用補正値は、所定の算出周期毎に逆転側目標補正値に近づく方向に徐々に変更され、逆転側目標補正値に一致するようになるとそのときの値を保持する(図25参照)。
前記正転側適用補正値及び逆転側適用補正値の更新周期を、制御条件に応じて変更させることができる。
As a result of the processing from step S56 to step S60, the reverse rotation-side applied correction value is gradually changed in a direction approaching the reverse rotation-side target correction value for each predetermined calculation cycle, and when the reverse rotation-side target correction value becomes coincident, Is held (see FIG. 25).
The update period of the forward rotation side application correction value and the reverse rotation side application correction value can be changed according to control conditions.

例えば、目標デューティが所定幅以上に変化したとき、ノイズ判定に基づいて目標補正値の更新を禁止した直後、モータ温度センサを用いてモータ温度を監視し、温度の増加幅又は減少幅が所定以上であるときなどにおいて前記更新周期を短くする。
目標デューティが大きく変化するときは、モータトルクを急激に変化させるときで、適用補正値を比較的速く変化させても、車両の安定性や運転性に大きく影響することはなく、むしろ、実際のデューティを目標デューティに速く収束させることで、必要なトルク分配に速やかに移行させることができる。
For example, when the target duty changes to a predetermined width or more, immediately after prohibiting the update of the target correction value based on the noise determination, the motor temperature is monitored using the motor temperature sensor, and the increase or decrease width of the temperature is more than the predetermined For example, the update cycle is shortened.
When the target duty changes greatly, even when the motor torque is changed abruptly, even if the applied correction value is changed relatively quickly, it does not significantly affect the stability and drivability of the vehicle. By quickly converging the duty to the target duty, it is possible to quickly shift to the necessary torque distribution.

また、ノイズ判定に基づき目標値の更新を禁止すると、適用補正値が目標補正値に追い付くまでの時間が過剰に長くなり、目標デューティへの収束性が悪化するので、更新の禁止状態から更新を再開させた後、例えば、更新禁止が行われなかった場合の適用補正値の変化に追い付くまでの間、更新周期を短くして、適用補正値の収束性を維持する。
更に、モータ温度の変化によって目標デューティの補正要求が変化する状況では、適用補正値の更新周期が長いと、温度変化に対応する補正要求まで適用補正値を追従変化させることができず、実際のデューティが目標デューティに収束するのが遅れ、結果的に、トルク分配を要求値に制御するのが遅れるため、温度が急激に変化する場合には、更新周期を短くする。
If the update of the target value is prohibited based on the noise determination, the time until the applied correction value catches up with the target correction value becomes excessively long and the convergence to the target duty deteriorates. After the restart, for example, the update cycle is shortened to maintain the convergence of the applied correction value until it catches up with the change in the applied correction value when the update prohibition is not performed.
Furthermore, in a situation where the target duty correction request changes due to a change in motor temperature, if the update period of the applied correction value is long, the applied correction value cannot be changed following the correction request corresponding to the temperature change. Since the duty is delayed to converge to the target duty and, as a result, it is delayed to control the torque distribution to the required value, and therefore, when the temperature changes rapidly, the update cycle is shortened.

但し、適用補正値の更新周期が過剰に短いと、車両の安定性や運転性の急変させることになるので、目標デューティの変化に対する更新周期は、予め車両の安定性や運転性を指標として適合する必要がある。
また、モータ駆動が定常状態である場合には、適用補正値の更新周期が短いと、本来トルク分配の変化要求がない条件で、適用補正値の変化によってトルク分配を変化させることになってしまうため、車両の安定性や運転性の急変させることがない程度に更新周期を長くする。
However, if the update period of the applied correction value is excessively short, the stability and drivability of the vehicle will change suddenly. Therefore, the update period for changes in the target duty will be adapted in advance using the stability and drivability of the vehicle as an index. There is a need to.
Further, when the motor drive is in a steady state, if the update period of the applied correction value is short, the torque distribution is changed by the change of the applied correction value under the condition that the torque distribution change request is not originally required. Therefore, the update cycle is lengthened to such an extent that the stability and drivability of the vehicle are not suddenly changed.

前記適用補正値の修正に用いる修正単位を、上記実施形態では、一定値(=1)としたが、例えば、4Hモードでは、モータ回転軸の動きが止まっており、デューティを補正してもオーバーシュートすることはないので、大きなステップ幅で目標補正値に適用補正値を近づけることができる一方、AUTOモードで要求のトルク分配の変化に追従してモータ101を駆動しているときには、デューティの補正値が急激に変化することで、オーバーシュートが発生するので、目標補正値に適用補正値を近づけるステップ幅を小さくする。   The correction unit used for correcting the applied correction value is set to a constant value (= 1) in the above-described embodiment. However, in the 4H mode, for example, the movement of the motor rotation shaft is stopped, and even if the duty is corrected, the correction unit is excessive. Since the shot does not shoot, the applied correction value can be brought close to the target correction value with a large step width. On the other hand, when the motor 101 is driven following the required torque distribution change in the AUTO mode, the duty correction is performed. Since the value changes abruptly, an overshoot occurs, so the step width for bringing the applied correction value closer to the target correction value is reduced.

図24のフローチャートは、車両の始動時及び停止時に、補正値の読み出し・バックアップ処理を行うルーチンを示し、このルーチンは所定の微小時間毎に実行される。
ステップS70では、車両に搭載されたエンジンのイグニションスイッチ(エンジンスイッチ)がONされたか否かを判断する。
そして、イグニションスイッチ(エンジンスイッチ)がONされると、ステップS71へ進み、バックアップメモリ(EEPROM)601に記憶されている正転側目標補正値を読み出し、次のステップS72では、バックアップメモリ(EEPROM)601に記憶されている逆転側目標補正値を読み出す。
The flowchart of FIG. 24 shows a routine for performing correction value reading / backup processing when the vehicle is started and stopped, and this routine is executed every predetermined minute time.
In step S70, it is determined whether an ignition switch (engine switch) of an engine mounted on the vehicle is turned on.
When the ignition switch (engine switch) is turned ON, the process proceeds to step S71, where the normal rotation side target correction value stored in the backup memory (EEPROM) 601 is read. In the next step S72, the backup memory (EEPROM) is read. The reverse rotation side target correction value stored in 601 is read.

そして、ステップS73では、ステップS71で読み出した正転側目標補正値と同じ値を正転側適用補正値にセットし、次のステップS74では、ステップS72で読み出した逆転側目標補正値と同じ値を逆転側適用補正値にセットする。
ステップS75では、イグニションスイッチ(エンジンスイッチ)がOFFされたか否かを判断する。
In step S73, the same value as the normal rotation side target correction value read in step S71 is set as the normal rotation side applied correction value. In the next step S74, the same value as the reverse rotation side target correction value read in step S72. Is set to the reverse side applied correction value.
In step S75, it is determined whether or not an ignition switch (engine switch) is turned off.

そして、イグニションスイッチ(エンジンスイッチ)がOFFされると、ステップS76へ進み、そのときの正転側目標補正値をバックアップメモリ(EEPROM)601に記憶させ、次のステップS77では、そのときの逆転側目標補正値をバックアップメモリ(EEPROM)601に記憶させる。
即ち、正転側目標補正値及び逆転側目標補正値については、前回運転時に最後に演算された値を初期値として、イグニションスイッチ(エンジンスイッチ)がONされてから更新演算が開始される。
When the ignition switch (engine switch) is turned OFF, the process proceeds to step S76, where the normal rotation side target correction value at that time is stored in the backup memory (EEPROM) 601, and in the next step S77, the reverse rotation side at that time The target correction value is stored in the backup memory (EEPROM) 601.
That is, with respect to the forward rotation side target correction value and the reverse rotation side target correction value, the update calculation is started after the ignition switch (engine switch) is turned on with the value calculated last during the previous operation as the initial value.

一方、正転側適用補正値及び逆転側適用補正値については、イグニションスイッチ(エンジンスイッチ)がOFFされた時点で、正転側目標補正値=正転側適用補正値、逆転側目標補正値=逆転側適用補正値になっていなかったとしても、次にイグニションスイッチ(エンジンスイッチ)がONされたときには、目標補正値に一致する状態から更新が開始されることになる。   On the other hand, for the forward rotation side applied correction value and the reverse rotation side applied correction value, when the ignition switch (engine switch) is turned off, the forward rotation side target correction value = the forward rotation side application correction value, and the reverse rotation side target correction value = Even if the reverse rotation-side applied correction value is not reached, when the ignition switch (engine switch) is turned on next time, the update is started from a state that matches the target correction value.

従って、モータ駆動回路401のばらつきによる目標デューティの補正要求が保存され、かつ、イグニションスイッチ(エンジンスイッチ)がONされた直後から、モータ101を高精度に制御することが可能である。
上記実施形態では、目標のオンデューティに実際のオンデューティが一致するように、目標オンデューティを補正するための補正値を設定したが、オンデューティに代えてオフデューティを補正することができ、以下に、オフデューティの補正制御を行う実施形態を示す。
Therefore, it is possible to control the motor 101 with high accuracy immediately after the request for correcting the target duty due to the variation of the motor drive circuit 401 is stored and the ignition switch (engine switch) is turned on.
In the above embodiment, the correction value for correcting the target on-duty is set so that the actual on-duty matches the target on-duty, but the off-duty can be corrected instead of the on-duty, and An embodiment for performing off-duty correction control is shown below.

図26のフローチャートは、前記図16のフローチャートにおけるオンデューティをオフデューティに、オフデューティをオンデューティに書き換えたものであり、この図26のフローチャートに基づいて、目標デューティの補正設定がなされる。
図26のフローチャートに示すルーチンは所定の微小時間毎に実行され、まず、ステップS80では、モータ印加電圧の目標(目標電圧)に基づいて目標オフデューティ(目標オフパルス幅)を算出する。
The flowchart of FIG. 26 is obtained by rewriting the on-duty to the off-duty and the off-duty to the on-duty in the flowchart of FIG. 16, and the target duty correction setting is made based on the flowchart of FIG.
The routine shown in the flowchart of FIG. 26 is executed every predetermined minute time. First, in step S80, a target off duty (target off pulse width) is calculated based on the target (target voltage) of the motor applied voltage.

ステップS81では、モータ101の正転が要求されているのか、逆転が要求されているのかを判別する。
正転要求時であれば、ステップS82へ進み、前記目標オフデューティを正転用の適用補正値に基づいて補正して、補正後の目標オフデューティを求める。
一方、逆転要求時であれば、ステップS83へ進み、前記目標オフデューティを逆転用の適用補正値に基づいて補正して、補正後の目標オフデューティを求める。
In step S81, it is determined whether forward rotation or reverse rotation of the motor 101 is requested.
If the forward rotation is requested, the process proceeds to step S82, and the target off-duty is corrected based on the applied correction value for forward rotation to obtain the corrected target off-duty.
On the other hand, if the reverse rotation is requested, the process proceeds to step S83, where the target off duty is corrected based on the applied correction value for reverse rotation, and the corrected target off duty is obtained.

モータ101の回転方向によって、目標オフデューティと実際の駆動信号のオフデューティとの相関に違いが生じることがあるので、本実施形態では、回転方向が正転方向であるか逆転方向であるかによって、個別に目標補正値・適用補正値を設定させるようにしてある。
ステップS84では、前記ステップS82又はステップS83で算出された補正後の目標オフデューティと、モータ駆動制御における周期とに基づいて、補正後の目標オンデューティ(補正後の目標オンパルス幅)を算出する。
Since the correlation between the target off-duty and the actual drive signal off-duty may vary depending on the rotation direction of the motor 101, in the present embodiment, depending on whether the rotation direction is the normal rotation direction or the reverse rotation direction. The target correction value and the applied correction value are set individually.
In step S84, a corrected target on-duty (corrected target on-pulse width) is calculated based on the corrected target off-duty calculated in step S82 or step S83 and the cycle in motor drive control.

上記ステップS81〜ステップS84の処理は、前記信号制御手段311で行われる。
ステップS85では、前記補正後の目標オンデューティ(オンパルス幅)及び補正後の目標オフデューティ(オフパルス幅)に基づいて、前記信号出力手段312が、モータ駆動回路401へのPWM指示(PWM制御信号の出力)を行う。
図27のフローチャートは、オフデューティを実測値に基づいて補正する実施形態における、目標補正値の算出開始を判定するルーチンを示し、このルーチンは所定の微小時間毎に実行される。
The signal control unit 311 performs the processes in steps S81 to S84.
In step S85, based on the corrected target on-duty (on-pulse width) and the corrected target off-duty (off-pulse width), the signal output means 312 outputs a PWM instruction (a PWM control signal of the PWM control signal) to the motor drive circuit 401. Output).
The flowchart of FIG. 27 shows a routine for determining the calculation start of the target correction value in the embodiment in which the off-duty is corrected based on the actual measurement value, and this routine is executed every predetermined minute time.

尚、図27〜図29のフローチャートは、前記パルス検出回路701が、前記モータ駆動回路401の出力を反転することなくそのまま信号検出装置501に出力する場合に適用される。
ステップS120では、モータ101の駆動中であるか、停止中であるかを判定し、モータ101の駆動中であるときに、ステップS121へ進む。
27 to 29 are applied when the pulse detection circuit 701 outputs the output of the motor drive circuit 401 as it is to the signal detection device 501 without being inverted.
In step S120, it is determined whether the motor 101 is being driven or stopped. When the motor 101 is being driven, the process proceeds to step S121.

ステップS121では、前回の目標補正値の算出から所定の算出周期(100ms)が経過しているか否かを判定する。
前記算出周期が経過していない場合には、そのまま本ルーチンを終了させ、前記算出周期が経過していれば、目標補正値の更新演算タイミングを判定してステップS122へ進む。
In step S121, it is determined whether a predetermined calculation period (100 ms) has elapsed since the previous calculation of the target correction value.
If the calculation period has not elapsed, the routine is terminated as it is. If the calculation period has elapsed, the update calculation timing of the target correction value is determined, and the process proceeds to step S122.

ステップS122では、モータ101が正転方向に駆動されているか、逆転方向に駆動されているかを判別する。
モータ101が正転方向に駆動されている場合には、ステップS123へ進み、信号入力手段511に入力される正転側のモータ駆動信号に対して、立ち下がり(ON→OFF)エッジ割り込みを発生させる設定を前記割り込み発生手段512に対して行い、次のステップS124では、正転側のモータ駆動信号の立ち下がりエッジでの割り込み処理を許可する。
In step S122, it is determined whether the motor 101 is driven in the forward direction or the reverse direction.
If the motor 101 is driven in the forward direction, the process proceeds to step S123, and a falling (ON → OFF) edge interrupt is generated for the forward-side motor drive signal input to the signal input means 511. The interrupt generation unit 512 is set so that interrupt processing is permitted at the falling edge of the motor drive signal on the forward rotation side in the next step S124.

一方、モータ101が逆転方向に駆動されている場合には、ステップS125へ進み、信号入力手段511に入力される逆転側のモータ駆動信号に対して、立ち下がりエッジ割り込みを発生させる設定を前記割り込み発生手段512に対して行い、次のステップS126では、逆転側のモータ駆動信号の立ち下がりエッジでの割り込み処理を許可する。
図28のフローチャートは、正転側のモータ駆動信号の検出処理を示すルーチンであり、正転側のモータ駆動信号のエッジ検出に基づく割り込み処理で実行される。
On the other hand, when the motor 101 is driven in the reverse rotation direction, the process proceeds to step S125, and the interrupt is set to generate a falling edge interrupt for the reverse-side motor drive signal input to the signal input means 511. In the next step S126, interrupt processing at the falling edge of the reverse-side motor drive signal is permitted.
The flowchart in FIG. 28 is a routine showing detection processing for the motor drive signal on the normal rotation side, and is executed in interrupt processing based on edge detection of the motor drive signal on the normal rotation side.

ステップS130では、今回の割り込み処理が正転側のモータ駆動信号の立ち下がりエッジに基づく処理であるか否かを判断する。
立ち下がりエッジによる割り込みである場合には、ステップS131へ進んで、カウンタ手段516におけるフリーランカウンタの値を読み込み、次のステップS132では、正転側のモータ駆動信号の立ち上がり(OFF→ON)エッジで割り込みが発生するように設定する。
In step S130, it is determined whether or not the current interrupt process is a process based on the falling edge of the motor drive signal on the forward rotation side.
If the interrupt is due to a falling edge, the process proceeds to step S131, the value of the free-run counter in the counter means 516 is read, and in the next step S132, the rising (OFF → ON) edge of the motor drive signal on the forward rotation side Set to generate an interrupt.

前記ステップS132で立ち上がりエッジでの割り込み設定を行った後に、正転側のモータ駆動信号のエッジ検出に基づく割り込み処理がなされ、ステップS130で、今回の割り込み処理が正転側のモータ駆動信号の立ち上がりエッジに基づく処理であると判断されると、ステップS133へ進む。
ステップS133では、正転側のモータ駆動信号のエッジに基づく割り込み処理を禁止し、次のステップS134では、カウンタ手段516のフリーランカウンタの値を読み込む。
After setting the interrupt at the rising edge in step S132, an interrupt process is performed based on the edge detection of the forward motor drive signal. In step S130, the current interrupt process is performed when the forward motor drive signal rises. If it is determined that the processing is based on edges, the process proceeds to step S133.
In step S133, interrupt processing based on the edge of the motor drive signal on the forward rotation side is prohibited, and in the next step S134, the value of the free run counter of the counter means 516 is read.

ステップS135では、正転側のモータ駆動信号の立ち下がりエッジに基づく割り込み処理のときに読み込んだフリーランカウンタの値と、今回の正転側のモータ駆動信号の立ち上がりエッジに基づく割り込み処理で読み込んだフリーランカウンタの値との差として、正転側モータ駆動信号のオフパルス時間(オフデューティ)を算出する。
図28のフローチャートが実行されるのは、パルス検出回路701が、前記モータ駆動回路401の出力を反転することなくそのまま信号検出装置501に出力する場合であるから、立ち下がりエッジから立ち上がりエッジまでの時間が、オフパルス時間(オフデューティ)となる。
In step S135, the value of the free-run counter read at the time of interrupt processing based on the falling edge of the normal rotation side motor drive signal and the interrupt processing based on the current rising edge of the motor drive signal of the normal rotation side are read. As the difference from the value of the free-run counter, the off-pulse time (off duty) of the forward rotation side motor drive signal is calculated.
The flow chart of FIG. 28 is executed when the pulse detection circuit 701 outputs the output of the motor drive circuit 401 to the signal detection device 501 as it is without inverting the output from the falling edge to the rising edge. Time becomes an off pulse time (off duty).

ステップS136では、差分検出手段513にて、前記ステップS135で算出したオフデューティと、前記目標オフデューティとの偏差を算出する。
ステップS137では、前記偏差の絶対値と予め設定された閾値とを比較し、偏差の絶対値が閾値を超える場合には、正転側のモータ駆動信号のオフパルス時間(オフデューティ)の計測結果は、ノイズに影響されたものであると判断し、ステップS138を迂回して本ルーチンをそのまま終了させることで、前記計測結果に基づく正転側目標補正値の更新を禁止する。
In step S136, the difference detecting means 513 calculates a deviation between the off-duty calculated in step S135 and the target off-duty.
In step S137, the absolute value of the deviation is compared with a preset threshold value. If the absolute value of the deviation exceeds the threshold value, the measurement result of the off-pulse time (off duty) of the motor drive signal on the forward rotation side is Then, it is determined that it is affected by noise, and the routine is terminated as it is bypassing step S138, thereby prohibiting the update of the normal rotation side target correction value based on the measurement result.

従って、ステップS138を迂回して本ルーチンをそのまま終了させた場合には、正転側目標補正値は、前回値を保持することになる。
一方、偏差の絶対値が閾値以下であれば、正転側のモータ駆動信号のオフ時間(オフデューティ比)の計測結果はノイズに影響されていないと判断し、ステップS138へ進む。
Therefore, when step S138 is bypassed and this routine is terminated as it is, the forward rotation side target correction value holds the previous value.
On the other hand, if the absolute value of the deviation is less than or equal to the threshold value, it is determined that the measurement result of the off time (off duty ratio) of the motor drive signal on the forward rotation side is not affected by noise, and the process proceeds to step S138.

ステップS138では、正転側の目標補正値を、前記ステップS135で求めたオフパルス時間(オフデューティ)の偏差と、正転側の適用補正値とに基づき、下式に従って演算する。
正転側の目標補正値=偏差+正転側の適用補正値
図29のフローチャートは、逆転側のモータ駆動信号の検出処理を示すルーチンであり、逆転側のモータ駆動信号のエッジ検出に基づく割り込む処理で実行される。
In Step S138, the target correction value on the forward rotation side is calculated according to the following formula based on the deviation of the off-pulse time (off duty) obtained in Step S135 and the applied correction value on the forward rotation side.
Normal rotation-side target correction value = deviation + forward rotation-side applied correction value The flowchart of FIG. 29 is a routine showing detection processing of the reverse-rotation side motor drive signal, and interrupts based on edge detection of the reverse-rotation side motor drive signal. Executed in the process.

ステップS140では、今回の割り込み処理が逆転側のモータ駆動信号の立ち下がりエッジに基づく処理であるか否かを判断する。
立ち下がりエッジによる割り込みである場合には、ステップS141へ進んで、カウンタ手段516におけるフリーランカウンタの値を読み込み、次のステップS142では、逆転側のモータ駆動信号の立ち上がりエッジで割り込みが発生するようにする。
In step S140, it is determined whether or not the current interrupt process is a process based on the falling edge of the reverse-side motor drive signal.
If the interrupt is due to a falling edge, the process proceeds to step S141, where the value of the free-run counter in the counter means 516 is read, and in the next step S142, an interrupt is generated at the rising edge of the reverse-side motor drive signal. To.

前記ステップS142で立ち上がりエッジでの割り込み設定を行った後に、逆転側のモータ駆動信号のエッジ検出に基づく割り込み処理がなされ、ステップS140で、今回の割り込み処理が逆転側のモータ駆動信号の立ち上がりエッジに基づく処理であると判断されると、ステップS143へ進む。
ステップS143では、逆転側のモータ駆動信号のエッジに基づく割り込み処理を禁止し、次のステップS144では、カウンタ手段516のフリーランカウンタの値を読み込む。
After setting the interrupt at the rising edge in step S142, an interrupt process is performed based on the edge detection of the reverse side motor drive signal. In step S140, the current interrupt process is performed on the rising edge of the reverse side motor drive signal. If it is determined that the process is based, the process proceeds to step S143.
In step S143, interrupt processing based on the edge of the reverse side motor drive signal is prohibited, and in the next step S144, the value of the free-run counter of the counter means 516 is read.

ステップS145では、逆転側のモータ駆動信号の立ち下がりエッジに基づく割り込み処理のときに読み込んだフリーランカウンタの値と、今回の逆転側のモータ駆動信号の立ち上がりエッジに基づく割り込み処理で読み込んだフリーランカウンタの値との差として、逆転側のモータ駆動信号のオフパルス時間(オフデューティ)を算出する。
図29のフローチャートが実行されるのは、パルス検出回路701が、前記モータ駆動回路401の出力を反転することなくそのまま信号検出装置501に出力する場合であるから、立ち下がりエッジから立ち上がりエッジまでの時間が、オフパルス時間(オフデューティ)となる。
In step S145, the free run counter value read during the interrupt process based on the falling edge of the reverse rotation side motor drive signal and the free run read by the interrupt process based on the current rising edge of the reverse side motor drive signal are read. The off pulse time (off duty) of the reverse side motor drive signal is calculated as the difference from the counter value.
The flow chart of FIG. 29 is executed when the pulse detection circuit 701 outputs the output of the motor drive circuit 401 to the signal detection device 501 as it is without inverting the output. Time becomes an off pulse time (off duty).

ステップS146では、差分検出手段513にて、前記ステップS145で算出したオフデューティと、前記目標オフデューティとの偏差を算出する。
ステップS147では、前記偏差の絶対値と予め設定された閾値とを比較し、偏差の絶対値が閾値を超える場合には、逆転側のモータ駆動信号のオフパルス時間(オフデューティ)の計測結果は、ノイズに影響されたものであると判断し、ステップS148を迂回して本ルーチンをそのまま終了させることで、前記計測結果に基づく逆転側目標補正値の更新を禁止する。
In step S146, the difference detection means 513 calculates a deviation between the off-duty calculated in step S145 and the target off-duty.
In step S147, the absolute value of the deviation is compared with a preset threshold value. If the absolute value of the deviation exceeds the threshold value, the measurement result of the off-pulse time (off duty) of the reverse-side motor drive signal is: It is determined that it is affected by noise, and the routine is terminated as it is bypassing step S148, thereby prohibiting the update of the reverse side target correction value based on the measurement result.

従って、ステップS148を迂回して本ルーチンをそのまま終了させた場合には、逆転側目標補正値は、前回値を保持することになる。
一方、前記偏差の絶対値が閾値以下であれば、逆転側のモータ駆動信号のオフパルス時間(オフデューティ)の計測結果はノイズに影響されていないと判断し、ステップS148へ進む。
Therefore, when step S148 is bypassed and this routine is ended as it is, the reverse rotation side target correction value holds the previous value.
On the other hand, if the absolute value of the deviation is less than or equal to the threshold value, it is determined that the measurement result of the off-pulse time (off duty) of the reverse-side motor drive signal is not affected by noise, and the process proceeds to step S148.

ステップS148では、逆転側の目標補正値を、前記ステップS145で求めたオフパルス時間(オフデューティ)の偏差と、逆転側の適用補正値とに基づき、下式に従って演算する。
逆転側の目標補正値=偏差+逆転側の適用補正値
尚、上記図27〜図29のフローチャートは、パルス検出回路701が、前記モータ駆動回路401の出力を反転することなくそのまま信号検出装置501に出力する場合に実行され、パルス検出回路701が、前記モータ駆動回路401の出力を反転して信号検出装置501に出力する場合には、図27〜図29のフローチャートにおける立ち上がりを立ち上がりと読み替え、立ち上がりを立ち下がりと読み替えて実行させればよい。
In step S148, the target correction value on the reverse side is calculated according to the following formula based on the deviation of the off-pulse time (off duty) obtained in step S145 and the applied correction value on the reverse side.
Reverse rotation target correction value = deviation + reverse rotation applied correction value In the flowcharts of FIGS. 27 to 29, the pulse detection circuit 701 does not invert the output of the motor drive circuit 401, and the signal detection device 501 is used as it is. When the pulse detection circuit 701 inverts the output of the motor drive circuit 401 and outputs it to the signal detection device 501, the rising edge in the flowcharts of FIGS. What is necessary is to replace the rising edge with the falling edge.

また、上記のオフデューティの計測結果から、目標オフデューティを補正する実施形態においても、図23及び図24のフローチャートに示される処理は、同様に実行される。
尚、上記実施形態では、モータ101の回転方向が切り替えられるシステムとしたが、モータ101の回転方向が一定であるシステムであっても良く、また、トランスファ用のモータに限定されず、ATのポジション切り替えに用いられるモータなどであっても良く、モータが用いられるシステムを限定するものではない。
Also in the embodiment in which the target off-duty is corrected from the above-described off-duty measurement result, the processing shown in the flowcharts of FIGS. 23 and 24 is similarly executed.
In the above embodiment, the rotation direction of the motor 101 is switched. However, the system may be a system in which the rotation direction of the motor 101 is constant, and is not limited to the transfer motor. A motor used for switching may be used, and the system in which the motor is used is not limited.

本発明の実施形態における車両用のトランスファシステムを示すブロック図。The block diagram which shows the transfer system for vehicles in embodiment of this invention. 本発明の実施形態におけるトランスファのモードを示す図。The figure which shows the mode of the transfer in embodiment of this invention. 本発明の実施形態におけるモータの回転角と負荷との相関を示す図。The figure which shows the correlation with the rotation angle of a motor and load in embodiment of this invention. 本発明の実施形態におけるモータのPWM駆動回路を示すブロック図。The block diagram which shows the PWM drive circuit of the motor in embodiment of this invention. 本発明の実施形態におけるモータデューティの補正制御機能を示すブロック図。The block diagram which shows the correction | amendment control function of the motor duty in embodiment of this invention. 本発明の実施形態において、適用補正値が初期値である0のときの目標補正値の設定を示すタイムチャート。5 is a time chart showing setting of a target correction value when the applied correction value is 0, which is an initial value, in the embodiment of the present invention. 本発明の実施形態において、適用補正値の更新演算の様子を示すタイムチャート。The time chart which shows the mode of the update calculation of an application correction value in embodiment of this invention. 本発明の実施形態において、適用補正値の更新演算の様子を示すタイムチャート。The time chart which shows the mode of the update calculation of an application correction value in embodiment of this invention. 本発明の実施形態において、適用補正値の更新演算の様子を示すタイムチャート。The time chart which shows the mode of the update calculation of an application correction value in embodiment of this invention. 本発明の実施形態において、適用補正値が目標補正値に近づいた後の目標補正値の更新演算の様子を示すタイムチャート。The time chart which shows the mode of the update calculation of the target correction value after the applied correction value approaches the target correction value in the embodiment of the present invention. 本発明の実施形態において、目標補正値が更新された後の適用補正値の更新演算の様子を示すタイムチャート。The time chart which shows the mode of the update calculation of the application correction value after the target correction value is updated in embodiment of this invention. 本発明の実施形態において、適用補正値が目標補正値に追いついた状態を示すタイムチャート。6 is a time chart showing a state in which the applied correction value has caught up with the target correction value in the embodiment of the present invention. 本発明の実施形態において、適用補正値が目標補正値に追いついた後で保持される状態を示すタイムチャート。6 is a time chart showing a state in which the applied correction value is held after catching up with the target correction value in the embodiment of the present invention. 本発明の実施形態において、適用補正値が目標補正値に追いつき、目標デューティに制御されるようになった時点での目標補正値の設定を示すタイムチャート。5 is a time chart showing setting of a target correction value when the applied correction value catches up with the target correction value and is controlled to the target duty in the embodiment of the present invention. 本発明の実施形態における目標補正値及び適用補正値のバックアップ処理及び読み出し処理を説明するためのタイムチャート。The time chart for demonstrating the backup process and read-out process of the target correction value and applied correction value in embodiment of this invention. 本発明の実施形態におけるモータ駆動信号の出力処理を示すフローチャート。The flowchart which shows the output process of the motor drive signal in embodiment of this invention. 本発明の実施形態における目標補正値の算出開始の判定処理を示すフローチャート。The flowchart which shows the determination process of the calculation start of the target correction value in embodiment of this invention. 本発明の実施形態における正転側信号の検出処理を示すフローチャート。The flowchart which shows the detection process of the normal rotation side signal in embodiment of this invention. 本発明の実施形態における逆転側信号の検出処理を示すフローチャート。The flowchart which shows the detection process of the reverse rotation side signal in embodiment of this invention. 本発明の実施形態における駆動パルスが反転入力される場合の目標補正値の算出開始の判定処理を示すフローチャート。The flowchart which shows the determination process of the calculation start of the target correction value when the drive pulse in the embodiment of the present invention is reversely input. 本発明の実施形態における駆動パルスが反転入力される場合の正転側信号の検出処理を示すフローチャート。The flowchart which shows the detection process of the normal rotation side signal in case the drive pulse in the embodiment of this invention is reversed input. 本発明の実施形態における駆動パルスが反転入力される場合の逆転側信号の検出処理を示すフローチャート。The flowchart which shows the detection process of the reverse side signal in case the drive pulse in the embodiment of this invention is reversely input. 本発明の実施形態における適用補正値の算出処理を示すフローチャート。The flowchart which shows the calculation process of the application correction value in embodiment of this invention. 本発明の実施形態における目標補正値及び適用補正値のバックアップ処理及び読み出し処理を示すフローチャート。The flowchart which shows the backup process and read-out process of the target correction value and applied correction value in embodiment of this invention. 本発明の実施形態における目標補正値及び適用補正値の更新タイミングを示すタイムチャート。The time chart which shows the update timing of the target correction value and application correction value in embodiment of this invention. オフデューティを補正する第2実施形態におけるモータ駆動信号の出力処理を示すフローチャート。The flowchart which shows the output process of the motor drive signal in 2nd Embodiment which correct | amends an off duty. 第2実施形態における目標補正値の算出開始の判定処理を示すフローチャート。The flowchart which shows the determination process of the calculation start of the target correction value in 2nd Embodiment. 第2実施形態における正転側信号の検出処理を示すフローチャート。The flowchart which shows the detection process of the normal rotation side signal in 2nd Embodiment. 第2実施形態における逆転側信号の検出処理を示すフローチャート。The flowchart which shows the detection process of the reverse rotation side signal in 2nd Embodiment.

符号の説明Explanation of symbols

101…モータ、201…電子コントロールユニット、301…信号出力装置、311…信号制御手段、312…信号出力手段、401…モータ駆動回路、501…信号検出装置、511…信号入力手段、512…割り込み発生手段、513…差分検出手段、514…ノイズ検出手段、515…補正値算出手段、516…カウンタ手段、601…バックアップメモリ   DESCRIPTION OF SYMBOLS 101 ... Motor, 201 ... Electronic control unit, 301 ... Signal output device, 311 ... Signal control means, 312 ... Signal output means, 401 ... Motor drive circuit, 501 ... Signal detection device, 511 ... Signal input means, 512 ... Interrupt generation Means 513: Difference detection means 514 ... Noise detection means 515 ... Correction value calculation means 516 ... Counter means 601 ... Backup memory

Claims (2)

モータ駆動回路をPWM制御して、車両の前後輪へのトルク分配比を可変とするモータを駆動する車両用モータ制御装置であって、
前記モータ駆動回路から出力信号のデューティを計測し、そのときのPWM制御における目標デューティと前記計測したデューティとの偏差を求め、前記偏差が解消される方向に、前記目標デューティを補正するための補正値を変化させると共に、
前記トルク分配比の変更時に前記補正値の更新周期を短くする、車両用モータ制御装置。
A motor control device for a vehicle that drives a motor that PWM-controls a motor drive circuit to vary a torque distribution ratio to front and rear wheels of the vehicle,
Measure the duty of the output signal from the motor drive circuit, determine the deviation between the target duty in the PWM control at that time and the measured duty, and correct to correct the target duty in the direction to eliminate the deviation While changing the value,
A vehicle motor control device that shortens an update period of the correction value when the torque distribution ratio is changed.
モータ駆動回路をPWM制御して車載モータを駆動する車両用モータ制御装置であって、
前記モータ駆動回路の出力信号のデューティを計測し、そのときのPWM制御における目標デューティと前記計測したデューティとの偏差を求め、前記偏差が解消される方向に、前記目標デューティを補正するための補正値を変化させると共に、
前記補正値の更新の禁止状態から更新を再開した直後に、前記補正値の更新周期を短くする、車両用モータ制御装置。
A vehicle motor control device that drives a vehicle-mounted motor by PWM control of a motor drive circuit,
Measure the duty of the output signal of the motor drive circuit, determine the deviation between the target duty in the PWM control at that time and the measured duty, and correct to correct the target duty in a direction to eliminate the deviation While changing the value,
The vehicle motor control device that shortens the update period of the correction value immediately after resuming the update from the correction value update prohibition state .
JP2008033403A 2007-03-13 2008-02-14 Vehicle motor control device Expired - Fee Related JP5160260B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008033403A JP5160260B2 (en) 2007-03-13 2008-02-14 Vehicle motor control device
US12/046,831 US7768224B2 (en) 2007-03-13 2008-03-12 Control apparatus for and control method of controlling motor for vehicle

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2007063898 2007-03-13
JP2007063898 2007-03-13
JP2008033403A JP5160260B2 (en) 2007-03-13 2008-02-14 Vehicle motor control device

Publications (2)

Publication Number Publication Date
JP2008259408A JP2008259408A (en) 2008-10-23
JP5160260B2 true JP5160260B2 (en) 2013-03-13

Family

ID=39982420

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008033403A Expired - Fee Related JP5160260B2 (en) 2007-03-13 2008-02-14 Vehicle motor control device

Country Status (1)

Country Link
JP (1) JP5160260B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013060872A (en) * 2011-09-13 2013-04-04 Hitachi Automotive Systems Ltd Drive control device for fuel pump
JP2013255400A (en) * 2012-06-08 2013-12-19 Auto Network Gijutsu Kenkyusho:Kk Vehicle power supply controller
JP6194466B2 (en) * 2013-04-11 2017-09-13 パナソニックIpマネジメント株式会社 Motor drive device
JP6419597B2 (en) * 2015-02-16 2018-11-07 ルネサスエレクトロニクス株式会社 Motor driving method, motor driving device and hard disk device
JP2018191410A (en) * 2017-05-01 2018-11-29 三菱電機株式会社 Controller of electric motor
KR102077391B1 (en) * 2018-04-04 2020-02-13 주식회사 원진일렉트로닉스 Motor control system and method using pwm duty ratio

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63302794A (en) * 1987-05-30 1988-12-09 Fujitsu Ltd Motor current control
JP4517456B2 (en) * 2000-06-08 2010-08-04 ソニー株式会社 Motor control device
JP3931830B2 (en) * 2003-04-07 2007-06-20 富士電機機器制御株式会社 Pulse generator
JP2005160243A (en) * 2003-11-27 2005-06-16 Matsushita Electric Ind Co Ltd Motor control arrangement
JP2005295760A (en) * 2004-04-05 2005-10-20 Matsushita Electric Ind Co Ltd Motor controller

Also Published As

Publication number Publication date
JP2008259408A (en) 2008-10-23

Similar Documents

Publication Publication Date Title
JP5160260B2 (en) Vehicle motor control device
EP1630442B1 (en) Clutch control device
CN109661339B (en) Vehicle control device
US11383762B2 (en) Motor controller and electric power steering using same
US20110040457A1 (en) Method and device for learning the neutral position of the accelerator pedal of a motor vehicle
KR20030077006A (en) Method for adapting the coupling characteristic curve of an automatic clutch in a vehicle
RU2588699C9 (en) Method of calibrating sensor for selected gear and system of sensors for selected gear
JP5102080B2 (en) Control device for vehicle motor
JP2009222155A (en) Control device of continuously variable transmission
JP4840555B2 (en) System and method for controlling engine fuel supply
JP4178865B2 (en) Clutch control device
US11465677B2 (en) Control device for vehicle
EP1416182B1 (en) Clutch control device
US8239105B2 (en) Control device and control method of automatic transmission
JP2002127922A (en) Electric power steering device
KR100839123B1 (en) System for controlling a vehicle electronically and sensor offset correction method therefor
JP2018167645A (en) Automatic drive control device
JP2007168592A (en) Road inclination detection device
US7768224B2 (en) Control apparatus for and control method of controlling motor for vehicle
JP2007278982A (en) Vehicle behavior controller
CN112384426B (en) Limiting a control variable target value of a driver assistance system
BE1025861B9 (en) DRIVER FOR A COUPLING IN A DRIVE LINE AND METHOD FOR DRIVING A COUPLING IN A DRIVE LINE AND A DRIVE LINE CONTAINING THE DRIVING DEVICE
KR101715022B1 (en) System and method for oil pump control
KR100448774B1 (en) a method for clutch controlling of 4 wheel drive a car
JPH0925951A (en) Controller for start of clutch

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090813

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20090925

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20090925

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110629

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110719

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110914

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120419

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121127

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121212

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151221

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees