JP2017193992A - Engine control device - Google Patents

Engine control device Download PDF

Info

Publication number
JP2017193992A
JP2017193992A JP2016083931A JP2016083931A JP2017193992A JP 2017193992 A JP2017193992 A JP 2017193992A JP 2016083931 A JP2016083931 A JP 2016083931A JP 2016083931 A JP2016083931 A JP 2016083931A JP 2017193992 A JP2017193992 A JP 2017193992A
Authority
JP
Japan
Prior art keywords
pulse
clock
time
angle
generated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016083931A
Other languages
Japanese (ja)
Other versions
JP6583118B2 (en
Inventor
鈴木 拓也
Takuya Suzuki
拓也 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2016083931A priority Critical patent/JP6583118B2/en
Publication of JP2017193992A publication Critical patent/JP2017193992A/en
Application granted granted Critical
Publication of JP6583118B2 publication Critical patent/JP6583118B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce a period as short as possible that a generation of an angle clock of shorter period than that of a crank signal generated upon rotation of crank shaft of an engine is stopped.SOLUTION: A missing judgement part 32 of a missing judgement device 30 judges it by a software whether or not a pulse of a crank signal generated at this time is a starting pulse of the missing part. A clock generating device 50 comprises a period calculation part 58, an angle counter 54, a clock generating part 60, a stopping judgement part 56 and a target setting part 58. The period calculation part calculates a clock period of the angle clock by the software. The clock generating part generates an angle clock until the angle counter for counting the angle clock reaches a target count number. When the pulse generated at this time is not judged that it is the starting pulse and the generation of the angle clock is stopped at the missing part, the target setting part sets by a software the target counted number that the angle counter reaches when a finish pulse at the missing part is generated.SELECTED DRAWING: Figure 1

Description

本開示は、エンジンのクランク軸の回転に伴って発生するクランク信号よりも周期の短い角度クロックを生成する技術に関する。   The present disclosure relates to a technique for generating an angle clock having a shorter period than a crank signal generated with rotation of a crankshaft of an engine.

エンジンのクランク軸の回転に伴って発生するクランク信号が表すクランク軸の回転角度位置に基づいて、エンジンを制御する技術が知られている。そして、特許文献1に開示されているように、クランク信号の周期を逓倍数で除算してクランク信号よりも周期の短い角度クロックを生成し、角度クロックに基づいてクランク信号に基づくよりも高精度にエンジン制御を実行する技術が知られている。   A technique for controlling an engine based on a rotational angle position of a crankshaft represented by a crank signal generated with the rotation of the crankshaft of the engine is known. Then, as disclosed in Patent Document 1, an angle clock having a shorter cycle than the crank signal is generated by dividing the cycle of the crank signal by the multiplication number, and the accuracy is higher than that based on the crank signal based on the angle clock. In addition, a technique for executing engine control is known.

クランク信号は、エンジンのクランク軸が一定の角度回転する毎に発生するパルスを有するパルス列と、パルスが欠落しておりパルスとパルスとの角度間隔がパルス列よりも大きい欠落部とを有している。   The crank signal has a pulse train having a pulse that is generated every time the crankshaft of the engine rotates by a certain angle, and a missing portion in which the pulse is missing and the angular interval between the pulses is larger than the pulse train. .

特許文献1では、CPUがクランク信号のパルス数をソフトウェアでカウントし、角度クロック生成用の専用のハードウェアが角度クロックを生成している。CPUがクランク信号のパルス数をカウントする場合、欠落部であるか否かをソフトウェアで判定し、欠落部においてパルス列と同じ角度間隔でパルスが発生するものとして、ソフトウェアでパルス数をカウントしている。   In Patent Document 1, a CPU counts the number of pulses of a crank signal by software, and dedicated hardware for generating an angle clock generates an angle clock. When the CPU counts the number of pulses of the crank signal, it is determined by software whether or not it is a missing part, and the number of pulses is counted by software assuming that a pulse is generated at the same angular interval as the pulse train in the missing part. .

特開2015−151945号公報Japanese Patent Laying-Open No. 2015-151945

特許文献1に記載の技術に対し、専用のハードウェアではなく汎用の処理装置で角度クロックを生成することが考えられる。汎用の処理装置は角度クロックを生成する専用のハードウェアを備えていないので、角度クロックはソフトウェアにより生成される。   In contrast to the technique described in Patent Document 1, it is conceivable to generate an angle clock with a general-purpose processing device instead of dedicated hardware. Since a general-purpose processing apparatus does not include dedicated hardware for generating an angle clock, the angle clock is generated by software.

角度クロッを生成する処理装置は、クランク信号のパルスが発生すると、例えば、今回のパルスと前回のパルスとのパルス周期を逓倍数で除算した値を、今回のパルスと次回のパルスとの間で生成する角度クロックのクロック周期とする。角度クロッを生成する処理装置は、他の処理装置から欠落部であると判定したことを通知されると、欠落部の角度間隔に応じたクロック数の角度クロックを生成する。   When a crank signal pulse is generated, a processing device that generates an angle clock, for example, calculates a value obtained by dividing the pulse period of the current pulse and the previous pulse by a multiplication number between the current pulse and the next pulse. The clock cycle of the angle clock to be generated is used. When a processing device that generates an angle clock is notified by another processing device that it has been determined to be a missing portion, it generates an angle clock of the number of clocks corresponding to the angular interval of the missing portion.

ここで、例えば欠落部においてそれぞれの処理装置において他のソフトウェア処理が実行されていると、ソフトウェアによる欠落部の判定処理が遅れ、欠落部における角度クロックの生成処理の実行が遅れることがある。   Here, for example, if another software process is executed in each processing device in the missing part, the missing part determination process by software may be delayed, and the execution of the angle clock generation process in the missing part may be delayed.

欠落部における角度クロックの生成が遅れ、角度クロックが生成されない期間が生じると、角度クロックが示す角度位置に基づいて実行されるエンジン制御の開始が遅れ、エンジン制御が適切なタイミングで実行されないという問題がある。   If the generation of the angle clock in the missing part is delayed and there is a period in which the angle clock is not generated, the start of engine control executed based on the angle position indicated by the angle clock is delayed, and engine control is not executed at an appropriate timing There is.

本開示の一側面は、エンジンのクランク軸の回転に伴って発生するクランク信号よりも周期の短い角度クロックの生成が停止している期間を極力短くする技術を提供することに
ある。
One aspect of the present disclosure is to provide a technique for shortening as much as possible a period in which generation of an angle clock having a shorter period than a crank signal generated with rotation of a crankshaft of an engine is stopped.

本開示の一態様であるエンジン制御装置は、欠落判定装置(30)とクロック生成装置(50)とを備えている。
欠落判定装置は、エンジンのクランク軸が一定の角度回転する毎に発生するパルスを有するパルス列と、パルスが欠落しておりパルスとパルスとの角度間隔がパルス列よりも大きい欠落部とを有するクランク信号において、今回発生したパルスが欠落部の開始を示す開始パルスであるか否かをソフトウェアにより判定するように構成された欠落判定部(32、S420〜S438)を備えている。
The engine control device according to one aspect of the present disclosure includes a missing determination device (30) and a clock generation device (50).
The missing determination device is a crank signal having a pulse train having a pulse generated every time the crankshaft of the engine rotates by a certain angle, and a missing portion in which the pulse is missing and the angular interval between the pulses is larger than the pulse train. , A missing determination unit (32, S420 to S438) configured to determine by software whether or not the pulse generated this time is a start pulse indicating the start of the missing portion is provided.

クロック生成装置は、周期算出部(58、S400〜S408、S466〜S470、S480〜S488、S510〜S514)と、角度カウンタ(54)と、クロック生成部(60)と、停止判定部(56、58、S500〜S504)と、目標設定部(58、S456、S458、S462、S464、S506、S508)と、を備えている。   The clock generation device includes a period calculation unit (58, S400 to S408, S466 to S470, S480 to S488, S510 to S514), an angle counter (54), a clock generation unit (60), and a stop determination unit (56, 58, S500 to S504) and a target setting unit (58, S456, S458, S462, S464, S506, S508).

周期算出部は、パルスが発生する毎に、ソフトウェアにより、今回発生したパルスと前回発生したパルスとのパルス周期をパルスとパルスとの角度間隔に応じて予め設定された逓倍数で除算した値を角度クロックのクロック周期として算出するように構成されている。角度カウンタは、角度クロックのクロック数をカウントする。   Each time a pulse is generated, the period calculation unit uses a software to divide the value obtained by dividing the pulse period between the pulse generated this time and the pulse generated last time by a multiplication factor set in advance according to the angular interval between the pulses. It is configured to calculate as the clock period of the angle clock. The angle counter counts the number of angle clocks.

クロック生成部は、パルスが発生する毎に設定される目標カウント数に角度カウンタが達するまで、周期算出部が算出するクロック周期で角度クロックを生成するように構成されている。停止判定部は、欠落部においてクロック生成部による角度クロックの生成が停止しているか否かを、ハードウェアとソフトウェアとのうち少なくともハードウェアにより判定するように構成されている。   The clock generation unit is configured to generate an angle clock at a clock cycle calculated by the cycle calculation unit until the angle counter reaches a target count number set every time a pulse is generated. The stop determination unit is configured to determine whether or not the generation of the angle clock by the clock generation unit in the missing part is stopped by at least hardware among hardware and software.

目標設定部は、今回発生したパルスが開始パルスであると欠落判定部が判定すると、欠落部の終了を示す終了パルスが発生するときに角度カウンタが達する目標カウント数をソフトウェアにより設定するように構成されている。   The target setting unit is configured to set the target count number reached by the angle counter by software when the missing determination unit determines that the pulse generated this time is a start pulse, when an end pulse indicating the end of the missing part is generated. Has been.

そして、今回発生したパルスが開始パルスであると欠落判定部が判定しておらず、欠落部において角度クロックの生成が停止していると停止判定部が判定する場合、目標設定部は、終了パルスが発生するときに角度カウンタが達する目標カウント数をソフトウェアにより設定するように構成され、周期算出部は、終了パルスが発生するまでにクロック生成部が生成する角度クロックのクロック周期を算出する用に構成されている。   If the missing determination unit does not determine that the pulse generated this time is the start pulse, and the stop determination unit determines that the generation of the angle clock is stopped in the missing portion, the target setting unit Is configured to set the target count number reached by the angle counter when software occurs, and the cycle calculation unit is used to calculate the clock cycle of the angle clock generated by the clock generation unit before the end pulse is generated. It is configured.

この構成によれば、欠落部において角度クロックの生成が停止していると停止判定部が少なくともハードウェアにより判定すると、目標設定部は、終了パルスが発生するときにクロックカウンタが達する目標カウント数をソフトウェアにより設定する。終了パルスが発生するときにクロックカウンタが達する目標カウント数が設定されることにより、クロック生成部は角度クロックの生成を開始する。   According to this configuration, when the stop determination unit determines at least by hardware that the generation of the angle clock is stopped in the missing part, the target setting unit determines the target count number that the clock counter reaches when the end pulse is generated. Set by software. When the target count number reached by the clock counter when the end pulse is generated is set, the clock generation unit starts generating the angle clock.

したがって、欠落部において角度クロックの生成が停止していても、極力早く角度クロックの生成を開始し、角度クロックの生成が停止している期間を極力短くすることができる。   Therefore, even if the generation of the angle clock is stopped at the missing portion, the generation of the angle clock can be started as soon as possible, and the period during which the generation of the angle clock is stopped can be shortened as much as possible.

尚、この欄および特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本発明の技術的範囲を限定するものではない。   Note that the reference numerals in parentheses described in this column and in the claims indicate the correspondence with the specific means described in the embodiment described later as one aspect, and the technical scope of the present invention. It is not limited.

第1実施形態のエンジン制御装置を示すブロック図。The block diagram which shows the engine control apparatus of 1st Embodiment. タイマ専用プロセッサによるパルス検出処理を示すフローチャート。The flowchart which shows the pulse detection process by a timer exclusive processor. メインCPUによる欠歯判定処理を示すフローチャート。The flowchart which shows the missing tooth determination process by main CPU. タイマ専用プロセッサによる欠歯事前処理を示すフローチャート。The flowchart which shows the missing tooth pre-processing by the processor only for a timer. タイマ専用プロセッサによる異常時処理を示すフローチャート。The flowchart which shows the process at the time of abnormality by a timer exclusive processor. 正常時のクロック生成処理を示すタイムチャート。The time chart which shows the clock generation process at the time of normal. 異常時のクロック生成処理を示すタイムチャート。The time chart which shows the clock generation process at the time of abnormality. 第2実施形態のタイマ専用プロセッサによるパルス検出処理を示すフローチャート。The flowchart which shows the pulse detection process by the processor only for timers of 2nd Embodiment. タイマ専用プロセッサによる異常判定処理を示すフローチャート。The flowchart which shows the abnormality determination process by a timer exclusive processor. 異常時のクロック生成処理を示すタイムチャート。The time chart which shows the clock generation process at the time of abnormality.

以下、本開示の実施形態を図に基づいて説明する。
[1.第1実施形態]
[1−1.構成]
図1に示すECU10は車両に搭載され、入力回路12と、出力回路14と、マイコン20とを備えている。ECUはElectronic Control Unitの略であり、マイコンはマイクロコンピュータの略である。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[1. First Embodiment]
[1-1. Constitution]
An ECU 10 shown in FIG. 1 is mounted on a vehicle and includes an input circuit 12, an output circuit 14, and a microcomputer 20. ECU is an abbreviation for Electronic Control Unit, and microcomputer is an abbreviation for microcomputer.

入力回路12は、クランク角センサからクランク信号を入力し、カム角センサからカム信号を入力する。ECU10は、クランク信号とカム信号とに基づいて、エンジンの気筒判別を行う。クランク信号は、クランク軸とともに回転するクランクロータの外周に一定の角度間隔で設置された歯をクランク角センサが検出して発生するパルス信号である。クランクロータには、歯が連続して欠落した欠歯部が存在する。   The input circuit 12 inputs a crank signal from the crank angle sensor and inputs a cam signal from the cam angle sensor. The ECU 10 determines the cylinder of the engine based on the crank signal and the cam signal. The crank signal is a pulse signal generated when the crank angle sensor detects teeth installed at a constant angular interval on the outer periphery of the crank rotor rotating together with the crankshaft. The crank rotor has a missing tooth portion in which teeth are continuously missing.

したがって、クランク信号は、クランク軸が一定の角度回転する毎に発生するパルスを有するパルス列と、パルスが発生しておらずパルスとパルスとの角度間隔がパルス列よりも大きい欠歯部とを有している。欠歯部は、クランク軸の回転方向の基準位置を示している。本実施形態では、2個の歯が欠歯部で欠落している。したがって、欠歯部におけるパルス間の角度間隔は、パルス列におけるパルス間の角度間隔の3倍である。   Therefore, the crank signal has a pulse train having a pulse generated every time the crankshaft rotates by a certain angle, and a missing tooth portion in which no pulse is generated and the angular interval between the pulses is larger than that of the pulse train. ing. The missing tooth portion indicates a reference position in the rotation direction of the crankshaft. In this embodiment, two teeth are missing at the missing tooth portion. Therefore, the angular interval between pulses in the missing tooth portion is three times the angular interval between pulses in the pulse train.

カム信号は、カム軸とともに回転するカムロータの外周にクランク信号の欠歯部と対応する位置に発生するパルスを有している。
出力回路14は、タイマ制御モジュール50のコンペア部56が出力する信号を、点火モジュール、噴射モジュールに出力する。点火モジュールは点火プラグと点火プラグの駆動回路である。噴射モジュールはインジェクタとインジェクタの駆動回路である。コンペア部56が出力する信号は、点火モジュールが燃料への点火を実行する角度タイミング、ならびに噴射モジュールが燃料噴射を実行する角度タイミングを指示する。
The cam signal has a pulse generated at a position corresponding to the missing tooth portion of the crank signal on the outer periphery of the cam rotor that rotates together with the cam shaft.
The output circuit 14 outputs a signal output from the compare unit 56 of the timer control module 50 to the ignition module and the injection module. The ignition module is a spark plug and a spark plug drive circuit. The injection module is an injector and a drive circuit for the injector. The signal output from the compare unit 56 indicates the angular timing at which the ignition module executes ignition of fuel, and the angular timing at which the injection module executes fuel injection.

マイコン20は、メインCPU30と、メインCPU30用の専用RAM40と、ROM42と、共有RAM44と、タイマ制御モジュール50と、を備えている。メインCPU30とタイマ制御モジュール50とは、汎用の処理装置である。   The microcomputer 20 includes a main CPU 30, a dedicated RAM 40 for the main CPU 30, a ROM 42, a shared RAM 44, and a timer control module 50. The main CPU 30 and the timer control module 50 are general-purpose processing devices.

マイコン20の各機能は、メインCPU30とタイマ制御モジュール50とがROMまたはフラッシュメモリ等の非遷移的実体的記録媒体に記憶されているプログラムを実行することにより実現される。このプログラムが実行されることにより、プログラムに対応する方法が実行される。   Each function of the microcomputer 20 is realized by the main CPU 30 and the timer control module 50 executing a program stored in a non-transitional physical recording medium such as a ROM or a flash memory. By executing this program, a method corresponding to the program is executed.

メインCPU30は、ROM42に記憶されている制御プログラムを実行することにより、角度クロックの生成を含むエンジン制御を実行する。例えば、メインCPU30は、角度クロックの生成以外のエンジン制御として、点火制御と燃料の噴射制御とを次回実行する角度タイミングを、タイマ専用プロセッサ58を介してコンペア部56に設定する。   The main CPU 30 executes engine control including generation of an angle clock by executing a control program stored in the ROM 42. For example, the main CPU 30 sets the angle timing at which the ignition control and the fuel injection control are executed next time as engine control other than the generation of the angle clock in the compare unit 56 via the timer dedicated processor 58.

メインCPU30の専用RAM40には、メインCPU30が角度クロック生成を含むエンジン制御で使用するデータが記憶される。例えば、専用RAM40には、後述するエッジカウンタ、最大エッジ位置、欠歯部の開始パルスのエッジ位置、欠歯部の開始パルスの前に発生するパルスのエッジ位置等が記憶される。   The dedicated RAM 40 of the main CPU 30 stores data used by the main CPU 30 for engine control including angle clock generation. For example, the dedicated RAM 40 stores an edge counter, a maximum edge position, an edge position of the start pulse of the missing tooth portion, an edge position of a pulse generated before the start pulse of the missing tooth portion, and the like.

共有RAM44には、メインCPU30とタイマ専用プロセッサ58とが共通に参照するデータが記憶される。例えば、共有RAM44には、後述する欠歯フラグ1、欠歯フラグ2、欠歯数、異常処理フラグ等が記憶される。   The shared RAM 44 stores data commonly referred to by the main CPU 30 and the timer dedicated processor 58. For example, the shared RAM 44 stores a missing tooth flag 1, a missing tooth flag 2, a missing tooth number, an abnormality processing flag, and the like, which will be described later.

タイマ制御モジュール50は、エッジ検出部52と、カウンタ部54と、コンペア部56と、タイマ専用プロセッサ58と、クロック生成部60と、図示しないRAM、ROMとを備えている。   The timer control module 50 includes an edge detection unit 52, a counter unit 54, a compare unit 56, a timer dedicated processor 58, a clock generation unit 60, and RAM and ROM (not shown).

エッジ検出部52は、クランク信号のパルスのエッジを検出する。エッジ検出部52が検出するパルスのエッジは、立ち上がりまたは立ち下がりのいずれのエッジでもよい。エッジ検出部52は、クランク信号のパルスのエッジを検出した時刻を記憶している。   The edge detector 52 detects the edge of the pulse of the crank signal. The edge of the pulse detected by the edge detector 52 may be either a rising edge or a falling edge. The edge detection unit 52 stores the time when the edge of the pulse of the crank signal is detected.

カウンタ部54は、各種カウンタを備えている。カウンタ部54は、例えば、クロック生成部60が生成する角度クロックに同期して角度クロックのクロック数をカウントする角度カウンタ、ならびにタイマ専用プロセッサ58の動作クロックに同期してクロック数をカウントする時間カウンタを備えている。   The counter unit 54 includes various counters. The counter unit 54 includes, for example, an angle counter that counts the number of clocks of the angle clock in synchronization with the angle clock generated by the clock generation unit 60, and a time counter that counts the number of clocks in synchronization with the operation clock of the timer dedicated processor 58. It has.

コンペア部56は、タイマ専用プロセッサ58から設定された値と、設定された値に対応するカウンタ部54の角度カウンタおよび時間カウンタとを比較する。設定された値とカウンタとが一致すると、コンペア部56は、噴射モジュールと点火モジュールとに対する出力信号を出力回路14に出力するか、タイマ専用プロセッサ58に対し、設定された値とカウンタとが一致したことに対応する処理の実行を要求する。   The compare unit 56 compares the value set from the timer dedicated processor 58 with the angle counter and time counter of the counter unit 54 corresponding to the set value. When the set value matches the counter, the compare unit 56 outputs an output signal for the injection module and the ignition module to the output circuit 14 or the timer dedicated processor 58 matches the set value and the counter. Requests execution of processing corresponding to the event.

タイマ専用プロセッサ58は、実行イベントが発生すると、図示しないROMに記憶されている制御プログラムに基づいて、発生した順番に実行イベントに対応する処理を実行する。   When an execution event occurs, the timer dedicated processor 58 executes processing corresponding to the execution event in the order of occurrence based on a control program stored in a ROM (not shown).

例えば、タイマ専用プロセッサ58は、メインCPU30からの要求により、エンジン制御の実行タイミングを角度タイミングまたは時間タイミングでコンペア部56に設定する。また、タイマ専用プロセッサ58は、エッジ検出部52がクランク信号のパルスのエッジを検出する毎に、前回検出されたパルスと今回検出されたパルスとの間のエッジ間時間を、パルスとパルスとの角度間隔に応じて設定されるエッジ間カウント数で除算する。   For example, the timer dedicated processor 58 sets the execution timing of engine control in the compare unit 56 at an angle timing or a time timing in response to a request from the main CPU 30. Further, each time the edge detection unit 52 detects the edge of the pulse of the crank signal, the timer dedicated processor 58 calculates the inter-edge time between the previously detected pulse and the currently detected pulse. Divide by the number of counts between edges set according to the angle interval.

前述したように、本実施形態では、欠歯部の開始を示す開始パルスと欠歯部の終了を示す終了パルスとの角度間隔はパルス列のパルス間の角度間隔の3倍である。したがって、欠歯部においてエッジ間時間を除算するエッジ間カウント数は、パルス列においてエッジ間時間を除算するエッジ間カウント数の3倍になる。   As described above, in this embodiment, the angular interval between the start pulse indicating the start of the missing tooth portion and the end pulse indicating the end of the missing tooth portion is three times the angular interval between the pulses in the pulse train. Therefore, the inter-edge count that divides the inter-edge time in the missing tooth portion is three times the inter-edge count that divides the inter-edge time in the pulse train.

タイマ専用プロセッサ58は、前記と今回とのエッジ間時間をエッジ間カウント数で除
算した結果を、エッジ検出部52が次回のパルスのエッジを検出するまでにクロック生成部60が生成する角度クロックのクロック周期とする。
The timer dedicated processor 58 divides the inter-edge time between the current time and the current time by the inter-edge count, and the angle clock generated by the clock generator 60 before the edge detector 52 detects the edge of the next pulse. The clock cycle.

クロック生成部60は内部に図示しない目標値カウンタを備えている。目標値カウンタは、エッジ検出部52がクランク信号のエッジを検出する毎に、クランク信号のパルス列のパルス間の角度間隔に対応するエッジ間カウント数をハードウェアにより加算して目標値カウンタに目標カウント数を設定する。エッジ検出部52が検出したエッジが欠歯部の開始パルスであっても、目標値カウンタは、同じエッジ間カウント数を加算する。   The clock generator 60 includes a target value counter (not shown). Each time the edge detection unit 52 detects the edge of the crank signal, the target value counter adds the count number between edges corresponding to the angular interval between pulses of the pulse train of the crank signal by hardware, and adds the target count to the target value counter. Set the number. Even if the edge detected by the edge detector 52 is a start pulse of a missing tooth portion, the target value counter adds the same inter-edge count.

エッジ間カウント数は予め目標値カウンタに設定されている。本実施形態では、エッジ間カウント数として、例えば4が設定されている。クロック生成部60は、角度カウンタのカウント数が目標値カウンタに設定された目標カウント数に達するまで、タイマ専用プロセッサ58が算出した周期で角度クロックを生成する。   The inter-edge count is preset in the target value counter. In the present embodiment, for example, 4 is set as the count number between edges. The clock generation unit 60 generates the angle clock at the cycle calculated by the timer dedicated processor 58 until the count number of the angle counter reaches the target count number set in the target value counter.

クロック生成部60は、クランク信号の次のパルスのエッジをエッジ検出部52が検出する前に角度カウンタのカウント数が目標値カウンタに達すると、角度クロックの生成を停止する。また、クロック生成部60は、クランク信号の次のパルスのエッジをエッジ検出部52が検出するときに角度カウンタのカウント数が目標カウント数に達していない場合、目標カウント数に達するように角度クロックの周期を短くする。   When the count number of the angle counter reaches the target value counter before the edge detection unit 52 detects the edge of the next pulse of the crank signal, the clock generation unit 60 stops generating the angle clock. In addition, the clock generator 60 is configured so that when the edge detection unit 52 detects the edge of the next pulse of the crank signal, the count of the angle counter does not reach the target count, the angle clock is set so as to reach the target count. Shorten the cycle.

[1−2.処理]
エンジン制御装置として機能するECU10が実行する各種処理について、以下に説明する。
[1-2. processing]
Various processes executed by the ECU 10 functioning as an engine control device will be described below.

(1)エッジ検出処理
エッジ検出部52がクランク信号のエッジを検出すると、エッジ検出部52はタイマ専用プロセッサ58に図2のフローチャートが示すエッジ検出処理の実行を要求する。タイマ専用プロセッサ58は、他の処理を実行中でなければ、エッジ検出部52からの要求にしたがいエッジ検出処理を実行する。
(1) Edge Detection Processing When the edge detection unit 52 detects the edge of the crank signal, the edge detection unit 52 requests the timer dedicated processor 58 to execute the edge detection processing shown in the flowchart of FIG. The timer dedicated processor 58 executes edge detection processing in response to a request from the edge detection unit 52 unless other processing is being executed.

S400においてタイマ専用プロセッサ58は、次式(1)に基づき、今回のエッジ検出時刻と前回のエッジ検出時刻との時間差をエッジとエッジとの間のエッジ間時間として算出する。今回のエッジが欠歯部の終了パルスのエッジの場合、式(1)から算出されるエッジ間時間は、今回のエッジが欠歯部の終了パルス以外のパルスのエッジの場合よりも長くなる。   In S400, the timer dedicated processor 58 calculates the time difference between the current edge detection time and the previous edge detection time as an inter-edge time between edges based on the following equation (1). When the current edge is the edge of the end pulse of the missing tooth portion, the inter-edge time calculated from the expression (1) is longer than that of the edge of the pulse other than the end pulse of the missing tooth portion.

エッジ間時間=今回のエッジ検出時刻−前回のエッジ検出時刻・・・(1)
タイマ専用プロセッサ58は、S400の終了後、エッジ検出部52が今回エッジを検出した時刻を前回のエッジ検出時刻として記憶する。
Edge-to-edge time = current edge detection time−last edge detection time (1)
After the end of S400, the timer dedicated processor 58 stores the time when the edge detection unit 52 detects the current edge as the previous edge detection time.

S402においてタイマ専用プロセッサ58は、欠歯フラグ1がオフであるか否かを判定する。後述する図3の欠歯判定処理において、メインCPU30は、欠歯部の開始パルスのエッジを検出すると欠歯フラグ1をオンに設定し、開始パルス以外のエッジを検出すると欠歯フラグ1をオフに設定する。   In S402, the timer dedicated processor 58 determines whether or not the missing tooth flag 1 is OFF. In the missing tooth determination process of FIG. 3 described later, the main CPU 30 sets the missing tooth flag 1 to ON when detecting the edge of the missing pulse at the start pulse, and turns off the missing tooth flag 1 when detecting an edge other than the start pulse. Set to.

エッジとエッジとの間において、図2のエッジ検出処理は図3の欠歯判定処理よりも前に実行される。したがって、メインCPU30が欠歯部の開始パルスのエッジを検出して欠歯フラグ1をオンに設定している状態で、エッジ検出部52が図2のエッジ検出処理の実行をタイマ専用プロセッサ58に要求するトリガとなるエッジは、欠歯部の終了パルスのエッジである。   Between the edges, the edge detection process of FIG. 2 is executed before the missing tooth determination process of FIG. Therefore, in a state where the main CPU 30 detects the edge of the start pulse of the missing tooth portion and sets the missing tooth flag 1 to ON, the edge detecting portion 52 executes the edge detection processing of FIG. The requested trigger edge is the edge of the end pulse of the missing tooth portion.

これに対し、メインCPU30が欠歯部の開始パルス以外のエッジを検出して欠歯フラグ1をオフに設定している状態で、エッジ検出部52が図2のエッジ検出処理の実行をタイマ専用プロセッサ58に要求するトリガとなるエッジは、欠歯部の終了パルス以外のエッジである。   On the other hand, in a state where the main CPU 30 detects an edge other than the start pulse of the missing tooth portion and sets the missing tooth flag 1 to OFF, the edge detecting portion 52 performs the edge detection processing of FIG. The trigger edge requested to the processor 58 is an edge other than the end pulse of the missing tooth portion.

S402の判定がYesであり、欠歯フラグ1がオフの場合、S404においてタイマ専用プロセッサ58は、次式(2)に基づいて角度クロックの周期を算出する。
角度クロックの周期=エッジ間時間/4 ・・・(2)
式(2)のエッジ間時間はS400で算出された値である。また、S404は欠歯フラグ1がオフの場合に実行されるので、今回、図2のエッジ検出処理を実行するトリガとなるエッジは、欠歯部の終了パルス以外のエッジである。
If the determination in S402 is Yes and the missing tooth flag 1 is OFF, the timer dedicated processor 58 calculates the period of the angle clock based on the following equation (2) in S404.
Angular clock period = time between edges / 4 (2)
The inter-edge time in equation (2) is the value calculated in S400. Further, since S404 is executed when the missing tooth flag 1 is OFF, the edge serving as a trigger for executing the edge detection processing of FIG. 2 this time is an edge other than the end pulse of the missing tooth portion.

したがって、エッジ間時間の間に角度カウンタが角度クロックのパルス数をカウントするエッジ間カウント数は、本実施形態では4である。そこで、式(2)において、エッジ間時間を4で除算することにより、角度クロックの周期を算出できる。S404の実行後、処理はS408に移行する。   Therefore, the count number between edges at which the angle counter counts the number of pulses of the angle clock during the time between edges is 4 in this embodiment. Therefore, in the equation (2), the period of the angle clock can be calculated by dividing the inter-edge time by 4. After execution of S404, the process proceeds to S408.

S402の判定がNoであり、欠歯フラグ1がオンの場合、S406においてタイマ専用プロセッサ58は、次式(3)に基づいて角度クロックの周期を算出する。
角度クロックの周期=エッジ間時間/12 ・・・(3)
式(3)のエッジ間時間はS400で算出された値である。また、S406は欠歯フラグ1がオンの場合に実行されるので、今回、図2のエッジ検出処理を実行するトリガとなるエッジは、欠歯部の終了パルスのエッジである。
When the determination in S402 is No and the missing tooth flag 1 is on, in S406, the timer dedicated processor 58 calculates the period of the angle clock based on the following equation (3).
Angular clock period = time between edges / 12 (3)
The inter-edge time in Equation (3) is the value calculated in S400. Further, since S406 is executed when the missing tooth flag 1 is on, the edge serving as a trigger for executing the edge detection processing of FIG. 2 this time is the edge of the end pulse of the missing tooth portion.

したがって、エッジ間時間の間に角度カウンタが角度クロックのパルス数をカウントするエッジ間カウント数は12=4×3である。そこで、式(3)において、エッジ間時間を12で除算することにより、角度クロックの周期を算出できる。S406の実行後、処理はS408に移行する。   Therefore, the inter-edge count number at which the angle counter counts the number of pulses of the angle clock during the inter-edge time is 12 = 4 × 3. Therefore, in the equation (3), the period of the angle clock can be calculated by dividing the inter-edge time by 12. After execution of S406, the process proceeds to S408.

S408においてタイマ専用プロセッサ58は、S404またはS406で算出した周期を、今回発生したクランク信号のパルスと次回発生するクランク信号のパルスとの間でクロック生成部60が生成する角度クロックの周期として設定する。   In S408, the timer processor 58 sets the cycle calculated in S404 or S406 as the cycle of the angle clock generated by the clock generation unit 60 between the pulse of the crank signal generated this time and the pulse of the crank signal generated next time. .

ここで、図6に示すように、エッジ検出部52がクランク信号のパルスのエッジを検出すると、クロック生成部60において、ハードウェアにより目標値カウンタ200にパルス列のエッジ間カウント数を加算して更新する。これにより、クロック生成部60は、目標値カウンタ200の値に達するまで角度クロックを生成する。そして、角度カウンタ210は、目標値カウンタ200まで角度クロックをカウントする。   Here, as shown in FIG. 6, when the edge detection unit 52 detects the edge of the pulse of the crank signal, the clock generation unit 60 adds and updates the count value between the edges of the pulse train to the target value counter 200 by hardware. To do. Thereby, the clock generation unit 60 generates an angle clock until the value of the target value counter 200 is reached. Then, the angle counter 210 counts the angle clock up to the target value counter 200.

そして、エッジ検出部52は、クランク信号のパルのエッジを検出すると、タイマ専用プロセッサ58にエッジ検出処理300の実行を要求する。後述するように、エッジ検出処理300においてタイマ専用プロセッサ58は、メインCPU30に欠歯判定処理302の実行を要求する。   When the edge detection unit 52 detects the pal edge of the crank signal, the edge detection unit 52 requests the timer dedicated processor 58 to execute the edge detection processing 300. As will be described later, in the edge detection process 300, the timer dedicated processor 58 requests the main CPU 30 to execute the missing tooth determination process 302.

後述するように、欠歯判定処理302においてメインCPU30は、今回エッジ検出部52が検出したエッジが欠歯部の開始パルスのエッジであるか否かを判定する。欠歯部の開始パルスのエッジであれば、メインCPU30は、タイマ専用プロセッサ58に欠歯事前処理304の実行を要求する。   As will be described later, in the missing tooth determination process 302, the main CPU 30 determines whether or not the edge detected by the edge detection unit 52 this time is the edge of the start pulse of the missing tooth part. If it is the edge of the start pulse of the missing tooth portion, the main CPU 30 requests the timer dedicated processor 58 to execute the missing tooth preliminary process 304.

後述するように、欠歯事前処理304においてタイマ専用プロセッサ58は、目標値カウンタにパルス列のエッジ間カウント数の2倍の値をソフトウェアにより加算して更新する。これにより、欠歯部においてパルス列のエッジ間カウント数の3倍の値が目標値カウンタに設定される。これにより、欠歯部において角度クロックは途切れることなく生成される。   As will be described later, in the missing tooth pre-processing 304, the timer processor 58 updates the target value counter by adding a value twice the number of counts between edges of the pulse train to the target value counter. Accordingly, a value that is three times the number of counts between edges of the pulse train is set in the target value counter at the missing tooth portion. As a result, the angle clock is generated without interruption at the missing tooth portion.

しかし、図7に示すように、エッジ検出部52がエッジを検出してエッジ検出処理310の実行をタイマ専用プロセッサ58に要求したときに、タイマ専用プロセッサ58が他処理を実行中のためにエッジ検出処理310の実行が遅れることがある。   However, as shown in FIG. 7, when the edge detection unit 52 detects the edge and requests the timer dedicated processor 58 to execute the edge detection processing 310, the timer dedicated processor 58 is executing the other processing and the edge Execution of the detection process 310 may be delayed.

また、エッジ検出処理310において欠歯判定処理312の実行を要求されたときにメインCPU30が他処理を実行中のために、欠歯判定処理312の実行が遅れることがある。すると、メインCPU30が欠歯判定処理312において要求するタイマ専用プロセッサ58による欠歯事前処理314の実行が遅れる。その結果、欠歯部において角度クロックが生成されない期間が生じるおそれがある。   In addition, when the execution of the missing tooth determination process 312 is requested in the edge detection process 310, the execution of the missing tooth determination process 312 may be delayed because the main CPU 30 is executing another process. Then, the execution of the missing tooth preliminary process 314 by the timer dedicated processor 58 requested by the main CPU 30 in the missing tooth determination process 312 is delayed. As a result, there may be a period in which the angle clock is not generated in the missing tooth portion.

特に、エンジンの回転数が上昇すると欠歯部の時間間隔は短くなる。この場合、欠歯判定処理と欠歯事前処理との実行が遅れると、欠歯部において角度クロックが生成されない期間が生じやすくなる。   In particular, when the engine speed increases, the time interval of the missing tooth portion becomes shorter. In this case, if execution of the missing tooth determination process and the missing tooth preliminary process is delayed, a period during which no angle clock is generated is likely to occur in the missing tooth part.

そこで、図7に示すように、欠歯部の開始パルスの前に発生するパルスのエッジが検出されることにより実行されるエッジ検出処理320において、次式(4)に基づいて異常判定時間を算出する。式(4)のエッジ間時間として、S400で算出した時間を使用する。   Therefore, as shown in FIG. 7, in the edge detection process 320 executed by detecting the edge of the pulse generated before the start pulse of the missing tooth portion, the abnormality determination time is calculated based on the following equation (4). calculate. The time calculated in S400 is used as the edge-to-edge time in Equation (4).

異常判定時間=エッジ間時間×2+最大遅延時間 ・・・(4)
図7に示すように、異常判定時間の間に欠歯事前処理314が実行されないと、欠歯部において角度クロックの生成が停止していると判定できる。この場合、後述する異常事処理322が実行される。
Abnormal judgment time = time between edges x 2 + maximum delay time (4)
As shown in FIG. 7, if the missing tooth preliminary process 314 is not executed during the abnormality determination time, it can be determined that the generation of the angle clock is stopped in the missing tooth portion. In this case, an abnormal event process 322 described later is executed.

式(4)でエッジ間時間を2倍しているのは、欠歯部の開始パルスの前に発生するパルスのエッジからのエッジ間時間と、欠歯部の開始パルスのエッジからのエッジ間時間とを加算するためでる。そして、最大遅延時間は、エンジンの減速によりエッジの検出時刻が遅れると考えられる最大値に設定されている。   In equation (4), the time between edges is doubled because the time between edges from the edge of the pulse generated before the start pulse of the missing tooth part and the edge from the edge of the start pulse of the missing tooth part To add time. The maximum delay time is set to a maximum value at which the edge detection time is considered to be delayed due to engine deceleration.

ここで、欠歯部において実行されるエッジ検出処理310において、式(4)から算出される異常判定時間によりエッジ検出処理320で算出された異常判定時間が更新されると、図7において異常判定時間が後方にずれる。   Here, in the edge detection processing 310 executed in the missing tooth portion, when the abnormality determination time calculated in the edge detection processing 320 is updated with the abnormality determination time calculated from the equation (4), the abnormality determination in FIG. Time shifts backwards.

したがって、欠歯部において実行されるエッジ検出処理310により異常判定時間が算出されないように、S410においてタイマ専用プロセッサ58は、欠歯フラグ2がオンであるか否かを判定する。   Therefore, the timer dedicated processor 58 determines whether or not the missing tooth flag 2 is ON in S410 so that the abnormality determination time is not calculated by the edge detection processing 310 executed in the missing tooth portion.

欠歯フラグ2は、メインCPU30が後述する欠歯判定処理において欠歯部の開始エッジの前のエッジを検出するとオンに設定する。メインCPU30が欠歯部の開始エッジの前のエッジを検出して欠歯フラグ2をオンに設定している状態で、エッジ検出部52が図2のエッジ検出処理の実行をタイマ専用プロセッサ58に要求するトリガとなるエッジは、欠歯部の開始パルスのエッジである。   The missing tooth flag 2 is set to ON when the main CPU 30 detects an edge before the start edge of the missing tooth portion in the missing tooth determination process described later. In the state where the main CPU 30 detects the edge before the start edge of the missing tooth portion and sets the missing tooth flag 2 to ON, the edge detecting portion 52 executes the edge detection processing of FIG. The requested trigger edge is the edge of the start pulse of the missing tooth portion.

したがって、欠歯フラグ2がオンのときに実行されるエッジ検出処理では、異常判定時
間の算出を回避する必要がある。そこで、S410の判定がYesであり、欠歯フラグ2がオンの場合、タイマ専用プロセッサ58は、S412〜S416を実行せずS418に処理を移行する。S410の判定がNoであり、欠歯フラグ2がオフの場合、タイマ専用プロセッサ58は、S412〜S416を実行する。
Therefore, in the edge detection process executed when the missing tooth flag 2 is on, it is necessary to avoid calculation of the abnormality determination time. Therefore, if the determination in S410 is Yes and the missing tooth flag 2 is on, the timer-dedicated processor 58 does not execute S412 to S416, and proceeds to S418. When the determination in S410 is No and the missing tooth flag 2 is off, the timer dedicated processor 58 executes S412 to S416.

S412においてタイマ専用プロセッサ58は、欠歯部において角度クロックの生成が停止しているか否かを判定するための異常判定時間を、式(4)に基づいて算出する。
S414においてタイマ専用プロセッサ58は、次式(5)に基づき、S412で算出した異常判定時間を今回のエッジ検出時刻に加算して異常判定時刻を算出する。
In S <b> 412, the timer dedicated processor 58 calculates an abnormality determination time for determining whether or not the generation of the angle clock is stopped at the missing tooth portion based on the equation (4).
In S414, the timer processor 58 calculates the abnormality determination time by adding the abnormality determination time calculated in S412 to the current edge detection time based on the following equation (5).

異常判定時刻=今回のエッジ検出時刻+異常判定時間 ・・・(5)
S416においてタイマ専用プロセッサ58は、コンペア部56に異常判定時刻を設定する。後述するように、コンペア部56は、タイマ専用プロセッサ58が設定した異常判定時刻に、カウンタ部54の対応する時間カウンタが達すると、欠歯部で角度クロックの生成が停止している異常に対する異常時処理の実行をタイマ専用プロセッサ58に要求する。
Abnormality determination time = current edge detection time + abnormality determination time (5)
In S416, the timer dedicated processor 58 sets the abnormality determination time in the compare unit 56. As will be described later, the compare unit 56 detects an abnormality with respect to an abnormality in which the generation of the angle clock is stopped at the missing tooth portion when the time counter corresponding to the counter unit 54 reaches the abnormality determination time set by the timer dedicated processor 58. The timer dedicated processor 58 is requested to execute the time process.

言い換えると、コンペア部56は、欠落部において開始パルスからの経過時間が角度クロックの停止を判定するための停止判定時間に達すると、異常時処理の実行をタイマ専用プロセッサ58に要求する。この場合、停止判定時間は、式(4)の異常判定時間からエッジ間時間を減算した時間である。   In other words, when the elapsed time from the start pulse reaches the stop determination time for determining the stop of the angle clock in the missing part, the compare unit 56 requests the timer dedicated processor 58 to execute the abnormality process. In this case, the stop determination time is a time obtained by subtracting the edge-to-edge time from the abnormality determination time of Expression (4).

尚、欠歯部の開始パルスと開始パルスの前に発生するパルスとを除くパルスのエッジが検出されるときにS412〜S416が実行されるときも、式(5)において、式(4)で算出した異常判定時間を今回のエッジ検出時刻に加算して異常判定時刻が設定される。しかし、異常判定時刻に時間カウンタが達することは欠歯部以外のパルス間ではないと考えられるので、S412〜S416を実行しても問題はない。   It should be noted that when S412-S416 is executed when the edge of a pulse other than the start pulse of the missing tooth part and the pulse generated before the start pulse is detected, the expression (4) in the expression (5) The abnormality determination time is set by adding the calculated abnormality determination time to the current edge detection time. However, since it is considered that the time counter reaches the abnormality determination time is not between pulses other than the missing tooth portion, there is no problem even if S412 to S416 are executed.

S418においてタイマ専用プロセッサ58は、メインCPU30に欠歯判定処理の実行を要求する。
(2)欠歯判定処理
タイマ専用プロセッサ58から欠歯判定処理の実行を要求されると、図3のS420においてメインCPU30の欠歯判定部32は、現在のエッジカウンタの値が360°CAの間においてクランク信号のパルスをカウントする最大値であるか否かを判定する。
In S418, the timer dedicated processor 58 requests the main CPU 30 to execute the missing tooth determination process.
(2) Missing tooth determination processing When the timer dedicated processor 58 requests execution of missing tooth determination processing, in S420 of FIG. 3, the missing tooth determination unit 32 of the main CPU 30 determines that the current edge counter value is 360 ° CA. It is determined whether or not it is the maximum value for counting the pulses of the crank signal.

S420の判定がNoであり、エッジカウンタの値が最大値ではない場合、S422において欠歯判定部32はエッジカウンタを+1する。S420の判定がYesであり、エッジカウンタが最大値の場合、S424において欠歯判定部32は、エッジカウンタを0に設定する。   If the determination in S420 is No and the value of the edge counter is not the maximum value, the missing tooth determination unit 32 increments the edge counter by 1 in S422. If the determination in S420 is Yes and the edge counter is the maximum value, the missing tooth determination unit 32 sets the edge counter to 0 in S424.

欠歯判定部32がS422またはS424を実行することにより、エッジカウンタはエッジ検出部52が今回検出したクランク信号のエッジ位置に対応した値に設定される。
S426において欠歯判定部32は、エッジカウンタの値が欠歯部の開始パルスのエッジに対応するか否かを判定する。
When the missing tooth determination unit 32 executes S422 or S424, the edge counter is set to a value corresponding to the edge position of the crank signal detected by the edge detection unit 52 this time.
In S426, the missing tooth determination unit 32 determines whether or not the value of the edge counter corresponds to the edge of the start pulse of the missing tooth part.

S426の判定がYesであり、エッジカウンタの値が欠歯部の開始パルスのエッジに対応する場合、S428において欠歯判定部32は、欠歯フラグ1をオンに設定する。さらに、S430において欠歯判定部32は、タイマ専用プロセッサ58に欠歯事前処理の実行を要求し、S440に処理を移行する。   When the determination in S426 is Yes and the value of the edge counter corresponds to the edge of the start pulse of the missing tooth part, the missing tooth determination part 32 sets the missing tooth flag 1 to ON in S428. Further, in S430, the missing tooth determination unit 32 requests the timer dedicated processor 58 to execute the missing tooth preliminary process, and the process proceeds to S440.

S426の判定がNoであり、エッジカウンタの値が欠歯部の開始パルのエッジに対応しない場合、S432において欠歯判定部32は、エッジカウンタの値が欠歯部の開始パルスの前に発生するパルスのエッジに対応するか否かを判定する。   If the determination in S426 is No and the value of the edge counter does not correspond to the edge of the start pal of the missing tooth part, the missing tooth determination part 32 generates the edge counter value before the start pulse of the missing tooth part in S432 It is determined whether or not it corresponds to the edge of the pulse to be performed.

S432の判定がYesであり、エッジカウンタの値が欠歯部の開始パルスの前に発生するパルスのエッジに対応する場合、S434において欠歯判定部32は、欠歯フラグ2をオンに設定し処理をS438に移行する。   If the determination in S432 is Yes and the value of the edge counter corresponds to the edge of the pulse generated before the start pulse of the missing tooth part, the missing tooth determination part 32 sets the missing tooth flag 2 to ON in S434. The process proceeds to S438.

S432の判定がNoであり、エッジカウンタの値が欠歯部の開始パルスの前に発生するパルスのエッジに対応しない場合、S436において欠歯判定部32は、欠歯フラグ2をオフに設定し、処理をS438に移行する。   When the determination in S432 is No and the value of the edge counter does not correspond to the edge of the pulse generated before the start pulse of the missing tooth part, the missing tooth determination part 32 sets the missing tooth flag 2 to OFF in S436. The process proceeds to S438.

S438において欠歯判定部32は、欠歯フラグ1をオフに設定する。S440においてメインCPU30は、点火制御の実行、噴射制御の実行の角度同期イベントの実行タイミングをコンペア部56に設定する。コンペア部56は、対応する角度カウンタが設定された角度同期イベントの実行タイミングになると、噴射モジュール、点火モジュールに実行信号を出力する。   In S438, the missing tooth determination unit 32 sets the missing tooth flag 1 to OFF. In S440, the main CPU 30 sets the execution timing of the angle synchronization event for executing the ignition control and executing the injection control in the compare unit 56. The compare unit 56 outputs an execution signal to the injection module and the ignition module at the execution timing of the angle synchronization event in which the corresponding angle counter is set.

(3)欠歯事前処理
メインCPU30から欠歯事前処理の実行を要求されると、図4のS450においてタイマ専用プロセッサ58は、異常処理フラグがオンであるか否かを判定する。異常処理フラグは、図2のエッジ検出処理でコンペア部56に設定された異常判定時刻にカウンタ部54の対応する時間カウンタが達すると、次の図5で説明する異常時処理においてオンに設定される。
(3) Missing tooth pre-processing When the main CPU 30 requests execution of the missing tooth pre-processing, the timer dedicated processor 58 determines whether or not the abnormality processing flag is on in S450 of FIG. When the time counter corresponding to the counter unit 54 reaches the abnormality determination time set in the compare unit 56 in the edge detection processing of FIG. 2, the abnormality processing flag is set to ON in the processing at the time of abnormality described in FIG. The

異常処理フラグがオンの場合、図5の異常時処理において、タイマ専用プロセッサ58が図4の欠歯事前処理の代わりに、欠歯部における目標値カウンタの設定を実行したことを示している。   When the abnormality processing flag is ON, it is indicated that, in the abnormality processing of FIG. 5, the timer dedicated processor 58 has executed setting of the target value counter in the missing tooth portion instead of the missing tooth preliminary processing of FIG. 4.

したがって、S450の判定がYesであり、異常処理フラグがオンの場合、S452においてタイマ専用プロセッサ58は、異常処理フラグをオフに設定し、その他の処理は実行せずに本処理を終了する。   Therefore, if the determination in S450 is Yes and the abnormal process flag is on, in S452, the timer dedicated processor 58 sets the abnormal process flag to off, and ends this process without executing other processes.

異常処理フラグがオフの状態で図4の欠歯事前処理が実行されることは、メインCPU30が図3の欠歯判定処理を実行したことにより、図4の欠歯事前処理が実行されていることを表している。したがって、図4の欠歯事前処理において、タイマ専用プロセッサ58は、欠歯部の終了パルスが発生するときに角度カウンタが達する目標値カウンタの値を設定する必要がある。   4 is executed in the state where the abnormality processing flag is OFF, the fact that the main CPU 30 has executed the missing tooth determination process in FIG. Represents that. Therefore, in the missing tooth pre-processing shown in FIG. 4, the timer dedicated processor 58 needs to set the value of the target value counter that the angle counter reaches when the missing tooth end pulse is generated.

そこで、S450の判定がNoであり、異常処理フラグがオフの場合、S454においてタイマ専用プロセッサ58は、コンペア部56に設定した異常判定時刻をクリアする。これにより、コンペア部56は、異常判定時刻と対応する時間カウンタとの比較を実行しない。   Therefore, if the determination in S450 is No and the abnormality processing flag is off, the timer processor 58 clears the abnormality determination time set in the compare unit 56 in S454. As a result, the compare unit 56 does not compare the abnormality determination time with the corresponding time counter.

S456においてタイマ専用プロセッサ58は、次式(6)に基づいて、欠歯部の開始パルスにおいて、クロック生成部60の目標値カウンタにハードウェアにより設定したパルス列のエッジ間カウント数に加算する残りのカウント数である欠歯カウント数を算出する。式(6)において、エッジ間カウント数はパルス列のエッジ間カウント数であり、欠歯数は本実施形態では2である。   In S456, based on the following equation (6), the timer dedicated processor 58 adds the remaining pulses to be added to the inter-edge count number of the pulse train set by the hardware in the target value counter of the clock generation unit 60 in the missing tooth start pulse. The missing tooth count which is the count is calculated. In equation (6), the count number between edges is the count number between edges of the pulse train, and the number of missing teeth is 2 in this embodiment.

欠歯カウント数=エッジ間カウント数×欠歯数 ・・・(6)
そしてS458においてタイマ専用プロセッサ58は、次式(7)に基づいて、欠歯部の終了パルスが発生するときに角度カウンタが達する目標値カウンタの値を算出し、目標値カウンタに設定する。
Missing tooth count = Inter-edge count x Missing tooth number (6)
In S458, the timer processor 58 calculates the value of the target value counter that the angle counter reaches when the missing tooth end pulse is generated based on the following equation (7), and sets the target value counter.

目標値カウンタ=目標値カウンタ+欠歯カウント数 ・・・(7)
(4)異常時処理
カウンタ部54の時間カウンタが図2のエッジ検出処理により設定された異常判定時刻に達すると、タイマ専用プロセッサ58は、図5の異常事処理の実行をコンペア部56から要求される。
Target value counter = target value counter + missing tooth count (7)
(4) Processing at the time of abnormality When the time counter of the counter unit 54 reaches the abnormality determination time set by the edge detection processing of FIG. 2, the timer dedicated processor 58 requests the execution of the abnormal event processing of FIG. Is done.

S460においてタイマ専用プロセッサ58は、コンペア部56に設定した異常判定時刻をクリアする。これにより、コンペア部56は、時間カウンタと異常判定時刻との比較を停止する。図5のS462、S464は図4のS456、S458と同一処理であるから説明を省略する。   In S460, the timer dedicated processor 58 clears the abnormality determination time set in the compare unit 56. Thereby, the compare unit 56 stops the comparison between the time counter and the abnormality determination time. Since S462 and S464 in FIG. 5 are the same processing as S456 and S458 in FIG.

S466においてタイマ専用プロセッサ58は、次式(8)に基づいて、時間カウンタが異常判定時刻に達してからエッジ検出部52が欠歯部の終了パルスのエッジを検出するまでの残り時間を算出する。欠歯部において、開始パルスのエッジ検出時刻から時間カウンタが異常判定時刻に達するまでには、(エッジ間時間+最大遅延時間)が経過している。   In S466, the timer dedicated processor 58 calculates the remaining time from when the time counter reaches the abnormality determination time until the edge detection unit 52 detects the edge of the end pulse of the missing tooth portion based on the following equation (8). . In the missing tooth part, (inter-edge time + maximum delay time) elapses from the edge detection time of the start pulse until the time counter reaches the abnormality determination time.

残り時間=欠歯時間−(エッジ間時間+最大遅延時間)
=エッジ間時間×2−最大遅延時間 ・・・(8)
式(8)において使用するエッジ間時間は、最新のエッジ検出処理で算出されたパルス列のエッジ間時間である。そして、欠歯時間は最新のエッジ間時間を3倍した時間である。したがって、エッジ検出部52が欠歯部の終了パルスのエッジを検出するまでの残り時間は、エッジ間時間の2倍から最大遅延時間を減算した時間になる。
Remaining time = missing tooth time-(time between edges + maximum delay time)
= Edge time x 2-Maximum delay time (8)
The time between edges used in Expression (8) is the time between edges of the pulse train calculated by the latest edge detection processing. The missing tooth time is a time obtained by triple the latest time between edges. Therefore, the remaining time until the edge detection unit 52 detects the edge of the end pulse of the missing tooth portion is a time obtained by subtracting the maximum delay time from twice the inter-edge time.

S468においてタイマ専用プロセッサ58は、式(8)で算出した残り時間の間に、クロック生成部60が生成する角度クロックの周期を次式(9)に基づいて算出する。
角度クロック周期=残り時間/欠歯カウント数 ・・・(9)
欠歯部では、エッジ検出部52がエッジを検出したときにハードウェアにより目標値カウンタに加算されたパルス列のエッジ間カウント数のクロックが発生している。したがって、残り時間をS462で算出される欠歯カウント数で除算すれば、残り時間でクロック生成部60が生成する角度クロックの周期が算出できる。
In S468, the timer dedicated processor 58 calculates the period of the angle clock generated by the clock generator 60 based on the following expression (9) during the remaining time calculated by the expression (8).
Angular clock cycle = remaining time / missing tooth count (9)
In the missing tooth portion, when the edge detection unit 52 detects an edge, a clock of the number of counts between edges of the pulse train added to the target value counter by hardware is generated. Therefore, if the remaining time is divided by the missing tooth count calculated in S462, the period of the angle clock generated by the clock generation unit 60 with the remaining time can be calculated.

式(8)で算出される残り時間は、欠歯部で異常時処理が実行されない場合よりも短いので、式(9)により算出される周期も短くなる。したがって、図7に示すように、角度カウンタは残り時間の間で目標カウント数まで速やかにカウントアップする。   Since the remaining time calculated by the equation (8) is shorter than the case where the abnormal time process is not executed at the missing tooth portion, the cycle calculated by the equation (9) is also shortened. Therefore, as shown in FIG. 7, the angle counter quickly counts up to the target count during the remaining time.

S470においてタイマ専用プロセッサ58は、S468で算出した周期を、角度クロックの周期として設定する。S472においてタイマ専用プロセッサ58は、異常処理フラグをオンにする。   In S470, the timer processor 58 sets the cycle calculated in S468 as the angle clock cycle. In S472, the timer processor 58 turns on the abnormality processing flag.

異常処理フラグがオンに設定されることにより、図4の欠歯事前処理において、目標カウント数が再度設定されることを防止できる。
[1−3.効果]
以上説明した第1実施形態では、以下の効果を得ることができる。
By setting the abnormality processing flag to ON, it is possible to prevent the target count number from being set again in the missing tooth preliminary processing in FIG.
[1-3. effect]
In the first embodiment described above, the following effects can be obtained.

(1)欠歯部において角度クロックの生成が停止していることをコンペア部56がハードウェアにより検出し、コンペア部56がタイマ専用プロセッサ58に目標値カウンタの値と、欠歯部の残り時間で生成する角度クロックの周期とを設定する異常時処理の実行を要求する。   (1) The compare unit 56 detects that the generation of the angle clock at the missing tooth portion is stopped by hardware, and the compare unit 56 sends the value of the target value counter to the timer dedicated processor 58 and the remaining time of the missing tooth portion. The execution of the process at the time of abnormality that sets the cycle of the angle clock to be generated is requested.

これにより、メインCPU30のソフトウェアによる欠歯判定処理の実行と、欠歯判定処理から要求されるタイマ専用プロセッサ58のソフトウェアによる欠歯事前処理の実行とが他のソフトウェア処理のために遅れても、角度クロックの生成が停止している期間を極力短くすることができる。   As a result, even if the execution of the missing tooth determination process by the software of the main CPU 30 and the execution of the missing tooth preliminary process by the software of the timer dedicated processor 58 required from the missing tooth determination process are delayed due to other software processes, The period during which the generation of the angle clock is stopped can be shortened as much as possible.

その結果、図7に示すように、メインCPU30が点火制御により設定した角度カウンタの値により設定される点火タイミングが角度クロックが生成されないために遅れても、遅れを極力短くすることができる。   As a result, as shown in FIG. 7, even if the ignition timing set by the value of the angle counter set by the main CPU 30 by the ignition control is delayed because the angle clock is not generated, the delay can be shortened as much as possible.

(2)欠歯部において角度クロックの生成が停止していることが検出されると、クランク信号の次のパルスが発生するまでの残り時間を、正常であれば生成される残りの角度クロックのクロック数で除算して角度クロックの周期を算出する。これにより、クランク信号の次のパルスが発生するときに、正しいカウント数の角度クロックが生成されている。   (2) When it is detected that the generation of the angle clock is stopped at the missing tooth portion, the remaining time until the next pulse of the crank signal is generated is set to the remaining angle clock generated if normal. Divide by the number of clocks to calculate the period of the angle clock. Thus, when the next pulse of the crank signal is generated, an angle clock having a correct count number is generated.

以上説明した第1実施形態において、欠歯部が欠落部に対応し、ECU10がエンジン制御装置に対応し、メインCPU30が欠落判定装置に対応し、欠歯判定部32が欠落判定部に対応する。   In the first embodiment described above, the missing tooth portion corresponds to the missing portion, the ECU 10 corresponds to the engine control device, the main CPU 30 corresponds to the missing determination device, and the missing tooth determination portion 32 corresponds to the missing determination portion. .

また、タイマ制御モジュール50がクロック生成装置に対応し、カウンタ部54が角度カウンタに対応し、タイマ専用プロセッサ58が周期算出部と目標設定部とに対応し、コンペア部56が停止判定部に対応し、クロック生成部60がクロック生成部と目標設定部とに対応する。   The timer control module 50 corresponds to the clock generation device, the counter unit 54 corresponds to the angle counter, the timer dedicated processor 58 corresponds to the cycle calculation unit and the target setting unit, and the compare unit 56 corresponds to the stop determination unit. The clock generation unit 60 corresponds to the clock generation unit and the target setting unit.

また、第1実施形態において、S400〜S408、S466〜S470が周期算出部としてのタイマ専用プロセッサ58の処理に対応し、S420〜S438が欠歯判定部32の処理に対応し、S456、S458、S462、S464が目標設定部としてのタイマ専用プロセッサ58の処理に対応する。   In the first embodiment, S400 to S408 and S466 to S470 correspond to the processing of the timer dedicated processor 58 as the period calculation unit, S420 to S438 correspond to the processing of the missing tooth determination unit 32, S456, S458, S462 and S464 correspond to the processing of the timer dedicated processor 58 as the target setting unit.

[2.第2実施形態]
[2−1.構成]
第2実施形態のエンジン制御装置としてのECUの構成は、第1実施形態のECU10の構成と実質的に同一であるから、説明を省略する。
[2. Second Embodiment]
[2-1. Constitution]
Since the configuration of the ECU as the engine control device of the second embodiment is substantially the same as the configuration of the ECU 10 of the first embodiment, description thereof will be omitted.

[2−2.処理]
第2実施形態では、欠歯部において角度クロックの生成が停止していることを、目標値カウンタが更新されず目標値カウンタと角度カウンタとが一致している経過時間に基づいて検出する点が第1実施形態と異なっている。
[2-2. processing]
In the second embodiment, the point that the generation of the angle clock in the missing tooth portion is detected based on the elapsed time in which the target value counter and the angle counter coincide with each other without updating the target value counter. This is different from the first embodiment.

第2実施形態では、以下に説明するエッジ検出処理と異常判定処理以外に、第1実施形態と同じ欠歯判定処理と欠歯事前処理とを実行する。ただし、第2実施形態では、第1実施形態の欠歯フラグ2は使用しないので、図3に示す欠歯判定処理のS432〜S436は省略される。   In the second embodiment, in addition to the edge detection process and the abnormality determination process described below, the same missing tooth determination process and missing tooth preliminary process as in the first embodiment are executed. However, in the second embodiment, since the missing tooth flag 2 of the first embodiment is not used, S432 to S436 of the missing tooth determination process shown in FIG. 3 are omitted.

(1)エッジ検出処理
エッジ検出部52は、クランク信号のパルスのエッジを検出すると、タイマ専用プロセ
ッサ58に図8のフローチャートが示すエッジ検出処理の実行を要求する。タイマ専用プロセッサ58は、他の処理を実行中でなければ、エッジ検出部52からの要求にしたがいエッジ検出処理を実行する。
(1) Edge Detection Processing When detecting the edge of the crank signal pulse, the edge detection unit 52 requests the timer dedicated processor 58 to execute the edge detection processing shown in the flowchart of FIG. The timer dedicated processor 58 executes edge detection processing in response to a request from the edge detection unit 52 unless other processing is being executed.

図8のS480〜S488、S492は図2のS400〜S408、S418と実質的に同一処理であるから説明を省略する。
S490においてタイマ専用プロセッサ58は、エッジ検出部52がクランク信号のパルスのエッジを検出したときにクロック生成部60においてハードウェアにより目標値カウンタに設定した目標カウント数をコンペア部56に設定する。これにより、コンペア部56は、目標カウント数に角度カウンタが達すると、角度クロックの生成が停止している時間を計測する異常判定処理の実行をタイマ専用プロセッサ58に要求する。
Since S480 to S488 and S492 in FIG. 8 are substantially the same as S400 to S408 and S418 in FIG.
In S490, the timer dedicated processor 58 sets the target count number set in the target value counter by the hardware in the clock generation unit 60 in the compare unit 56 when the edge detection unit 52 detects the edge of the pulse of the crank signal. As a result, when the angle counter reaches the target count, the compare unit 56 requests the timer dedicated processor 58 to execute an abnormality determination process for measuring the time during which the generation of the angle clock is stopped.

(2)異常判定処理
タイマ専用プロセッサ58は、目標カウント数に角度カウンタが一致すると、コンペア部56からのハードウェアによる要求により図9の異常判定処理を実行する。図10の符号330が異常判定処理に対応する。
(2) Abnormality determination processing When the angle counter matches the target count number, the timer dedicated processor 58 executes the abnormality determination processing in FIG. 9 in response to a hardware request from the compare unit 56. Reference numeral 330 in FIG. 10 corresponds to the abnormality determination process.

S500においてタイマ専用プロセッサ58は、目標値カウンタと角度カウンタとが一致しているか否かを判定する。S500の判定がNoであり、目標値カウンタと角度カウンタとが不一致になると本処理は終了する。   In S500, the timer dedicated processor 58 determines whether or not the target value counter matches the angle counter. If the determination in S500 is No and the target value counter and the angle counter do not match, this process ends.

S500の判定がYesであり、目標値カウンタと角度カウンタとが一致している場合、S502においてタイマ専用プロセッサ58は、目標値カウンタと角度カウンタとが一致している時間を計測するために、一致時間を+1する。   If the determination in S500 is Yes and the target value counter and the angle counter match, the timer processor 58 in S502 matches the target value counter and the angle counter in order to measure the time for which the target value counter and the angle counter match. Add 1 to the time.

S504においてタイマ専用プロセッサ58は、目標値カウンタと角度カウンタとが一致している一致時間が、欠歯部で角度クロックの停止を判定するための継続時間以上であるか否かを判定する。S504の判定がNoであり、一致時間が継続時間未満の場合、処理はS500に移行する。継続時間には、例えば、第1実施形態の最大遅延時間が設定される。   In S504, the timer dedicated processor 58 determines whether or not the coincidence time in which the target value counter coincides with the angle counter is equal to or longer than the duration for determining the stop of the angle clock at the missing tooth portion. If the determination in S504 is No and the matching time is less than the duration, the process proceeds to S500. For example, the maximum delay time of the first embodiment is set as the duration time.

一致時間が継続時間以上になる前に、欠歯判定部32が欠歯判定処理を実行して今回のパルスが欠歯部の開始パルスであると判定し、タイマ専用プロセッサ58が欠歯事前処理を実行すると、目標値カウンタに欠歯カウント数が加算されて更新される。すると、S500の判定がNoになり、S506〜S516の処理は実行されずに本処理は終了する。   Before the coincidence time becomes equal to or longer than the duration time, the missing tooth determination unit 32 executes the missing tooth determination process to determine that the current pulse is the start pulse of the missing tooth part, and the timer dedicated processor 58 performs the missing tooth preliminary process. Is executed, the missing tooth count is added to the target value counter and updated. Then, the determination in S500 becomes No, and the process ends without executing the processes in S506 to S516.

S504の判定がYesであり、図10に示すように、一致時間が継続時間以上になると、S506〜S516の処理が実行される。S506〜S516の処理は、図5のS462〜S472の処理と実質的に同一であるから説明を省略する。   If the determination in S504 is Yes and the match time is equal to or longer than the duration as shown in FIG. 10, the processes in S506 to S516 are executed. The processing of S506 to S516 is substantially the same as the processing of S462 to S472 in FIG.

[2−3.効果]
以上説明した第2実施形態では、第1実施形態の効果(1)、(2)と同じ効果を得ることができる。ただし、第2実施形態では、第1の実施形態の効果(1)における「異常時処理の実行を要求する。」を「異常判定処理の実行を要求する。」と読み替える。
[2-3. effect]
In the second embodiment described above, the same effects as the effects (1) and (2) of the first embodiment can be obtained. However, in the second embodiment, “request execution of abnormality process” in effect (1) of the first embodiment is read as “request execution of abnormality determination process”.

以上説明した第2実施形態において、S480〜S488、S510〜S514が周期算出部としてのタイマ専用プロセッサ58の処理に対応し、S500〜S504が停止判定部としてのタイマ専用プロセッサ58の処理に対応し、S506、S508が目標設定部としてのタイマ専用プロセッサ58の処理に対応する。   In the second embodiment described above, S480 to S488 and S510 to S514 correspond to the processing of the timer dedicated processor 58 as the period calculation unit, and S500 to S504 correspond to the processing of the timer dedicated processor 58 as the stop determination unit. , S506, and S508 correspond to processing of the timer dedicated processor 58 as the target setting unit.

第2実施形態では、目標カウント数に角度カウンタが一致すると、コンペア部56からのハードウェアによる要求により、タイマ専用プロセッサ58が図9の異常判定処理を実行する。したがって、コンペア部56も停止判定部に対応する。   In the second embodiment, when the angle counter matches the target count, the timer dedicated processor 58 executes the abnormality determination process of FIG. 9 in response to a hardware request from the compare unit 56. Therefore, the compare unit 56 also corresponds to the stop determination unit.

[3.他の実施形態]
(1)上記実施形態では、クロック信号のパルス間の周期を除算する逓倍数を、基準となるパルス列のパルス間では4に設定した。当然のことながら、逓倍数は4に限るものではなく、パルス列のパルス間の角度間隔の大きさ、ならびに要求される角度クロックの分解能に応じて適宜設定される。
[3. Other Embodiments]
(1) In the above embodiment, the multiplication number for dividing the period between pulses of the clock signal is set to 4 between the pulses of the reference pulse train. As a matter of course, the multiplication number is not limited to 4, and is appropriately set according to the size of the angle interval between pulses of the pulse train and the required resolution of the angle clock.

(2)上記実施形態における一つの構成要素が有する複数の機能を複数の構成要素によって実現したり、一つの構成要素が有する一つの機能を複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を一つの構成要素によって実現したり、複数の構成要素によって実現される一つの機能を一つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。尚、特許請求の範囲に記載した文言のみによって特定される技術思想に含まれるあらゆる態様が本発明の実施形態である。   (2) A plurality of functions of one constituent element in the above embodiment may be realized by a plurality of constituent elements, or a single function of one constituent element may be realized by a plurality of constituent elements. In addition, a plurality of functions possessed by a plurality of constituent elements may be realized by one constituent element, or a single function realized by a plurality of constituent elements may be realized by one constituent element. Moreover, you may abbreviate | omit a part of structure of the said embodiment. In addition, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of the other embodiment. In addition, all the aspects included in the technical idea specified only by the wording described in the claims are embodiments of the present invention.

(3)上述したエンジン制御装置10の他、当該エンジン制御装置10を構成要素とするエンジン制御システム、当該エンジン制御装置10としてコンピュータを機能させるためのエンジン制御プログラム、このエンジン制御プログラムを記録した記録媒体、エンジン制御方法など、種々の形態で本発明を実現することもできる。   (3) In addition to the engine control device 10 described above, an engine control system including the engine control device 10 as a constituent element, an engine control program for causing a computer to function as the engine control device 10, and a record recording the engine control program The present invention can also be realized in various forms such as a medium and an engine control method.

10:ECU(エンジン制御装置)、20:マイコン、30:メインCPU(欠落判定装置)、32:欠歯判定部(欠落判定部)、50:タイマ制御モジュール(クロック生成装置)、54:カウンタ部(クロックカウンタ)、56コンペ部(停止判定部)、58:タイマ専用プロセッサ(周期算出部、目標値設定部、停止判定部)、60:クロック生成部 10: ECU (engine control device), 20: microcomputer, 30: main CPU (missing determination device), 32: missing tooth determination unit (missing determination unit), 50: timer control module (clock generation device), 54: counter unit (Clock counter), 56 competition section (stop determination section), 58: timer dedicated processor (cycle calculation section, target value setting section, stop determination section), 60: clock generation section

Claims (6)

欠落判定装置(30)とクロック生成装置(50)とを備えるエンジン制御装置(10)において、
前記欠落判定装置は、
エンジンのクランク軸が一定の角度回転する毎に発生するパルスを有するパルス列と、前記パルスが欠落しており前記パルスと前記パルスとの角度間隔が前記パルス列よりも大きい欠落部とを有するクランク信号において、今回発生した前記パルスが前記欠落部の開始を示す開始パルスであるか否かをソフトウェアにより判定するように構成された欠落判定部(32、S420〜S438)を備え、
前記クロック生成装置は、
前記パルスが発生する毎に、ソフトウェアにより、今回発生した前記パルスと前回発生した前記パルスとのパルス周期を前記パルスと前記パルスとの角度間隔に応じて予め設定された逓倍数で除算した値を角度クロックのクロック周期として算出するように構成された周期算出部(58、S400〜S408、S480〜S488)と、
前記角度クロックのクロック数をカウントする角度カウンタ(54)と、
前記パルスが発生する毎に設定される目標カウント数に前記角度カウンタが達するまで、前記周期算出部が算出する前記クロック周期で前記角度クロックを生成するように構成されたクロック生成部(60)と、
前記欠落部において前記クロック生成部による前記角度クロックの生成が停止しているか否かを、ハードウェアとソフトウェアとのうち少なくともハードウェアにより判定するように構成された停止判定部(56、58、S500〜S504)と、
今回発生した前記パルスが前記開始パルスであると前記欠落判定部が判定すると、前記欠落部の終了を示す終了パルスが発生するときに前記角度カウンタが達する前記目標カウント数をソフトウェアにより設定するように構成された目標設定部(58、S456、S458)と、
を備え、
今回発生した前記パルスが前記開始パルスであると前記欠落判定部が判定しておらず、前記欠落部において前記角度クロックの生成が停止していると前記停止判定部が判定する場合、前記目標設定部(S462、S464、S506、S508)は、前記終了パルスが発生するときに前記角度カウンタが達する前記目標カウント数をソフトウェアにより設定するように構成され、前記周期算出部(S466〜S470、S510〜S514)は、前記終了パルスが発生するまでに前記クロック生成部が生成する前記角度クロックの前記クロック周期を算出する用に構成されている、
エンジン制御装置。
In the engine control device (10) including the missing determination device (30) and the clock generation device (50),
The missing determination device includes:
In a crank signal having a pulse train having a pulse generated every time the crankshaft of the engine rotates by a certain angle, and a missing portion in which the pulse is missing and the angular interval between the pulse and the pulse is larger than the pulse train. A missing determination unit (32, S420 to S438) configured to determine by software whether the pulse generated this time is a start pulse indicating the start of the missing unit;
The clock generation device includes:
Each time the pulse is generated, a value obtained by dividing the pulse period between the pulse generated this time and the pulse generated last time by a multiplication number set in advance according to the angular interval between the pulse and the pulse is generated by software. A period calculation unit (58, S400 to S408, S480 to S488) configured to calculate the clock period of the angle clock;
An angle counter (54) for counting the number of clocks of the angle clock;
A clock generator (60) configured to generate the angle clock at the clock cycle calculated by the cycle calculator until the angle counter reaches a target count number set every time the pulse is generated; ,
A stop determination unit (56, 58, S500) configured to determine whether the generation of the angle clock by the clock generation unit in the missing part is stopped by at least hardware of hardware and software. To S504),
When the missing determination unit determines that the pulse generated this time is the start pulse, the target count number reached by the angle counter when the end pulse indicating the end of the missing portion is generated is set by software. A configured target setting unit (58, S456, S458);
With
When the missing determination unit does not determine that the pulse generated this time is the start pulse, and the stop determination unit determines that the generation of the angle clock is stopped in the missing unit, the target setting The units (S462, S464, S506, S508) are configured to set, by software, the target count number reached by the angle counter when the end pulse is generated, and the period calculation units (S466-S470, S510). S514) is configured to calculate the clock period of the angle clock generated by the clock generation unit until the end pulse is generated.
Engine control device.
請求項1に記載のエンジン制御装置において、
前記クロック生成部は、前記パルス列の前記パルスと前記パルスとの角度間隔において前記クロック生成部が生成する前記角度クロックのクロック数を、前記パルスが発生する毎にハードウェアにより前記目標カウント数に加算し、
前記目標設定部(S456、S458)は、今回発生した前記パルスが前記開始パルスであると前記欠落判定部が判定すると、前記終了パルスと前記開始パルスとの角度間隔から前記パルス列の前記パルス間の角度間隔を減算した角度間隔において前記クロック生成部が生成する前記角度クロックのクロック数をソフトウェアにより前記目標カウント数に加算することにより、前記終了パルスが発生するときに前記角度カウンタが達する前記目標カウント数を設定する、
エンジン制御装置。
The engine control device according to claim 1,
The clock generation unit adds the number of clocks of the angle clock generated by the clock generation unit at the angular interval between the pulses of the pulse train to the target count number by hardware each time the pulse is generated. And
When the missing determination unit determines that the currently generated pulse is the start pulse, the target setting unit (S456, S458) determines the interval between the pulses in the pulse train from the angular interval between the end pulse and the start pulse. The target count reached by the angle counter when the end pulse is generated by adding the number of clocks of the angle clock generated by the clock generation unit to the target count number by software at an angular interval obtained by subtracting the angular interval. Set the number,
Engine control device.
請求項1または2に記載のエンジン制御装置において、
前記パルスが発生する毎に前記周期算出部が前記クロック周期を算出すると、前記欠落
判定部は今回発生した前記パルスが前記開始パルスであるか否かを判定する、
エンジン制御装置。
The engine control device according to claim 1 or 2,
When the period calculation unit calculates the clock period every time the pulse occurs, the missing determination unit determines whether the pulse generated this time is the start pulse.
Engine control device.
請求項1から3のいずれか一項に記載のエンジン制御装置において、
前記停止判定部は、今回発生した前記パルスが前記開始パルスであると前記欠落判定部が判定していない状態で、前記欠落部において前記開始パルスからの経過時間が前記角度クロックの停止を判定するための停止判定時間に達すると、前記欠落部において前記角度クロックの生成が停止していると判定する、
エンジン制御装置。
In the engine control device according to any one of claims 1 to 3,
The stop determination unit determines that the elapsed time from the start pulse in the missing part is the stop of the angle clock in a state where the missing determination unit has not determined that the pulse generated this time is the start pulse. Determining that the generation of the angle clock is stopped at the missing portion when the stop determination time for reaching is reached,
Engine control device.
請求項1から3のいずれか一項に記載のエンジン制御装置において、
前記停止判定部(S500〜S504)は、前記欠落部において前記角度カウンタが前記目標カウント数と一致している一致時間が前記角度クロックの停止を判定するための継続時間以上になると、前記欠落部において前記角度クロックの生成が停止していると判定する、
エンジン制御装置。
In the engine control device according to any one of claims 1 to 3,
The stop determination unit (S500 to S504), when the coincidence time in which the angle counter matches the target count number in the missing part is equal to or longer than the duration for judging the stop of the angle clock, It is determined that the generation of the angle clock has stopped.
Engine control device.
請求項4または5に記載のエンジン制御装置において、
前記周期算出部は、前記欠落部において前記角度クロックの生成が停止していると前記停止判定部が判定したタイミングから前記終了パルスが発生するタイミングまでの残り時間を、前記終了パルスにおける前記目標カウント数に前記角度カウンタが達するために前記残り時間の間に前記クロック生成部が生成する前記角度クロックのクロック数で除算した値を前記クロック周期として算出する、
エンジン制御装置。
The engine control device according to claim 4 or 5,
The period calculation unit calculates the remaining time from the timing at which the stop determination unit determines that the generation of the angle clock is stopped at the missing unit to the timing at which the end pulse is generated, as the target count in the end pulse. A value divided by the number of clocks of the angle clock generated by the clock generator during the remaining time in order for the angle counter to reach a number is calculated as the clock period;
Engine control device.
JP2016083931A 2016-04-19 2016-04-19 Engine control device Active JP6583118B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016083931A JP6583118B2 (en) 2016-04-19 2016-04-19 Engine control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016083931A JP6583118B2 (en) 2016-04-19 2016-04-19 Engine control device

Publications (2)

Publication Number Publication Date
JP2017193992A true JP2017193992A (en) 2017-10-26
JP6583118B2 JP6583118B2 (en) 2019-10-02

Family

ID=60154827

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016083931A Active JP6583118B2 (en) 2016-04-19 2016-04-19 Engine control device

Country Status (1)

Country Link
JP (1) JP6583118B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019214977A (en) * 2018-06-13 2019-12-19 株式会社デンソー On-vehicle control device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019214977A (en) * 2018-06-13 2019-12-19 株式会社デンソー On-vehicle control device
JP7251058B2 (en) 2018-06-13 2023-04-04 株式会社デンソー In-vehicle control device

Also Published As

Publication number Publication date
JP6583118B2 (en) 2019-10-02

Similar Documents

Publication Publication Date Title
JP4586903B2 (en) Engine control device
JP2007205242A (en) Engine control device
JP3508676B2 (en) Engine control device
JP2008190344A (en) Engine control system and program
JP6583118B2 (en) Engine control device
JP6911627B2 (en) AD conversion processing device
JP3508720B2 (en) Engine control device
JP2001200747A (en) Engine control device
JP5304724B2 (en) Engine control device
JP6237303B2 (en) Crank angle detector
JP2007026028A (en) Device for detecting abnormality in microcomputer
CN101842581B (en) Method of controlling the ignition of a petrol engine
JP2018135785A (en) Engine control device
JP6213368B2 (en) Electronic control unit
JP2017210942A (en) Device and method for controlling engine
JP2019143540A (en) Injection monitoring device
JP2003065139A (en) Engine control device
JP2023079051A (en) Engine control device
KR100432606B1 (en) A replacement installation of crank signal
JP2019214977A (en) On-vehicle control device
JP2019183741A (en) Electronic controller
JP4556690B2 (en) Ignition system for engine
JP2013104387A (en) Engine control device
JP2005315169A (en) Crankshaft rotation synchronous processing system and engine control device
JPH07259711A (en) Ignition device for two-cylinder internal combustion engine

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180704

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190725

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: 20190806

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190819

R151 Written notification of patent or utility model registration

Ref document number: 6583118

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250