JP2002089346A - Engine control device - Google Patents

Engine control device

Info

Publication number
JP2002089346A
JP2002089346A JP2000281906A JP2000281906A JP2002089346A JP 2002089346 A JP2002089346 A JP 2002089346A JP 2000281906 A JP2000281906 A JP 2000281906A JP 2000281906 A JP2000281906 A JP 2000281906A JP 2002089346 A JP2002089346 A JP 2002089346A
Authority
JP
Japan
Prior art keywords
time
crank angle
value
angle
timing
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
JP2000281906A
Other languages
Japanese (ja)
Other versions
JP3777963B2 (en
Inventor
Takeshi Iwai
健 岩井
Yoshio Miura
美穂 三浦
Hiroki Mori
広樹 森
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 JP2000281906A priority Critical patent/JP3777963B2/en
Publication of JP2002089346A publication Critical patent/JP2002089346A/en
Application granted granted Critical
Publication of JP3777963B2 publication Critical patent/JP3777963B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To precisely detect an analog sensor signal value (sensor value) at the time when a crank angle becomes a specified command angle on an engine control device. SOLUTION: The engine control device A/D converts the sensor value for each of constant time Tint during a sampling period of time from rising timing of a crank angle signal immediately before the crank angle becomes the command signal to rising timing of the crank angle signal immediately after the crank angle passes the command angle to detect the sensor value at the time of crank angle = command angle and measures time T1, T2 of the both timing. Thereafter, time T of crank angle = command angle is computed from the both time T1, T2, an angle B from the crank angle to the command angle at the former timing (time 1), an A/D converted value at a time nearest to the time T is selected from the A/D converted values for the sampling time and it is made a target sensor value.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、エンジン制御装置
に関するものである。
[0001] The present invention relates to an engine control device.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】従来よ
り、車両用のエンジン制御装置では、エンジンに取り付
けられたクランク角センサから、エンジンのクランク軸
が所定角度回転する毎に特定方向のパルスエッジ(一般
には、立ち上がりエッジ)が生じるクランク角信号を入
力し、そのクランク角信号に基づいて、クランク軸の回
転角度(以下、クランク角という)を把握するようにし
ている。そして更に、エンジンの状態を検出するための
他のセンサから出力されるアナログ信号の値(以下、セ
ンサ値という)を、A/Dコンバータによりデジタル値
へとA/D変換して、エンジンの制御に使用している。
2. Description of the Related Art Conventionally, in an engine control device for a vehicle, a pulse edge in a specific direction is detected every time the crankshaft of the engine rotates by a predetermined angle from a crank angle sensor attached to the engine. A crank angle signal that generates a rising edge (generally, a rising edge) is input, and the rotation angle of the crankshaft (hereinafter, referred to as crank angle) is grasped based on the crank angle signal. Further, the value of an analog signal (hereinafter referred to as a sensor value) output from another sensor for detecting the state of the engine is A / D converted into a digital value by an A / D converter, and the engine is controlled. Used for

【0003】ここで、この種のエンジン制御装置におい
て、アナログ信号を出力するセンサが、例えば気筒の燃
焼圧力を検出するための圧力センサ(燃焼圧センサ)の
ように、クランク角に密接に関連した物理量を検出する
ためのセンサである場合には、クランク角が特定の角度
(以下、指令角度という)となった時のセンサ値を、A
/D変換して検出する必要がある。
Here, in this type of engine control device, a sensor that outputs an analog signal is closely related to the crank angle, for example, a pressure sensor (combustion pressure sensor) for detecting the combustion pressure of a cylinder. In the case of a sensor for detecting a physical quantity, the sensor value when the crank angle reaches a specific angle (hereinafter, referred to as a command angle) is represented by A
It is necessary to detect by performing / D conversion.

【0004】そして、従来のエンジン制御装置では、ク
ランク角が指令角度となった時のセンサ値を、以下の手
法で検出するようにしていた。まず、この種のエンジン
制御装置においては、クランク角信号に上記特定方向の
パルスエッジ(以下の説明では、立ち上がりエッジとす
る)が生じた時間間隔を計測することにより、クランク
軸の回転速度(エンジン回転数)を算出しているが、従
来のエンジン制御装置では、その計測した時間間隔(即
ち、クランク角信号の1周期時間)から、クランク軸が
単位角度(例えば1°CA)だけ回転するのに要する時
間(以下、単位角度相当の時間という)を算出する。
尚、“CA”は、クランク角を意味する添え字である。
[0004] In the conventional engine control device, a sensor value when the crank angle reaches the command angle is detected by the following method. First, in this type of engine control device, the crankshaft rotation speed (engine speed) is measured by measuring the time interval at which a pulse edge (in the following description, a rising edge) occurs in the crank angle signal. In the conventional engine control device, the crankshaft rotates by a unit angle (for example, 1 ° CA) from the measured time interval (ie, one cycle time of the crank angle signal). (Hereinafter, referred to as a time corresponding to a unit angle) is calculated.
“CA” is a suffix meaning a crank angle.

【0005】そして、クランク角信号に立ち上がりエッ
ジが生じる各タイミングのうち、例えばクランク角が指
令角度になる直前のタイミングにて、その時点で算出し
ている最新の単位角度相当の時間から、クランク角が指
令角度になると思われる時刻を算出すると共に、その算
出した時刻にタイマ割り込み処理が起動されるように、
内部タイマをセットする。
[0005] Of the timings at which a rising edge occurs in the crank angle signal, for example, at a timing immediately before the crank angle becomes the command angle, the crank angle is calculated from the time corresponding to the latest unit angle calculated at that time. Is calculated to be a command angle, and a timer interrupt process is started at the calculated time.
Set the internal timer.

【0006】そして更に、そのタイマ割り込み処理によ
り、A/Dコンバータを起動して該A/Dコンバータに
センサ値をA/D変換させ、そのA/D変換によるデジ
タル値を、クランク角が指令角度となった時のセンサ値
として取得する。つまり、従来のエンジン制御装置で
は、過去のクランク角信号の周期時間に基づき、クラン
ク角が指令角度になると思われる時刻を算出して、その
時刻にA/Dコンバータを起動し、その時にA/D変換
されたデジタル値を、クランク角が指令角度となった時
のセンサ値として取得するようにしている。
Further, by the timer interrupt processing, the A / D converter is started to cause the A / D converter to A / D convert the sensor value, and the digital value obtained by the A / D conversion is converted into the command angle by the crank angle. Is acquired as the sensor value when That is, in the conventional engine control device, a time at which the crank angle is considered to be the command angle is calculated based on the cycle time of the past crank angle signal, and the A / D converter is started at that time. The D-converted digital value is obtained as a sensor value when the crank angle becomes the command angle.

【0007】しかしながら、この手法では、エンジン特
有の回転変動の影響により、実際にA/Dコンバータが
起動される時のクランク角が、本当の指令角度からずれ
易いため、クランク角が指令角度となった時のセンサ値
を正確に検出することができない。つまり、各気筒での
燃焼の度に発生する回転変動の影響を直接受けてしま
い、本当に希望される指令角度とは異なったクランク角
でのセンサ値を求めてしまう。
However, in this method, the crank angle when the A / D converter is actually started tends to deviate from the true command angle due to the influence of engine-specific rotation fluctuation. The sensor value at the time of the occurrence cannot be accurately detected. In other words, it is directly affected by the rotation fluctuation generated each time combustion occurs in each cylinder, and a sensor value at a crank angle different from the really desired command angle is obtained.

【0008】一方また、この種のエンジン制御装置にお
いて、アナログ信号を出力するセンサが、上記燃焼圧セ
ンサ等、クランク角に密接に関連した物理量を検出する
ためのセンサである場合には、クランク角が第1の角度
になってから第2の角度になるまでの監視期間におい
て、センサ値が特定の値(例えば最大値や最小値)とな
った時のクランク角を検出するように構成される場合も
ある。
On the other hand, in this type of engine control device, if the sensor for outputting an analog signal is a sensor for detecting a physical quantity closely related to the crank angle, such as the combustion pressure sensor, the crank angle Is configured to detect a crank angle when a sensor value reaches a specific value (for example, a maximum value or a minimum value) during a monitoring period from when the first angle reaches the second angle. In some cases.

【0009】そして、従来の技術により、監視期間にお
いてセンサ値が特定の値となった時のクランク角を検出
するには、以下の手法を採ることが考えられる。まず、
前述したように、この種のエンジン制御装置において
は、クランク角信号の1周期時間を計測しているが、こ
の場合も、その計測した1周期時間から、単位角度相当
の時間(クランク軸が単位角度(例えば1°CA)だけ
回転するのに要する時間)を算出する。
In order to detect the crank angle when the sensor value reaches a specific value during the monitoring period according to the conventional technique, the following method may be adopted. First,
As described above, in this type of engine control device, one cycle time of the crank angle signal is measured. In this case as well, a time equivalent to a unit angle (crank shaft is measured in units of one unit) is calculated from the measured one cycle time. The angle (for example, the time required to rotate by 1 ° CA) is calculated.

【0010】また、監視期間は、クランク角が第1の角
度になってクランク角信号に立ち上がりエッジが生じた
タイミング(以下、監視開始タイミングという)から、
クランク角が第2の角度になってクランク角信号に立ち
上がりエッジが生じたタイミング(以下、監視終了タイ
ミングという)までの期間として設定する。
In the monitoring period, the timing at which the crank angle becomes the first angle and a rising edge occurs in the crank angle signal (hereinafter referred to as monitoring start timing)
The period is set as a period until the timing when the crank angle becomes the second angle and a rising edge occurs in the crank angle signal (hereinafter, referred to as monitoring end timing).

【0011】そして、クランク角信号に立ち上がりエッ
ジが生じる各タイミングのうちの上記監視開始タイミン
グになると、その時点から上記監視終了タイミングが到
来するまでの間、監視開始タイミングの時点で算出して
いる最新の単位角度相当の時間毎に、A/Dコンバータ
を起動して該A/Dコンバータにセンサ値をA/D変換
させる。
When the monitoring start timing is reached among the timings at which the rising edge occurs in the crank angle signal, the latest calculation calculated at the monitoring start timing from that time until the monitoring end timing comes. The A / D converter is activated at every time corresponding to the unit angle of (1) to cause the A / D converter to A / D convert the sensor value.

【0012】そして更に、上記各A/D変換で得られる
デジタル値の中から、特定の値(例えば最大値や最小
値)となったデジタル値を選択し、その選択したデジタ
ル値がA/D変換された順番から、センサ値が特定の値
となった時のクランク角を求める。例えば、上記単位角
度を「1°CA」とし、上記順番が「N」であったとす
ると、監視開始タイミングでのクランク角から「(N−
1)×1°CA」だけ進んだ角度が、センサ値が特定の
値となったクランク角として求められることとなる。
Further, a digital value having a specific value (for example, a maximum value or a minimum value) is selected from the digital values obtained by the respective A / D conversions, and the selected digital value is converted to an A / D value. The crank angle at the time when the sensor value becomes a specific value is obtained from the converted order. For example, assuming that the unit angle is “1 ° CA” and the order is “N”, “(N−
1) × 1 ° CA ”is obtained as the crank angle at which the sensor value has reached a specific value.

【0013】しかしながら、この手法においても、エン
ジン特有の回転変動の影響により、センサ値が特定の値
となった時のクランク角を正確に検出することができな
い。つまり、監視期間においてA/D変換の実施周期と
して用いられる単位角度相当の時間は、過去のクランク
角信号の周期時間に基づいて算出されるものであるた
め、実際の単位角度相当の時間とは異なった値となり易
く(即ち、誤差を持ち易く)、その結果、目的のクラン
ク角を正確に検出することが難しくなる。
However, even in this method, the crank angle at the time when the sensor value reaches a specific value cannot be accurately detected due to the influence of engine-specific rotational fluctuation. In other words, the time corresponding to the unit angle used as the A / D conversion execution cycle in the monitoring period is calculated based on the cycle time of the past crank angle signal. It tends to have a different value (that is, it tends to have an error), and as a result, it is difficult to accurately detect the target crank angle.

【0014】本発明は、エンジン制御装置において、エ
ンジンの回転変動の影響を受けずに検出対象値を正確に
検出できるようにすることを目的としており、特に、ク
ランク角が所定の指令角度となった時のセンサ値を正確
に検出できるようにすることを第1の目的とし、センサ
値が特定の値となった時のクランク角を正確に検出でき
るようにすることを第2の目的としている。
An object of the present invention is to make it possible for an engine control device to accurately detect a detection target value without being affected by fluctuations in engine rotation. A first object is to enable accurate detection of a sensor value at the time of occurrence, and a second object is to enable accurate detection of a crank angle when a sensor value reaches a specific value. .

【0015】[0015]

【課題を解決するための手段及び発明の効果】上記目的
を達成するためになされた請求項1に記載のエンジン制
御装置は、従来の装置と同様に、所定のセンサから出力
されるアナログ信号の値(以下、センサ値という)をデ
ジタル値へとA/D変換するためのA/D変換手段を備
えると共に、エンジンのクランク軸が所定角度回転する
毎に特定方向のパルスエッジが生じるクランク角信号に
基づいて、クランク軸の回転角度(以下、クランク角と
いう)を把握するが、特に、クランク角が所定の指令角
度になった時のセンサ値を検出するための手段として、
サンプリング手段と、計時手段と、センサ値算出手段と
を備えている。
Means for Solving the Problems and Effects of the Invention In order to achieve the above object, the engine control device according to the first aspect of the present invention has an analog signal output from a predetermined sensor similarly to the conventional device. A / D conversion means for A / D converting a value (hereinafter referred to as a sensor value) into a digital value, and a crank angle signal in which a pulse edge in a specific direction is generated every time the crankshaft of the engine rotates a predetermined angle. , The rotation angle of the crankshaft (hereinafter, referred to as crank angle) is grasped. In particular, as means for detecting a sensor value when the crank angle reaches a predetermined command angle,
The apparatus includes sampling means, time measuring means, and sensor value calculating means.

【0016】そして、サンプリング手段は、クランク角
が指令角度となる前にクランク角信号に前記特定方向の
パルスエッジが生じるタイミング(以下、検出開始タイ
ミングという)から、クランク角が指令角度を過ぎた後
にクランク角信号に前記特定方向のパルスエッジが生じ
るタイミング(以下、検出終了タイミングという)まで
のサンプリング期間の間、A/D変換手段にセンサ値を
一定時間毎にA/D変換させて、そのA/D変換で得ら
れた各デジタル値を所定の記憶手段に記憶させる。
The sampling means starts at a timing when the pulse angle in the specific direction occurs in the crank angle signal before the crank angle reaches the command angle (hereinafter referred to as a detection start timing) and after the crank angle passes the command angle. During the sampling period until the timing at which the pulse edge in the specific direction occurs in the crank angle signal (hereinafter, referred to as detection end timing), the A / D conversion means A / D converts the sensor value at regular intervals, and the A Each digital value obtained by the / D conversion is stored in a predetermined storage means.

【0017】また、計時手段は、前記検出開始タイミン
グの時刻と前記検出終了タイミングの時刻とを夫々計測
する。そして、センサ値算出手段は、計時手段によって
計測された両時刻(即ち、サンプリング期間の開始時刻
及び終了時刻)と、検出開始タイミングでのクランク角
から指令角度までの角度と、前記所定角度(即ち、クラ
ンク角信号の1周期分のクランク角)とから、前記サン
プリング期間内にてクランク角が指令角度になった時刻
(以下、指令角度時刻という)を算出して、前記記憶手
段に記憶されているサンプリング期間分デジタル値か
ら、前記算出した指令角度時刻のセンサ値を求める。
The time measuring means measures the time of the detection start timing and the time of the detection end timing, respectively. Then, the sensor value calculating means calculates the two times measured by the time measuring means (ie, the start time and end time of the sampling period), the angle from the crank angle at the detection start timing to the command angle, and the predetermined angle (ie, , The crank angle of one cycle of the crank angle signal), the time when the crank angle becomes the command angle within the sampling period (hereinafter referred to as the command angle time) is calculated and stored in the storage means. The sensor value at the calculated command angle time is calculated from the digital value for the sampling period.

【0018】尚、センサ値算出手段は、記憶手段に記憶
されている各デジタル値の中から、前記算出した指令角
度時刻に最も近いタイミングでA/D変換されたと見な
されるデジタル値を1つ選択して、その選択したデジタ
ル値を、指令角度時刻のセンサ値として求めるように構
成することができる。また例えば、センサ値算出手段
は、記憶手段に記憶されている各デジタル値の中から、
前記算出した指令角度時刻の直前にA/D変換されたデ
ジタル値と、前記算出した指令角度時刻の直後にA/D
変換されたデジタル値とを選択して、その選択した2つ
のデジタル値から、補間処理によって、指令角度時刻で
のセンサ値を算出するように構成することもできる。
The sensor value calculation means selects one of the digital values stored in the storage means which is considered to be A / D converted at the timing closest to the calculated command angle time. Then, the selected digital value can be obtained as a sensor value at the command angle time. Further, for example, the sensor value calculating unit may select, from among the digital values stored in the storage unit,
A / D-converted digital value immediately before the calculated command angle time and A / D conversion immediately after the calculated command angle time
The converted digital value may be selected, and the sensor value at the command angle time may be calculated from the selected two digital values by interpolation processing.

【0019】この請求項1のエンジン制御装置では、ク
ランク角信号の各周期(即ち、クランク角信号に特定方
向のパルスエッジが生じてから次に同方向のパルスエッ
ジが生じるまでの各期間)のうちで、クランク角が指令
角度となる時点を含んだ周期を、サンプリング期間とし
ているため、そのサンプリング期間の開始時及び終了時
におけるクランク角は、エンジンの回転変動に拘わらず
正確に把握され、また、そのサンプリング期間の開始と
終了との各々の時刻は、計時手段によって正確に計測さ
れる。
In the engine control device of the first aspect, each cycle of the crank angle signal (ie, each period from the occurrence of a pulse edge in a specific direction to the occurrence of the next pulse edge in the crank angle signal). Since the period including the time when the crank angle becomes the command angle is used as the sampling period, the crank angle at the start and end of the sampling period is accurately grasped regardless of the engine rotation fluctuation. The respective times of the start and end of the sampling period are accurately measured by the clock means.

【0020】このため、センサ値算出手段で算出される
指令角度時刻は、エンジンの回転変動の影響を殆ど受け
ない正確な値となる。つまり、サンプリング期間の開始
と終了との各時刻は計時手段によって正確に計測され、
また、検出開始タイミング(サンプリング期間の開始
時)でのクランク角は正確に把握される値であるため、
そのクランク角から指令角度までの角度も正確な値であ
り、更に、クランク角信号の1周期分のクランク角であ
る上記所定角度は既知の固定値であるため、それらの正
確な情報から算出される指定角度時間は、エンジンの回
転変動に殆ど影響されない正確な値となる。
For this reason, the command angle time calculated by the sensor value calculating means is an accurate value which is hardly affected by the rotation fluctuation of the engine. In other words, each time of the start and end of the sampling period is accurately measured by the timer,
Also, since the crank angle at the detection start timing (at the start of the sampling period) is a value that can be accurately grasped,
The angle from the crank angle to the command angle is also an accurate value, and the predetermined angle, which is the crank angle for one cycle of the crank angle signal, is a known fixed value, and is calculated from such accurate information. The specified angle time is an accurate value that is hardly influenced by the rotation fluctuation of the engine.

【0021】そして、センサ値算出手段により、そのよ
うな正確な指令角度時刻に基づいて、サンプリング期間
中の一定時間毎のA/D変換値(センサ値をA/D変換
したデジタル値)から算出される目的のセンサ値も、エ
ンジンの回転変動の影響を殆ど受けることなく、クラン
ク角が実際に指令角度になった時のセンサ値により近い
値となる。
The sensor value calculation means calculates the A / D conversion value (digital value obtained by A / D conversion of the sensor value) from the A / D conversion value for each fixed time during the sampling period based on the accurate command angle time. The target sensor value to be executed is also a value closer to the sensor value when the crank angle actually becomes the command angle, without being substantially affected by the rotation fluctuation of the engine.

【0022】よって、請求項1のエンジン制御装置によ
れば、クランク角が指令角度となった時のセンサ値を、
従来よりも格段に高い精度で検出できるようになる。一
方、クランク角が第1の角度になってから第2の角度に
なるまでの監視期間において、センサからのセンサ値が
特定の値となった時のクランク角を検出するためには、
請求項2に記載の構成が適している。尚、特定の値とし
ては、例えば、最大値,最小値,極大値,極小値や、予
め定められた基準値、といった値が考えられる。
Therefore, according to the engine control device of the first aspect, the sensor value at the time when the crank angle becomes the command angle is obtained by:
Detection can be performed with much higher accuracy than before. On the other hand, during the monitoring period from when the crank angle becomes the first angle to when the crank angle becomes the second angle, in order to detect the crank angle when the sensor value from the sensor becomes a specific value,
The configuration according to claim 2 is suitable. The specific value may be, for example, a maximum value, a minimum value, a local maximum value, a local minimum value, or a predetermined reference value.

【0023】即ち、請求項2に記載のエンジン制御装置
も、従来の装置と同様に、所定のセンサからのセンサ値
をデジタル値へとA/D変換するためのA/D変換手段
を備えると共に、エンジンのクランク軸が所定角度回転
する毎に特定方向のパルスエッジが生じるクランク角信
号に基づいてクランク角を把握するが、特に、クランク
角が第1の角度になってクランク角信号に特定方向のパ
ルスエッジが生じるタイミング(以下、監視開始タイミ
ングという)から、クランク角が第2の角度になってク
ランク角信号に特定方向のパルスエッジが生じるタイミ
ング(以下、監視終了タイミングという)までの監視期
間の中で、センサ値が特定の値となった時のクランク角
を検出するための手段として、サンプリング手段と、計
時手段と、特定値発生時刻検出手段と、クランク角算出
手段とを備えている。
That is, the engine control device according to the second aspect also has A / D conversion means for A / D conversion of a sensor value from a predetermined sensor into a digital value, similarly to the conventional device. The crank angle is determined based on a crank angle signal in which a pulse edge in a specific direction is generated every time the crankshaft of the engine rotates a predetermined angle. From the timing at which the pulse edge occurs (hereinafter referred to as monitoring start timing) to the timing at which the crank angle becomes the second angle and a pulse edge in a specific direction occurs in the crank angle signal (hereinafter referred to as monitoring end timing). Among them, as means for detecting the crank angle when the sensor value reaches a specific value, sampling means, time measuring means, specific value Raw time detecting means, and a crank angle calculating means.

【0024】そして、サンプリング手段は、前記監視期
間の間、A/D変換手段にセンサ値を一定時間毎にA/
D変換させる。また、計時手段は、前記監視期間におい
て、クランク角信号に前記特定方向のパルスエッジが生
じた各タイミングであって、前記監視開始タイミングと
前記監視終了タイミングとを含む各タイミングの時刻を
夫々計測する。
During the monitoring period, the sampling means sends the sensor value to the A / D conversion means at regular time intervals.
D conversion is performed. In addition, the timing unit measures each time of each timing at which the pulse edge in the specific direction occurs in the crank angle signal during the monitoring period, including the monitoring start timing and the monitoring end timing. .

【0025】また更に、特定値発生時刻検出手段は、A
/D変換手段によってA/D変換された各デジタル値の
中から、前記特定の値となったデジタル値を選択すると
共に、その選択したデジタル値がA/D変換された時刻
である特定値発生時刻を検出する。
Still further, the specific value occurrence time detecting means may include A
The digital value that has become the specific value is selected from among the digital values that have been A / D converted by the / D conversion means, and a specific value generation that is the time at which the selected digital value was A / D converted is selected. Detect the time.

【0026】そして、クランク角算出手段は、前記監視
期間におけるクランク角信号の各周期のうちで、前記特
定値発生時刻を含んだ周期を特定して、その特定した周
期の開始時刻と終了時刻とを前記計時手段の計測結果か
ら取得し、更に、その取得した開始時刻及び終了時刻
と、前記特定値発生時刻と、前記開始時刻でのクランク
角と、前記所定角度(即ち、クランク角信号の1周期分
のクランク角)とから、前記特定値発生時刻でのクラン
ク角を、センサ値が特定の値となった時のクランク角と
して算出する。
The crank angle calculating means specifies a cycle including the specific value occurrence time in each cycle of the crank angle signal in the monitoring period, and determines a start time and an end time of the specified cycle. From the measurement result of the clock means, and further, the obtained start time and end time, the specific value generation time, the crank angle at the start time, and the predetermined angle (that is, 1 of the crank angle signal). The crank angle at the specific value occurrence time is calculated as the crank angle when the sensor value reaches a specific value.

【0027】つまり、この請求項2のエンジン制御装置
では、従来装置のように、過去のクランク角信号の周期
時間を利用して目的のクランク角を求めるのではなく、
センサ値を一定時間毎にA/D変換して得た各デジタル
値の中から、特定の値となったものを選択して、その選
択したデジタル値のA/D変換時刻である特定値発生時
刻を求めると共に、監視期間において、その特定値発生
時刻を含んだクランク角信号の周期を特定して、その特
定した周期の開始時刻及び終了時刻と、特定値発生時刻
と、上記開始時刻でのクランク角と、クランク角信号の
1周期分のクランク角である上記所定角度とから、セン
サ値が特定の値となった時のクランク角を算出するよう
にしている。
That is, in the engine control device according to the second aspect, unlike the conventional device, the target crank angle is not determined by using the cycle time of the past crank angle signal.
From the digital values obtained by A / D conversion of the sensor value at regular time intervals, a digital value which has become a specific value is selected, and a specific value generation which is the A / D conversion time of the selected digital value is selected. In the monitoring period, the period of the crank angle signal including the specific value occurrence time is specified, and the start time and end time of the specified period, the specific value occurrence time, and the time at the start time are determined. The crank angle when the sensor value reaches a specific value is calculated from the crank angle and the predetermined angle which is the crank angle for one cycle of the crank angle signal.

【0028】このため、請求項2のエンジン制御装置に
よれば、センサ値が特定の値となった時のクランク角
を、エンジンの回転変動の影響を殆ど受けずに、従来よ
りも格段に高い精度で検出できるようになる。尚、監視
期間が、クランク角信号の複数周期分ではなく1周期分
だけである場合には、クランク角算出手段は、その監視
期間自体を、特定値発生時刻を含んだクランク角信号の
周期として特定することとなり、監視開始タイミングと
監視終了タイミングとの各時刻を、特定値発生時刻を含
んだクランク角信号の周期の開始時刻及び終了時刻とし
て取得することとなる。
Therefore, according to the engine control device of the second aspect, the crank angle at the time when the sensor value reaches a specific value is significantly higher than the conventional one without being largely affected by the rotation fluctuation of the engine. It can be detected with high accuracy. If the monitoring period is not a plurality of periods of the crank angle signal but only one period, the crank angle calculating means sets the monitoring period itself as a period of the crank angle signal including the specific value occurrence time. Thus, the monitoring start timing and the monitoring end timing are obtained as the start time and the end time of the cycle of the crank angle signal including the specific value occurrence time.

【0029】一方、請求項1,2のエンジン制御装置に
おいて、センサ値をA/D変換する周期としての上記一
定時間(以下、サンプリング周期ともいう)は、短い時
間に設定するほど、検出精度の面で有利であるが、サン
プリング周期を極端に短い時間に設定すると、A/D変
換のための処理負荷やA/D変換値を記憶するための記
憶手段の必要容量を大幅に増加させてしまうため、サン
プリング周期は、処理負荷やハードウエア上の制約と、
検出精度との兼ね合い応じて適宜設定すれば良い。この
ため、サンプリング周期は、エンジンが最高許容回転数
で運転される場合でも、ある程度小さい値のクランク角
(例えば1°CA)毎にA/D変換が行われるような値
に設定することが好ましい。
On the other hand, in the engine control apparatus according to the first and second aspects, the shorter the set time (hereinafter, also referred to as a sampling cycle) as a cycle for A / D conversion of the sensor value, the smaller the detection accuracy. However, if the sampling period is set to an extremely short time, the processing load for the A / D conversion and the required capacity of the storage means for storing the A / D conversion value are greatly increased. Therefore, the sampling period depends on the processing load and hardware constraints,
What is necessary is just to set suitably according to the balance with detection accuracy. For this reason, it is preferable that the sampling period be set to a value such that the A / D conversion is performed at every crank angle (for example, 1 ° CA) having a somewhat small value even when the engine is operated at the maximum allowable rotation speed. .

【0030】[0030]

【発明の実施の形態】以下、本発明が適用された実施形
態の車両用エンジン制御装置について、図面を用いて説
明する。まず図1は、本実施形態のエンジン制御装置
(以下、ECUという)1の構成を制御対象のエンジン
3と共に表すブロック図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a vehicle engine control device according to an embodiment to which the present invention is applied will be described with reference to the drawings. First, FIG. 1 is a block diagram showing a configuration of an engine control device (hereinafter referred to as an ECU) 1 of the present embodiment together with an engine 3 to be controlled.

【0031】図1に示すように、ECU1には、エンジ
ン3に取り付けられたクランク角センサ5と、エンジン
3の各気筒7に1つずつ装備された燃焼圧センサ9と、
上記各気筒7に燃料を噴射供給するためのインジェクタ
11とが接続されている。尚、クランク角センサ5は、
エンジン3のクランク軸と一緒に回転するパルサーと、
そのパルサーの外周に所定角度間隔で設けられている多
数の歯の通過を検出する毎に、クランク角信号としての
パルス信号を出力する検出部と、からなる周知のもので
ある。そして、このクランク角センサ5(詳しくは、上
記検出部)から出力されるクランク角信号は、クランク
軸が所定角度(本実施形態では、10°)回転する毎に
立ち上がりエッジ(即ち、ローレベルからハイレベルへ
の方向のパルスエッジ)が生じるものとなる。また、以
下の説明において、このようなクランク角信号の立ち上
がりエッジを、特に「NEパルス」ともいう。一方、燃
焼圧センサ9は、各気筒7の燃焼圧力を表すアナログ信
号(以下、燃焼圧信号ともいう)を出力するセンサであ
る。
As shown in FIG. 1, the ECU 1 includes a crank angle sensor 5 attached to the engine 3, a combustion pressure sensor 9 provided one for each cylinder 7 of the engine 3,
An injector 11 for injecting and supplying fuel to each of the cylinders 7 is connected. The crank angle sensor 5 is
A pulsar that rotates with the crankshaft of the engine 3,
And a detection unit that outputs a pulse signal as a crank angle signal every time when passage of a large number of teeth provided at predetermined angular intervals on the outer periphery of the pulsar is detected. The crank angle signal output from the crank angle sensor 5 (specifically, the detection unit) is a rising edge (that is, from a low level) every time the crankshaft rotates a predetermined angle (10 ° in this embodiment). (A pulse edge toward a high level). Further, in the following description, such a rising edge of the crank angle signal is particularly referred to as a “NE pulse”. On the other hand, the combustion pressure sensor 9 is a sensor that outputs an analog signal (hereinafter, also referred to as a combustion pressure signal) representing the combustion pressure of each cylinder 7.

【0032】そして、ECU1は、CPU13,ROM
15,RAM17,A/Dコンバータ19,及びそれら
を接続する内部バス21等からなる周知のマイクロコン
ピュータ(以下、マイコンという)23と、クランク角
センサ5からのクランク角信号及び各燃焼圧センサ9か
らの燃焼圧信号をマイコン23に入力させる入力回路2
5と、マイコン23からの制御信号に従って上記インジ
ェクタ11等の各種アクチュエータを動作させる出力回
路27とを備えている。
The ECU 1 has a CPU 13, a ROM
15, a RAM 17, an A / D converter 19, and a well-known microcomputer (hereinafter referred to as a microcomputer) 23 including an internal bus 21 for connecting them, a crank angle signal from the crank angle sensor 5 and a combustion pressure sensor 9. Circuit 2 for inputting the combustion pressure signal to the microcomputer 23
5, and an output circuit 27 for operating various actuators such as the injector 11 in accordance with a control signal from the microcomputer 23.

【0033】ここで、クランク角センサ5からのクラン
ク角信号は、入力回路25で波形整形されて、マイコン
23のCPU13に入力されるようになっている。ま
た、各燃焼圧センサ9からの燃焼圧信号は、入力回路2
5を介してマイコン23のA/Dコンバータ19に入力
されるようになっており、その燃焼圧信号の値(センサ
値)は、A/Dコンバータ19によりデジタル値へとA
/D変換される。
Here, the crank angle signal from the crank angle sensor 5 is shaped by the input circuit 25 and input to the CPU 13 of the microcomputer 23. The combustion pressure signal from each combustion pressure sensor 9 is supplied to the input circuit 2
5, the value of the combustion pressure signal (sensor value) is converted into a digital value by the A / D converter 19.
/ D conversion.

【0034】そして、CPU13は、ROM15に格納
されたプログラムに従って、エンジン制御用の各種処理
を行う。例えば、CPU13は、クランク角信号に基づ
いて、周知の手法により、現在のクランク角(クランク
軸の回転角度)やエンジン回転数を把握する。具体的に
は、クランク角が基準位置となった時からのNEパルス
の発生回数を計数することにより、現在のクランク角を
検出し、NEパルスの時間間隔を計測することにより、
現在のエンジン回転数を検出する。また、CPU13
は、A/D変換手段としてのA/Dコンバータ19を制
御して、燃焼圧センサ9のセンサ値を検出する。そして
更に、CPU13は、それらの検出結果に基づき出力回
路27へ制御信号を出力して、インジェクタ11等を適
切に動作させることにより、エンジン3の運転状態を制
御する。
The CPU 13 performs various processes for controlling the engine according to a program stored in the ROM 15. For example, based on the crank angle signal, the CPU 13 obtains the current crank angle (the rotation angle of the crankshaft) and the engine speed by a known method. Specifically, the current crank angle is detected by counting the number of times the NE pulse has been generated since the crank angle became the reference position, and the time interval of the NE pulse is measured.
Detect the current engine speed. The CPU 13
Controls the A / D converter 19 as A / D conversion means to detect the sensor value of the combustion pressure sensor 9. Further, the CPU 13 controls the operating state of the engine 3 by outputting a control signal to the output circuit 27 based on the detection results and appropriately operating the injector 11 and the like.

【0035】次に、このようなECU1において、燃焼
圧センサ9のセンサ値に関して行われる2種類の処理
(処理1及び処理2)について説明する。尚、これらの
処理は、各気筒7の燃焼圧センサ9について行われるも
のであるが、処理内容は共通であるため、1つの気筒
(ここでは、複数の気筒7のうちの第1気筒#1とす
る)の燃焼圧センサ9についてのみ説明する。また、以
下に説明する処理は、マイコン23のCPU13が実行
するものである。 [処理1:クランク角が指令角度となった時のセンサ値
を検出する処理]まず、図2〜図5を参照して、クラン
ク角が所定の指令角度となった時のセンサ値を検出する
ための処理1について説明する。
Next, two types of processing (processing 1 and processing 2) performed by the ECU 1 on the sensor value of the combustion pressure sensor 9 will be described. Note that these processes are performed on the combustion pressure sensor 9 of each cylinder 7, but since the processing contents are common, one cylinder (here, the first cylinder # 1 of the plurality of cylinders 7) is used. Only the combustion pressure sensor 9 will be described. The processing described below is executed by the CPU 13 of the microcomputer 23. [Processing 1: Processing for Detecting Sensor Value when Crank Angle at Command Angle] First, referring to FIGS. 2 to 5, detecting a sensor value when the crank angle at a predetermined command angle is detected. Process 1 for the following will be described.

【0036】尚、本実施形態においては、クランク角が
第1気筒#1の圧縮行程上死点(以下、TDCと記す)
の角度位置になったタイミングを含む10°CA毎の各
タイミングで、クランク角信号に立ち上がりエッジ(N
Eパルス)が生じるものとする。また、センサ値を検出
したい希望の指令角度は、第1気筒#1のTDCから1
5°CA進んだクランク角(ATDC15°CA)であ
るものとする。
In the present embodiment, the crank angle of the first cylinder # 1 is set at the top dead center of the compression stroke (hereinafter referred to as TDC).
The rising edge (N) of the crank angle signal at each timing of 10 ° CA including the timing of
E pulse). The desired command angle for which a sensor value is to be detected is 1 TDC from the first cylinder # 1.
It is assumed that the crank angle is advanced by 5 ° CA (ATDC 15 ° CA).

【0037】図2は、CPU13が処理1のために実行
するNE割り込み処理を表すフローチャートであり、こ
のNE割り込み処理は、クランク角信号に立ち上がりエ
ッジが生じる毎(NEパルスが発生する毎)に実行され
る。図2に示すように、CPU13がNE割り込み処理
の実行を開始すると、まずステップ(以下、単に「S」
と記す)110にて、今回のNEパルスの発生タイミン
グが、クランク角が指令角度となる直前のNEパルスの
発生タイミングであって、燃焼圧信号に対するサンプリ
ングを開始すべき検出開始タイミングとしてのAD起動
タイミングであるか否かを判定する。尚、この例におい
て、AD起動タイミングは、第1気筒#1のTDCから
10°CA進んだクランク角(ATDC10°CA)の
タイミングである(図5参照)。
FIG. 2 is a flowchart showing the NE interrupt processing executed by the CPU 13 for the processing 1. The NE interrupt processing is executed every time a rising edge occurs in the crank angle signal (every time an NE pulse is generated). Is done. As shown in FIG. 2, when the CPU 13 starts executing the NE interrupt processing, first, a step (hereinafter simply referred to as “S”) is executed.
At 110, the current NE pulse generation timing is the generation timing of the NE pulse immediately before the crank angle becomes the command angle, and the AD activation as the detection start timing at which sampling of the combustion pressure signal should be started It is determined whether it is timing. In this example, the AD start timing is the timing of the crank angle (ATDC 10 ° CA) advanced by 10 ° CA from the TDC of the first cylinder # 1 (see FIG. 5).

【0038】そして、上記S110にてAD起動タイミ
ングであると判定したならば、S120に進んで、A/
Dコンバータ19を起動して該A/Dコンバータ19に
燃焼圧信号の値であるセンサ値をA/D変換させ、次の
S130にて、その時点から一定時間Tint 後にマイコ
ン23内でコンペア割り込み要求(いわゆるタイマ割り
込み要求)が発生するように、コンペア割り込み要求発
生時刻をセットし、続くS140にて、そのコンペア割
り込み要求に対応する図3のコンペア割り込み処理が起
動されるのを許可する。そして更に、続くS150に
て、今回のNE割り込み処理の起動時刻であって、今回
のAD起動タイミングの時刻(図5における時刻T1)
を、RAM17に格納して、本NE割り込み処理を終了
する。
If it is determined in S110 that it is the AD start timing, the process proceeds to S120 and A / A
Activate the D converter 19 to cause the A / D converter 19 to A / D convert the sensor value, which is the value of the combustion pressure signal. At the next step S130, after a certain time Tint from the time, a compare interrupt request is issued in the microcomputer 23. The time at which the compare interrupt request is generated is set so as to generate a so-called timer interrupt request, and in the next S140, the activation of the compare interrupt process of FIG. 3 corresponding to the compare interrupt request is permitted. Further, in subsequent S150, this is the activation time of the current NE interrupt processing, which is the time of the current AD activation timing (time T1 in FIG. 5).
Is stored in the RAM 17 and the NE interruption process ends.

【0039】尚、CPU13は、マイコン23内で常時
カウントアップされているフリーランニングカウンタの
値を時刻として扱っている。このため、図5の時刻T1
でAD起動タイミングに該当するNEパルスが発生した
とすると、CPU13は、上記S150にて、時刻T1
でのフリーランニングカウンタの値を、時刻T1として
RAM17に格納することとなる。
The CPU 13 treats the value of the free running counter, which is constantly counted up in the microcomputer 23, as time. Therefore, at time T1 in FIG.
Assuming that the NE pulse corresponding to the AD activation timing has been generated at S150, the CPU 13 determines in step S150 that the time T1
Is stored in the RAM 17 as the time T1.

【0040】一方、CPU13は、上記S110にてA
D起動タイミングではないと判定したならば、S160
に移行して、今回のNEパルスの発生タイミングが、ク
ランク角が指令角度を過ぎた直後のNEパルスの発生タ
イミングであって、燃焼圧信号に対するサンプリングを
終了すべき検出終了タイミングとしてのAD終了タイミ
ングであるか否かを判定する。尚、この例において、A
D終了タイミングは、第1気筒#1のTDCから20°
CA進んだクランク角(ATDC20°CA)のタイミ
ングである(図5参照)。
On the other hand, the CPU 13 determines in step S110 that A
If it is determined that it is not the D start timing, S160
, The current NE pulse generation timing is the NE pulse generation timing immediately after the crank angle has passed the command angle, and the AD end timing as the detection end timing at which sampling of the combustion pressure signal should be ended. Is determined. In this example, A
D end timing is 20 ° from TDC of the first cylinder # 1.
This is the timing of the crank angle advanced by CA (ATDC 20 ° CA) (see FIG. 5).

【0041】そして、上記S160にてAD終了タイミ
ングであると判定したならば、S170に進んで、前述
したS150の場合と同様に、今回のNE割り込み処理
の起動時刻であって、今回のAD終了タイミングの時刻
(図5における時刻T2)を、RAM17に格納する。
そして更に、続くS180にて、後述する図3のコンペ
ア割り込み処理に対するAD終了要求をセットし、本N
E割り込み処理を終了する。尚、AD終了要求は、実際
には、図3のコンペア割り込み処理で参照されるフラグ
であり、S180では、そのAD終了要求用のフラグを
セットする。
If it is determined in S160 that it is the AD end timing, the process proceeds to S170. As in the case of S150 described above, the start time of the current NE interrupt process is determined. The timing time (time T2 in FIG. 5) is stored in the RAM 17.
Further, in subsequent S180, an AD end request for a compare interrupt process of FIG.
The E interrupt processing ends. Note that the AD end request is actually a flag referred to in the compare interrupt processing of FIG. 3, and in S180, the flag for the AD end request is set.

【0042】また、CPU13は、上記S160にてA
D終了タイミングではないと判定したならば、S190
に移行して、AD処理終了通知の有無を判定する。尚、
このAD処理終了通知は、後述する図3のコンペア割り
込み処理のS360でセットされるフラグであり、S1
90では、このAD処理終了通知用のフラグを参照し
て、そのフラグがセットされている場合に、AD処理終
了通知が有ったと判定する。
The CPU 13 determines in step S160 that A
If it is determined that it is not the D end timing, S190
To determine whether or not there is an AD processing end notification. still,
This AD processing end notification is a flag set in S360 of the compare interrupt processing of FIG.
In step 90, the process refers to the AD processing end notification flag, and determines that there is an AD processing end notification when the flag is set.

【0043】そして、AD処理終了通知が有ったなら
ば、S200に進んで、そのAD処理終了通知と上記S
180でセットしたAD終了要求との各フラグをクリア
する。そして更に、続くS210にて、後述する図4の
センサ値算出処理に対するセンサ値算出処理要求をセッ
トし、本NE割り込み処理を終了する。尚、センサ値算
出処理要求も、実際には、図4のセンサ値算出処理で参
照されるフラグであり、S210では、そのセンサ値算
出処理要求用のフラグをセットする。
Then, if there is an AD processing end notification, the process proceeds to S200, and the AD processing end notification and the S
The flags for the AD end request set in 180 are cleared. Further, in the following S210, a sensor value calculation processing request for the sensor value calculation processing of FIG. 4 described later is set, and the NE interruption processing ends. Note that the sensor value calculation process request is actually a flag that is referred to in the sensor value calculation process of FIG. 4, and in S210, a flag for the sensor value calculation process request is set.

【0044】一方また、CPU13は、上記S190に
てAD処理終了通知が無い(AD処理終了通知用のフラ
グがセットされていない)と判定したならば、そのま
ま、本NE割り込み処理を終了する。次に、図2のNE
割り込み処理におけるS130でコンペア割り込み要求
発生時刻がセットされてから、一定時間Tint が経過す
ると、マイコン23内でコンペア割り込み要求が発生
し、CPU13は、図3のコンペア割り込み処理の実行
を開始することとなる。
On the other hand, if the CPU 13 determines in step S190 that there is no AD processing completion notification (the flag for AD processing completion notification is not set), the CPU 13 terminates the NE interruption processing as it is. Next, NE of FIG.
When a predetermined time Tint elapses from the setting of the compare interrupt request generation time in S130 in the interrupt process, a compare interrupt request is generated in the microcomputer 23, and the CPU 13 starts executing the compare interrupt process of FIG. Become.

【0045】そして、図3に示すように、CPU13が
コンペア割り込み処理の実行を開始すると、まずS31
0にて、A/Dコンバータ19から、その時にA/D変
換されているデジタル値(燃焼圧信号のA/D変換値で
あり、以下、AD値ともいう)を読み出して、そのAD
値をRAM17の所定領域に格納する。
Then, as shown in FIG. 3, when the CPU 13 starts executing the compare interrupt processing, first, at S31
At 0, a digital value (A / D converted value of the combustion pressure signal, hereinafter also referred to as an AD value) which has been A / D converted at that time is read from the A / D converter 19, and the AD value is read.
The value is stored in a predetermined area of the RAM 17.

【0046】尚、このS310では、図2のS130で
コンペア割り込み要求発生時刻がセットされたことに伴
い当該コンペア割り込み処理が起動された場合には、A
/Dコンバータ19からのAD値(この場合には、図2
のS120で起動されたA/Dコンバータ19のAD
値)を、0番目のAD値(AD[0])としてRAM1
7に記憶する。そして、その後は、図2のS180でA
D終了要求がセットされるまで(即ち、AD終了タイミ
ングが到来するまで)の間、当該S310の実行タイミ
ング毎に、A/Dコンバータ19からのAD値を、1番
目のAD値(AD[1]),2番目のAD値(AD
[2]),3番目のAD値(AD[3])…といった具
合に、1ずつ増加する番号と対応させてRAM17に記
憶する。
In step S310, if the compare interrupt processing is started due to the setting of the compare interrupt request generation time in step S130 of FIG.
AD value from the / D converter 19 (in this case, FIG.
Of the A / D converter 19 started in S120 of FIG.
Value) as the 0th AD value (AD [0])
7 is stored. Then, at S180 in FIG.
Until the D end request is set (that is, until the AD end timing arrives), the AD value from the A / D converter 19 is changed to the first AD value (AD [1 ]), The second AD value (AD
[2]), the third AD value (AD [3]), etc., are stored in the RAM 17 in association with the numbers incremented by one.

【0047】そして、CPU13は、続くS320に
て、前述のAD終了要求がセットされているか否かを判
定し、AD終了要求がセットされていなければ(S32
0:無し)、S330に進んで、A/Dコンバータ19
を起動して該A/Dコンバータ19にセンサ値(燃焼圧
信号の値)をA/D変換させる。そして更に、続くS3
40にて、今回のコンペア割り込み処理の起動時刻から
一定時間Tint 後に再びコンペア割り込み要求が発生す
るように、コンペア割り込み要求発生時刻をセットし、
本コンペア割り込み処理を終了する。このため、S32
0でAD終了要求がセットされていないと判定された場
合には、A/Dコンバータ19が再び起動されると共
に、一定時間Tint 後に本コンペア割り込み処理が再度
起動されることとなる。
Then, in S320, the CPU 13 determines whether or not the above-described AD end request has been set, and if the AD end request has not been set (S32).
0: no), the process proceeds to S330, and the A / D converter 19
To cause the A / D converter 19 to A / D convert the sensor value (the value of the combustion pressure signal). And further, the following S3
At 40, the compare interrupt request generation time is set so that the compare interrupt request is generated again after a predetermined time Tint from the activation time of the current compare interrupt processing,
This compare interrupt processing ends. Therefore, S32
If it is determined at 0 that the AD end request has not been set, the A / D converter 19 is started again, and the compare interrupt process is started again after a predetermined time Tint.

【0048】尚、本実施形態において、上記一定時間T
int は、A/Dコンバータ19にセンサ値を繰り返しA
/D変換させる周期(サンプリング周期)である。そし
て、この一定時間Tint は、エンジン3が最高許容回転
数で運転される場合でも、例えば1°CAといった程度
の小さいクランク角毎に、A/D変換が行われるような
値に設定されている。例えば、本実施形態において、エ
ンジン3の最高許容回転数は5000rpmであり、一
定時間Tint は30μsに設定されている。よって仮
に、エンジン3が最高許容回転数よりも高い5600r
pmで運転されたとしても、約1°CA相当の時間毎に
センサ値のA/D変換が実施されることとなる。そして
更に、このことは、後述する処理2についても同じであ
る。
In this embodiment, the predetermined time T
int repeats the sensor value to the A / D converter 19
/ D conversion cycle (sampling cycle). The constant time Tint is set to a value such that the A / D conversion is performed at every small crank angle such as 1 ° CA even when the engine 3 is operated at the maximum allowable rotation speed. . For example, in the present embodiment, the maximum allowable rotation speed of the engine 3 is 5000 rpm, and the fixed time Tint is set to 30 μs. Therefore, if the engine 3 is higher than the maximum allowable rotation speed,
Even if the motor is operated at pm, A / D conversion of the sensor value is performed every time corresponding to about 1 ° CA. Further, this is the same for processing 2 described later.

【0049】一方、上記S320でAD終了要求がセッ
トされていると判定した場合には(S320:有り)、
S350に移行して、本コンペア割り込み処理が起動さ
れるのを禁止し、続くS360にて、図2のNE割り込
み処理に対しAD処理終了通知を行う。つまり、AD処
理終了通知用のフラグをセットして、図2のNE割り込
み処理に対し、検出開始タイミングとしてのAD起動タ
イミングから検出終了タイミングとしてのAD終了タイ
ミングまでのサンプリング期間におけるセンサ値のA/
D変換を、全て終えたことを通知する。そして、その
後、本コンペア割り込み処理を終了する。
On the other hand, if it is determined in S320 that the AD end request has been set (S320: Yes),
Proceeding to S350, the activation of this compare interrupt processing is prohibited, and in S360, an AD processing end notification is made for the NE interrupt processing of FIG. In other words, the flag for AD processing end notification is set, and the A / A of the sensor value in the sampling period from the AD start timing as the detection start timing to the AD end timing as the detection end timing is set for the NE interrupt processing in FIG.
Notifies that all D conversion has been completed. Then, the compare interrupt process ends.

【0050】以上のような図2のNE割り込み処理と図
3のコンペア割り込み処理とにより、本ECU1では、
図5に示すように、時刻T1で検出開始タイミングとし
てのAD起動タイミングが到来すると(AD起動タイミ
ングに該当するNEパルスが発生すると)、その時点か
ら、時刻T2で検出終了タイミングとしてのAD終了タ
イミングが到来するまで(AD終了タイミングに該当す
るNEパルスが発生するまで)のサンプリング期間の
間、A/Dコンバータ19が一定時間Tint 毎に起動さ
れて、その一定時間Tint 毎のAD値がRAM17に順
次記憶されることとなる。尚、図5において、A/Dコ
ンバータ19の起動タイミングは、△印で示されてい
る。
With the above-described NE interrupt processing in FIG. 2 and the compare interrupt processing in FIG.
As shown in FIG. 5, when the AD start timing as the detection start timing arrives at time T1 (when the NE pulse corresponding to the AD start timing occurs), from that time, the AD end timing as the detection end timing at time T2 The A / D converter 19 is activated every fixed time Tint during the sampling period until the arrival of the signal (until the NE pulse corresponding to the AD end timing is generated), and the AD value for each fixed time Tint is stored in the RAM 17. They are stored sequentially. In FIG. 5, the start timing of the A / D converter 19 is indicated by a triangle.

【0051】つまり、図5の時刻T1で検出開始タイミ
ングとしてのAD起動タイミングが到来すると、その時
点で、図2のS120により、A/Dコンバータ19が
最初に起動され、その際にA/D変換されたAD値は、
図2のS130から一定時間Tint 後に実行される最初
のコンペア割り込み処理(図3)のS310で、RAM
17に格納される。そして更に、その回のコンペア割り
込み処理のS330で、A/Dコンバータ19が再び起
動され、その際にA/D変換されたAD値は、その回の
コンペア割り込み処理から一定時間Tint 後に実行され
る次回のコンペア割り込み処理(図3)のS310で、
RAM17に格納ることとなる。そして、以後は、図5
の時刻T2で検出終了タイミングとしてのAD終了タイ
ミングが到来して、図2のS180でAD終了要求がセ
ットされるまで(即ち、図3のS320でAD終了要求
がセットされていると判定されるまで)、コンペア割り
込み処理が一定時間Tint 毎に実行され、そのコンペア
割り込み処理のS330とS310とにより、A/Dコ
ンバータ19の起動とAD値のRAM17への格納とが
繰り返し行われることとなる。
That is, when the AD start timing as the detection start timing arrives at time T1 in FIG. 5, at that time, the A / D converter 19 is first started by S120 in FIG. The converted AD value is
In S310 of the first compare interrupt processing (FIG. 3) executed after a predetermined time Tint from S130 in FIG.
17 is stored. Further, at S330 of the current compare interrupt process, the A / D converter 19 is started again, and the AD value converted at this time is executed after a predetermined time Tint from the current compare interrupt process. In S310 of the next compare interrupt processing (FIG. 3),
This will be stored in the RAM 17. And thereafter, FIG.
At time T2, the AD end timing as the detection end timing arrives, and until the AD end request is set in S180 of FIG. 2 (that is, it is determined that the AD end request is set in S320 of FIG. 3). Up to this point), the compare interrupt process is executed at regular intervals of Tint, and the start of the A / D converter 19 and the storage of the AD value in the RAM 17 are repeatedly performed by S330 and S310 of the compare interrupt process.

【0052】また、検出開始タイミングとしてのAD起
動タイミングの時刻T1と、検出終了タイミングとして
のAD終了タイミングの時刻T2とが、図2のS150
とS170との各々により、RAM17に格納される。
そして、本ECU1においては、検出終了タイミングと
してのAD終了タイミングが到来して、図2のS180
によりAD終了要求がセットされ、それに伴い、図3の
S360でAD処理終了通知用のフラグがセットされる
と、次のNEパルスが発生した時(即ち、図5における
時刻T2の次にクランク角信号が立ち上がった時)のN
E割り込み処理にて、S110とS160との両方で否
定判定され、S190でAD処理終了通知が有ったと判
定されることとなる。そして更に、その回のNE割り込
み処理のS210にて、センサ値算出処理要求がセット
されることとなる。
The time T1 of the AD start timing as the detection start timing and the time T2 of the AD end timing as the detection end timing correspond to S150 in FIG.
And S170 are stored in the RAM 17.
Then, in the present ECU 1, the AD end timing as the detection end timing comes, and S180 in FIG.
, An AD end request is set, and a flag for AD processing end notification is set in step S360 in FIG. 3. When the next NE pulse is generated (that is, the crank angle is set next to time T2 in FIG. 5). N when the signal rises)
In the E interrupt processing, a negative determination is made in both S110 and S160, and in S190, it is determined that there is an AD processing end notification. Further, in S210 of the NE interruption process, a sensor value calculation process request is set.

【0053】すると、そのセンサ値算出処理要求に応じ
て、図4のセンサ値算出処理が実質的に実行され、目的
のセンサ値(つまり、クランク角が指令角度となった時
のセンサ値)が算出されることとなる。即ち、図4のセ
ンサ値算出処理は定期的に実行される処理であり、CP
U13がこのセンサ値算出処理の実行を開始すると、ま
ず最初のS410にて、センサ値算出処理要求(詳しく
は、センサ値算出処理要求用のフラグ)がセットされて
いるか否かを判定する。
Then, in response to the request for the sensor value calculation process, the sensor value calculation process of FIG. 4 is substantially executed, and the target sensor value (ie, the sensor value when the crank angle reaches the command angle) is obtained. It will be calculated. That is, the sensor value calculation process of FIG.
When U13 starts execution of the sensor value calculation process, first, in S410, it is determined whether a sensor value calculation process request (specifically, a sensor value calculation request flag) is set.

【0054】そして、S410でセンサ値算出処理要求
がセットされていないと判定した場合には、そのまま何
もせずに本センサ値算出処理を終了するが、S410で
センサ値算出処理要求がセットされていると判定した場
合には、S420に進む。S420では、センサ値算出
処理要求のフラグをクリアし、続くS430にて、図2
のS150とS170とでRAM17に格納されたAD
起動タイミングの時刻T1とAD終了タイミングの時刻
T2とを読み出し、下記の式1により、指令角度が含ま
れているNEパルス間の間隔時間(つまり、サンプリン
グ期間の間隔時間)Tkを求める。
If it is determined in S410 that the request for sensor value calculation processing has not been set, the present sensor value calculation processing is terminated without doing anything, but the request for sensor value calculation processing is set in S410. If it is determined that there is, the process proceeds to S420. In S420, the flag of the sensor value calculation processing request is cleared, and in S430, the process proceeds to S420.
AD stored in the RAM 17 in S150 and S170
The time T1 of the start timing and the time T2 of the AD end timing are read, and the interval time Tk between the NE pulses including the command angle (that is, the interval time of the sampling period) Tk is obtained by the following equation 1.

【0055】Tk=T2−T1 …式1 そして更に、続くS440にて、上記S430で求めた
間隔時間Tkと、検出開始タイミングとしてのAD起動
タイミングでのクランク角(即ち、図5の時刻T1での
クランク角であり、本実施形態ではATDC10°C
A)から指令角度(本実施形態ではATDC15°C
A)までの角度β(図5参照)と、クランク角信号の1
周期分のクランク角である所定角度α(本実施形態では
10°CA)とから、下記の式2により、指令角度時刻
(即ち、クランク角が指令角度になった時刻)Ttarget
を算出する。
Tk = T2−T1 (Equation 1) Further, in the following S440, the interval time Tk obtained in S430 and the crank angle at the AD start timing as the detection start timing (that is, at the time T1 in FIG. 5). In this embodiment, the crank angle is ATDC10 ° C.
A) to the command angle (ATDC 15 ° C in this embodiment)
A) up to A) (see FIG. 5) and 1 of the crank angle signal.
From the predetermined angle α (10 ° CA in the present embodiment) which is the crank angle for the cycle, the command angle time (that is, the time when the crank angle becomes the command angle) T target is calculated by the following equation 2.
Is calculated.

【0056】Ttarget=(Tk÷α)×β …式2 尚、ここで算出される指令角度時刻Ttargetの値は、検
出開始タイミングとしてのAD起動タイミング(図5の
時刻T1)を基準にした値である。そして、続くS45
0にて、まず、周期指標iを0に初期化する。
Ttarget = (Tk ÷ α) × β (Equation 2) The value of the command angle time Ttarget calculated here is a value based on the AD start timing (time T1 in FIG. 5) as the detection start timing. It is. And the following S45
At 0, first, the cycle index i is initialized to 0.

【0057】次に、S460にて、周期指標iと、サン
プリング周期である一定時間Tintとの積「i×Tint
」が、S440で算出した指令角度時刻Ttargetより
も小さいか否かを判定し、肯定判定したならば、S47
0で周期指標iを1インクリメントしてから、再びS4
60の判定を行う。
Next, in S460, the product of the cycle index i and the fixed time Tint, which is the sampling cycle, is “i × Tint
Is smaller than the command angle time Ttarget calculated in S440, and if an affirmative determination is made, the process proceeds to S47.
After the period index i is incremented by 1 at 0, the process returns to S4
A determination of 60 is made.

【0058】そして、S460で、積「i×Tint 」が
指令角度時刻Ttargetよりも小さくないと否定判定した
ならば、S480に移行して、図2及び図3の処理でR
AM17に記憶した今回のサンプリング期間分のAD値
のうちで、その時の周期指標iによって特定されるi番
目のAD値(AD値[i])を、指令角度時刻Ttarget
でのセンサ値(即ち、クランク角が指令角度となった時
のセンサ値)ANSとして取得し、その後、本センサ値
算出処理を終了する。
If it is determined in S460 that the product "i.times.Tint" is not smaller than the command angle time Ttarget, the flow shifts to S480, where R is determined in the processing of FIGS.
Among the AD values for the current sampling period stored in the AM 17, the i-th AD value (AD value [i]) specified by the cycle index i at that time is set to the command angle time Ttarget
(That is, the sensor value when the crank angle becomes the command angle) ANS, and then the present sensor value calculation process ends.

【0059】つまり、S450〜S480の処理によ
り、記憶手段としてのRAM17に記憶されている各A
D値の中から、S440で算出した指令角度時刻Ttarg
etを越えた直後のタイミングでA/D変換されたAD値
(図5においては、「ANS」なる符号を付した△印の
タイミングでA/D変換されたAD値)を、指令角度時
刻Ttargetに最も近いタイミングでのAD値と見なして
選択し、その選択したAD値を、クランク角が指令角度
となった時の目的のセンサ値ANSとして扱うようにし
ている。
That is, by the processing of S450 to S480, each A stored in the RAM 17
From the D values, the command angle time Ttarg calculated in S440
The A / D-converted AD value (in FIG. 5, the A / D-converted A / D-converted AD value in FIG. 5 at the timing indicated by the symbol “ANS”) immediately after the timing exceeds the command angle time Ttarget The selected AD value is treated as the target sensor value ANS when the crank angle becomes the command angle.

【0060】以上のような本実施形態のECU1では、
クランク角信号の各周期のうちで、クランク角が指令角
度となる時点を含んだ周期を、サンプリング期間として
いるため、そのサンプリング期間の開始時及び終了時に
おけるクランク角は、エンジン3の回転変動に拘わらず
正確に把握され、また、そのサンプリング期間の開始と
終了との各々の時刻T1,T2は、図2のNE割り込み
処理のS150及びS170によって正確に計測され
る。
In the ECU 1 of the present embodiment as described above,
In each cycle of the crank angle signal, the cycle including the time when the crank angle becomes the command angle is set as the sampling period. Therefore, the crank angle at the start and the end of the sampling period depends on the rotation fluctuation of the engine 3. Regardless, it is accurately grasped, and the times T1 and T2 at the start and end of the sampling period are accurately measured by S150 and S170 of the NE interrupt process in FIG.

【0061】このため、図4のセンサ値算出処理で算出
される指令角度時刻Ttargetは、エンジン3の回転変動
の影響を殆ど受けない正確な値となる。つまり、サンプ
リング期間の開始と終了との各時刻T1,T2は正確に
計測され、また、検出開始タイミング(サンプリング期
間の開始時)T1でのクランク角は正確に把握される値
であるため、そのクランク角から指令角度までの角度β
も正確な値であり、更に、クランク角信号の1周期分の
クランク角である所定角度αは既知の固定値であるた
め、それらの正確な情報から式1,2により算出される
指定角度時間Ttargetは、エンジン3の回転変動に殆ど
影響されない正確な値となる。
For this reason, the command angle time Ttarget calculated in the sensor value calculation processing of FIG. 4 is an accurate value which is hardly affected by the rotation fluctuation of the engine 3. That is, the times T1 and T2 at the start and end of the sampling period are accurately measured, and the crank angle at the detection start timing (at the start of the sampling period) T1 is a value that can be accurately grasped. Angle β from crank angle to command angle
Is also an accurate value, and the predetermined angle α, which is the crank angle for one cycle of the crank angle signal, is a known fixed value. Ttarget is an accurate value that is hardly affected by the rotation fluctuation of the engine 3.

【0062】そして、図4のセンサ値算出処理により、
そのような正確な指令角度時刻Ttargetに基づいて、サ
ンプリング期間中の一定時間Tint 毎のAD値から選択
される目的のセンサ値ANSも、エンジン3の回転変動
の影響を殆ど受けることなく、クランク角が実際に指令
角度になった時のセンサ値により近い値となる。
Then, by the sensor value calculation processing of FIG.
Based on such an accurate command angle time Ttarget, the target sensor value ANS selected from the AD value for each fixed time Tint during the sampling period is almost unaffected by the rotation fluctuation of the engine 3 and the crank angle Is closer to the sensor value when the angle actually reaches the command angle.

【0063】よって、本実施形態のECU1によれば、
クランク角が指令角度となった時のセンサ値を、従来よ
りも格段に高い精度で検出できるようになる。尚、本実
施形態では、図2のNE割り込み処理におけるS110
〜S140,S160,及びS180〜S210と図3
のコンペア割り込み処理とが、請求項1のサンプリング
手段に相当し、図2のNE割り込み処理におけるS15
0及びS170が、請求項1の計時手段に相当してい
る。そして、図4のセンサ値算出処理が、センサ値算出
手段に相当している。
Therefore, according to the ECU 1 of the present embodiment,
The sensor value when the crank angle becomes the command angle can be detected with much higher accuracy than in the past. In the present embodiment, S110 in the NE interrupt processing of FIG.
To S140, S160, and S180 to S210 and FIG.
2 corresponds to the sampling means of claim 1 and corresponds to S15 in the NE interrupt processing of FIG.
0 and S170 correspond to the timing means of claim 1. The sensor value calculation processing in FIG. 4 corresponds to a sensor value calculation unit.

【0064】一方、図4のS450〜S480では、例
えば、RAM17に記憶されているサンプリング期間分
のAD値の中から、S440で算出した指令角度時刻T
targetの直前のタイミングでA/D変換されたAD値
と、その指令角度時刻Ttargetの直後のタイミングでA
/D変換されたAD値とを選択して、その選択した2つ
のAD値から、補間処理によって、指令角度時刻Ttarg
etでのセンサ値を算出するようにしても良い。このよう
にすれば、検出精度を一層向上させることができる。 [処理2:センサ値が最大値となった時のクランク角を
検出する処理]次に、図6〜図9を参照して、センサ値
が最大値となった時のクランク角を検出するための処理
2について説明する。
On the other hand, in S450 to S480 in FIG. 4, for example, the command angle time T calculated in S440 from the AD values for the sampling period stored in the RAM 17 is used.
The A / D-converted AD value at the timing immediately before the target and the A / D conversion at the timing immediately after the command angle time Ttarget
/ D converted AD value is selected, and the command angle time Ttarg is determined from the selected two AD values by interpolation processing.
The sensor value of et may be calculated. By doing so, the detection accuracy can be further improved. [Processing 2: Processing for Detecting Crank Angle When Sensor Value Has Maximum Value] Next, referring to FIGS. 6 to 9, in order to detect the crank angle when the sensor value has maximum value. The process 2 of will be described.

【0065】尚、以下の説明においては、NEパルスが
発生する各タイミングのうちで、第1気筒#1のATD
C10°CAのタイミングから第1気筒#1のATDC
30°CAのタイミングまでの20°CA分の期間が、
センサ値が最大値となった時のクランク角を検出すべき
監視期間として設定されているものとする。つまり、こ
こでは、ATDC10°CAが監視開始タイミング(即
ち、監視期間の開始タイミング)に対応する第1の角度
であり、ATDC30°CAが監視終了タイミング(即
ち、監視期間の終了タイミング)に対応する第2の角度
であるものとする。
In the following description, among the timings at which the NE pulse is generated, the ATD of the first cylinder # 1
ATDC of the first cylinder # 1 from the timing of C10 ° CA
The period of 20 ° CA up to the timing of 30 ° CA is
It is assumed that the monitoring period is set to detect the crank angle when the sensor value reaches the maximum value. That is, here, ATDC10 ° CA is the first angle corresponding to the monitoring start timing (ie, the start timing of the monitoring period), and ATDC 30 ° CA corresponds to the monitoring end timing (ie, the end timing of the monitoring period). Let it be the second angle.

【0066】まず図6は、CPU13が処理2のために
実行するNE割り込み処理を表すフローチャートであ
り、このNE割り込み処理は、クランク角信号の立ち上
がりエッジであるNEパルスが発生する毎に実行され
る。図6に示すように、CPU13がNE割り込み処理
の実行を開始すると、まずS510にて、今回のNEパ
ルスの発生タイミングが、監視開始タイミング(監視期
間の開始タイミング)としてのAD起動タイミング(こ
の例では、第1気筒#1のATDC10°CAのタイミ
ング)であるか否かを判定する。
FIG. 6 is a flowchart showing an NE interrupt process executed by the CPU 13 for the process 2. This NE interrupt process is executed every time an NE pulse which is a rising edge of the crank angle signal is generated. . As shown in FIG. 6, when the CPU 13 starts execution of the NE interrupt processing, first, in S510, the generation timing of the current NE pulse is set to the AD start timing as the monitoring start timing (start timing of the monitoring period) (this example). Then, it is determined whether or not it is the timing of ATDC10 ° CA of the first cylinder # 1).

【0067】そして、上記S510にてAD起動タイミ
ングであると判定したならば、S520に進んで、A/
Dコンバータ19を起動して該A/Dコンバータ19に
燃焼圧信号の値であるセンサ値をA/D変換させ、次の
S530にて、その時点から一定時間Tint (本処理2
においても30μs)後にマイコン23内でコンペア割
り込み要求が発生するように、コンペア割り込み要求発
生時刻をセットし、続くS540にて、そのコンペア割
り込み要求に対応する図7のコンペア割り込み処理が起
動されるのを許可する。そして更に、続くS550に
て、今回のNE割り込み処理の起動時刻であって、今回
のAD起動タイミングの時刻を、RAM17に格納し
て、本NE割り込み処理を終了する。
If it is determined in S510 that it is the AD start timing, the process proceeds to S520, where A / A
The D / A converter 19 is activated to cause the A / D converter 19 to A / D convert the sensor value, which is the value of the combustion pressure signal.
In this case, a compare interrupt request generation time is set so that a compare interrupt request is generated in the microcomputer 23 after 30 μs). Then, in S540, the compare interrupt processing of FIG. 7 corresponding to the compare interrupt request is started. Allow Then, in S550, the start time of the current NE interrupt processing, that is, the time of the current AD start timing, is stored in the RAM 17, and the NE interrupt processing ends.

【0068】一方、CPU13は、上記S510にてA
D起動タイミングではないと判定したならば、S560
に移行して、今回のNEパルスの発生タイミングが、監
視終了タイミング(監視期間の終了タイミング)として
のAD終了タイミング(この例では、第1気筒#1のA
TDC30°CAのタイミング)であるか否かを判定す
る。
On the other hand, the CPU 13 determines in step S510 that A
If it is determined that it is not the D start timing, S560
, And the generation timing of the current NE pulse is determined to be the AD end timing (the A cylinder of the first cylinder # 1 in this example) as the monitoring end timing (end timing of the monitoring period).
TDC 30 ° CA).

【0069】そして、上記S560にてAD終了タイミ
ングであると判定したならば、S570に進んで、今回
のNE割り込み処理の起動時刻であって、今回のAD終
了タイミングの時刻をRAM17に格納する。そして更
に、続くS580にて、後述する図7のコンペア割り込
み処理に対するAD終了要求をセットし、本NE割り込
み処理を終了する。尚、AD終了要求は、実際には、図
7のコンペア割り込み処理で参照されるフラグであり、
S580では、そのAD終了要求用のフラグをセットす
る。
If it is determined in S560 that it is the AD end timing, the process proceeds to S570, and the start time of the current NE interrupt process and the time of the current AD end timing are stored in the RAM 17. Then, in S580, an AD end request for a compare interrupt process of FIG. 7 described later is set, and the NE interrupt process ends. Note that the AD end request is actually a flag referred to in the compare interrupt processing of FIG.
In S580, the flag for the AD end request is set.

【0070】また、CPU13は、上記S560にてA
D終了タイミングではないと判定したならば、S590
に移行して、AD処理実施中(即ち、監視期間中)であ
るか否かを判定する。尚、このS590では、今回発生
したNEパルスが、AD起動タイミングからAD終了タ
イミングまでの間に発生するNEパルスであった場合
に、AD処理実施中であると判定する。
The CPU 13 determines in step S560 that A
If it is determined that it is not the D end timing, S590
Then, it is determined whether or not the AD processing is being performed (that is, during the monitoring period). In S590, when the NE pulse generated this time is the NE pulse generated between the AD start timing and the AD end timing, it is determined that the AD processing is being performed.

【0071】そして、S590にてAD処理実施中であ
ると判定した場合には、S600に進んで、今回のNE
割り込み処理の起動時刻であって、今回のNEパルスの
発生時刻をRAM17に格納し、本NE割り込み処理を
終了する。一方、CPU13は、上記S590にてAD
処理実施中ではないと判定したならば、S610に移行
して、AD処理終了通知の有無を判定する。尚、このA
D処理終了通知は、後述する図7のコンペア割り込み処
理のS760でセットされるフラグであり、S610で
は、このAD処理終了通知用のフラグを参照して、その
フラグがセットされている場合に、AD処理終了通知が
有ったと判定する。
If it is determined in step S590 that the AD processing is being performed, the process proceeds to step S600, where the current NE is executed.
The start time of the interrupt processing, that is, the time of occurrence of the current NE pulse, is stored in the RAM 17, and the NE interrupt processing ends. On the other hand, the CPU 13 determines that AD
If it is determined that the processing is not being performed, the process proceeds to S610, and it is determined whether there is an AD processing end notification. In addition, this A
The D processing end notification is a flag that is set in S760 of the compare interrupt processing of FIG. 7 described later. In S610, by referring to the AD processing end notification flag, if the flag is set, It is determined that there is an AD processing end notification.

【0072】そして、AD処理終了通知が有ったなら
ば、S620に進んで、そのAD処理終了通知と上記S
580でセットしたAD終了要求との各フラグをクリア
する。そして更に、続くS630にて、後述する図8の
最大値発生角度算出処理に対する最大値発生角度算出処
理要求をセットし、本NE割り込み処理を終了する。
尚、最大値発生角度算出処理要求も、実際には、図8の
最大値発生角度算出処理で参照されるフラグであり、S
630では、その最大値発生角度算出処理要求用のフラ
グをセットする。
If there is an AD processing end notification, the process proceeds to S620, where the AD processing end notification and the above S
The flags for the AD end request set in 580 are cleared. Then, in S630, a request for calculating a maximum value generation angle for the calculation of a maximum value generation angle in FIG. 8 described later is set, and the NE interruption process ends.
Note that the maximum value generation angle calculation processing request is actually a flag referred to in the maximum value generation angle calculation processing in FIG.
At 630, a flag for requesting the maximum value generation angle calculation processing is set.

【0073】また、CPU13は、上記S610にてA
D処理終了通知が無い(AD処理終了通知用のフラグが
セットされていない)と判定したならば、そのまま、本
NE割り込み処理を終了する。尚、本処理2において
も、CPU13は、マイコン23内で常時カウントアッ
プされているフリーランニングカウンタの値を時刻とし
て扱っている。
The CPU 13 determines in step S610 that A
If it is determined that there is no D processing end notification (the AD processing end notification flag is not set), the NE interruption processing is terminated as it is. Note that, also in the present processing 2, the CPU 13 treats the value of the free running counter constantly counted up in the microcomputer 23 as time.

【0074】そして、特にS550では、今回のNE割
り込み処理の起動時刻(AD起動タイミングの時刻)
を、1番目の時刻T[1]としてRAM17に格納す
る。このため、図9の時刻TaでAD起動タイミングに
該当するATDC10°CAのNEパルスが発生したと
すると、CPU13は、上記S550にて、時刻Taで
のフリーランニングカウンタの値を、1番目の時刻T
[1]としてRAM17に格納することとなる。
In particular, in S550, the activation time of the current NE interrupt process (the time of the AD activation timing)
Is stored in the RAM 17 as the first time T [1]. Therefore, if an NE pulse of ATDC10 ° CA corresponding to the AD start timing is generated at time Ta in FIG. 9, the CPU 13 sets the value of the free running counter at time Ta to the first time at S550. T
This is stored in the RAM 17 as [1].

【0075】また、S600では、S510でAD起動
タイミングであると判定された次の回の実行時ならば、
今回のNEパルスの発生時刻を2番目の時刻T[2]と
してRAM17に格納する。そして、その後は、S56
0でAD終了タイミングであると判定されるまで、当該
S600の実行タイミング毎に、その回のNEパルスの
発生時刻を、3番目の時刻T[3],4番目の時刻T
[4],…といった具合に、1ずつ増加する番号と対応
させてRAM17に記憶する。
In S600, if it is the next execution that is determined to be the AD start timing in S510,
The generation time of the current NE pulse is stored in the RAM 17 as the second time T [2]. And after that, S56
0, the time when the NE pulse is generated is set to the third time T [3] and the fourth time T
[4],..., Etc., are stored in the RAM 17 in association with the numbers incremented by one.

【0076】そして更に、S570では、今回のNE割
り込み処理の起動時刻(AD終了タイミングの時刻)
を、上記S600で最後に記憶された時刻の番号の次の
番号の時刻として、RAM17に格納する。但し、この
例では、図9に示すように、AD起動タイミングが第1
気筒#1のATDC10°CAのタイミングであり、A
D終了タイミングが第1気筒#1のATDC30°CA
のタイミングであるため、S600の処理は、第1気筒
#1のATDC20°CAのタイミングでのみ実行され
ることなる。
Further, at S570, the activation time of this NE interruption processing (the time of the AD end timing)
Is stored in the RAM 17 as the time following the number of the time last stored in S600. However, in this example, as shown in FIG.
It is the timing of ATDC10 ° CA for cylinder # 1,
D end timing is ATDC 30 ° CA of the first cylinder # 1
Therefore, the process of S600 is executed only at the timing of ATDC20 ° CA of the first cylinder # 1.

【0077】よって、この例では、図9の時刻TbでA
TDC20°CAのNEパルスが発生したとすると、C
PU13は、S600にて、時刻Tbでのフリーランニ
ングカウンタの値を、2番目の時刻T[2]としてRA
M17に格納することとなり、その後、図9の時刻Tc
でAD終了タイミングに該当するATDC30°CAの
NEパルスが発生したとすると、CPU13は、上記S
570にて、時刻Tcでのフリーランニングカウンタの
値を、3番目の時刻T[3]としてRAM17に格納す
ることとなる。
Therefore, in this example, at time Tb in FIG.
If an NE pulse of TDC 20 ° CA is generated, C
In S600, the PU 13 sets the value of the free running counter at the time Tb as the second time T [2] and sets the RA
M17, and thereafter, at time Tc in FIG.
Assuming that the NE pulse of ATDC 30 ° CA corresponding to the AD end timing is generated at
At 570, the value of the free running counter at time Tc is stored in the RAM 17 as the third time T [3].

【0078】次に、図6のNE割り込み処理におけるS
530でコンペア割り込み要求発生時刻がセットされて
から、一定時間Tint (=30μs)が経過すると、マ
イコン23内でコンペア割り込み要求が発生し、CPU
13は、図7のコンペア割り込み処理の実行を開始する
こととなる。
Next, S in the NE interrupt processing of FIG.
When a predetermined time Tint (= 30 μs) elapses after the compare interrupt request generation time is set in 530, a compare interrupt request is generated in the microcomputer 23, and the CPU
Step 13 starts the execution of the compare interrupt processing of FIG.

【0079】そして、図7に示すように、CPU13が
コンペア割り込み処理の実行を開始すると、まずS71
0にて、A/Dコンバータ19から、その時にA/D変
換されているデジタル値(AD値)を読み出して、その
AD値をRAM17の所定領域に格納する。
Then, as shown in FIG. 7, when the CPU 13 starts execution of the compare interrupt processing, first, in S71,
At 0, the digital value (AD value) that has been A / D converted at that time is read from the A / D converter 19, and the AD value is stored in a predetermined area of the RAM 17.

【0080】次に、CPU13は、続くS715にて、
上記S710の処理でそれまでにA/Dコンバータ19
から取得したAD値のうちの最大値と、その最大値がA
/D変換された時刻(特定値発生時刻に相当し、以下、
最大値発生時刻という)Tとを検出して、その検出した
最大値及び最大値発生時刻TをRAM17に格納する処
理を行う。尚、最大値及び最大値発生時刻Tを求めるS
715の処理は、図6のS530でコンペア割り込み要
求発生時刻がセットされたことに伴い当該コンペア割り
込み処理が実行された場合を起点として実施される。
Next, the CPU 13 proceeds to step S715.
By the processing of S710, the A / D converter 19
And the maximum value of the AD values obtained from
/ D converted time (corresponding to the specific value occurrence time; hereinafter,
The maximum value and the maximum value occurrence time T are stored in the RAM 17. Note that the maximum value and the maximum value occurrence time T are determined by S
The processing of 715 is performed starting from the case where the compare interrupt processing is executed in accordance with the setting of the compare interrupt request occurrence time in S530 of FIG.

【0081】そして、CPU13は、続くS720に
て、前述のAD終了要求がセットされているか否かを判
定し、AD終了要求がセットされていなければ(S72
0:無し)、S730に進んで、A/Dコンバータ19
を起動して該A/Dコンバータ19にセンサ値(燃焼圧
信号の値)をA/D変換させる。そして更に、続くS7
40にて、今回のコンペア割り込み処理の起動時刻から
一定時間Tint (=30μs)後に再びコンペア割り込
み要求が発生するように、コンペア割り込み要求発生時
刻をセットし、本コンペア割り込み処理を終了する。こ
のため、S720でAD終了要求がセットされていない
と判定された場合には、A/Dコンバータ19が再び起
動されると共に、上記一定時間Tint 後に本コンペア割
り込み処理が再度起動されることとなる。
Then, in subsequent S720, CPU 13 determines whether or not the above-described AD end request has been set, and if the AD end request has not been set (S72).
0: none), the process proceeds to S730, and the A / D converter 19
To cause the A / D converter 19 to A / D convert the sensor value (the value of the combustion pressure signal). And further, the following S7
At 40, the compare interrupt request generation time is set so that the compare interrupt request is generated again after a fixed time Tint (= 30 μs) from the start time of the current compare interrupt processing, and the compare interrupt processing is terminated. Therefore, if it is determined in S720 that the AD end request has not been set, the A / D converter 19 is started again, and the compare interrupt process is started again after the predetermined time Tint. .

【0082】一方、上記S720でAD終了要求がセッ
トされていると判定した場合には(S720:有り)、
S750に移行して、本コンペア割り込み処理が起動さ
れるのを禁止し、続くS760にて、図6のNE割り込
み処理に対しAD処理終了通知を行う。つまり、AD処
理終了通知用のフラグをセットして、図6のNE割り込
み処理に対し、監視開始タイミングとしてのAD起動タ
イミングから監視終了タイミングとしてのAD終了タイ
ミングまでの監視期間におけるセンサ値のA/D変換
を、全て終えたことを通知する。そして、その後、本コ
ンペア割り込み処理を終了する。
On the other hand, if it is determined in S720 that the AD end request has been set (S720: Yes),
Proceeding to S750, the activation of this compare interrupt processing is prohibited, and in S760, AD processing end notification is performed for the NE interrupt processing of FIG. That is, a flag for AD processing end notification is set, and the A / A of the sensor value in the monitoring period from the AD start timing as the monitoring start timing to the AD end timing as the monitoring end timing is set for the NE interrupt processing in FIG. Notifies that all D conversion has been completed. Then, the compare interrupt process ends.

【0083】以上のような図6のNE割り込み処理と図
7のコンペア割り込み処理とにより、本ECU1の処理
2においては、図9に示すように、時刻Taで監視開始
タイミングとしてのAD起動タイミングが到来すると
(AD起動タイミングに該当するNEパルスが発生する
と)、その時点から、時刻Tcで監視終了タイミングと
してのAD終了タイミングが到来するまで(AD終了タ
イミングに該当するNEパルスが発生するまで)の監視
期間の間、A/Dコンバータ19が一定時間Tint 毎に
起動され、CPU13は、その一定時間Tint 毎のAD
値を順次取得することとなる。尚、図9においても、図
5と同様に、A/Dコンバータ19の起動タイミング
は、△印で示されている。
By the above-described NE interrupt processing of FIG. 6 and the compare interrupt processing of FIG. 7, in the processing 2 of the ECU 1, as shown in FIG. When it arrives (when an NE pulse corresponding to the AD start timing is generated), from that time until the AD end timing as the monitoring end timing arrives at time Tc (until the NE pulse corresponding to the AD end timing is generated). During the monitoring period, the A / D converter 19 is activated at every fixed time Tint, and the CPU 13 sets the AD at every fixed time Tint.
The values are obtained sequentially. Note that, in FIG. 9, as in FIG. 5, the start timing of the A / D converter 19 is indicated by a triangle.

【0084】つまり、図9の時刻Taで監視開始タイミ
ングとしてのAD起動タイミングが到来すると、その時
点で、図6のS520により、A/Dコンバータ19が
最初に起動され、その際にA/D変換されたAD値は、
図6のS530から一定時間Tint 後に実行される最初
のコンペア割り込み処理(図7)のS710で、A/D
コンバータ19からCPU13へと読み込まれる。そし
て更に、その回のコンペア割り込み処理のS730で、
A/Dコンバータ19が再び起動され、その際にA/D
変換されたAD値は、その回のコンペア割り込み処理か
ら一定時間Tint 後に実行される次回のコンペア割り込
み処理(図7)のS710で、A/Dコンバータ19か
らCPU13へと読み込まれることとなる。そして、以
後は、図9の時刻Tcで監視終了タイミングとしてのA
D終了タイミングが到来して、図6のS580でAD終
了要求がセットされるまで(即ち、図7のS720でA
D終了要求がセットされていると判定されるまで)、コ
ンペア割り込み処理が一定時間Tint 毎に実行され、そ
のコンペア割り込み処理のS730とS710とによ
り、A/Dコンバータ19の起動とA/Dコンバータ1
9からのAD値の読み込みとが繰り返し行われることと
なる。
That is, when the AD start timing as the monitoring start timing arrives at time Ta in FIG. 9, at that time, the A / D converter 19 is first started by S520 in FIG. The converted AD value is
In S710 of the first compare interrupt processing (FIG. 7) executed after a fixed time Tint from S530 in FIG.
The data is read from the converter 19 to the CPU 13. Further, at S730 of the compare interrupt processing of the time,
The A / D converter 19 is activated again, at which time the A / D
The converted AD value is read from the A / D converter 19 to the CPU 13 in S710 of the next compare interrupt process (FIG. 7) executed after a predetermined time Tint from the current compare interrupt process. Thereafter, at time Tc in FIG.
The D end timing has arrived, and until the AD end request is set in S580 of FIG. 6 (that is, A is set in S720 of FIG. 7).
Until it is determined that the D end request has been set), the compare interrupt processing is executed at fixed time intervals Tint, and the start of the A / D converter 19 and the A / D converter are performed by S730 and S710 of the compare interrupt processing. 1
The reading of the AD value from No. 9 is repeatedly performed.

【0085】そして更に、CPU13は、図7のS71
5の処理により、上記監視期間分の多数のAD値の中か
ら、特定値としての最大値になったAD値(以下、単に
「最大値」ともいう)を選択すると共に、その最大値の
A/D変換時刻である最大値発生時刻Tを検出すること
となる。
Then, the CPU 13 proceeds to S71 of FIG.
By the process of step 5, an AD value having a maximum value as a specific value (hereinafter, also simply referred to as a “maximum value”) is selected from among a large number of AD values for the monitoring period, and A of the maximum value is selected. The maximum value occurrence time T, which is the / D conversion time, is detected.

【0086】具体的に説明すると、S715での最大値
の選択は、S710で今回取得したAD値と、それまで
の最大値とを比較して、大きい方を最新の最大値として
記憶する、といった手順で行われる。また、S715で
の最大値発生時刻Tの検出は、上記の選択で最大値とし
たAD値をA/Dコンバータ19から取得した回の当該
コンペア割り込み処理の起動時刻よりも一定時間Tint
だけ前の時刻を、最大値発生時刻Tとする、といった手
順で行われる。
More specifically, the selection of the maximum value in S715 includes comparing the AD value acquired this time in S710 with the maximum value so far, and storing the larger one as the latest maximum value. Done in steps. Further, the detection of the maximum value occurrence time T in S715 is performed by a fixed time Tint from the start time of the compare interrupt processing in the case where the AD value set as the maximum value in the above selection is acquired from the A / D converter 19.
The previous time is set as the maximum value occurrence time T.

【0087】尚、S710で監視期間内に取得した多数
のAD値を全てRAM17内に記憶しておいて、その監
視期間の終了後に、それらAD値の中から最大値を選択
し、更に、その最大値がAD起動タイミングから何番目
のサンプリング周期でA/D変換されたかと、AD起動
タイミングの時刻とから、最大値発生時刻Tを求めるよ
うにしても良い。
Note that a large number of AD values acquired during the monitoring period in S710 are all stored in the RAM 17, and after the monitoring period ends, the maximum value is selected from among those AD values. The maximum value generation time T may be obtained from the number of sampling cycles from the AD start timing at which the A / D conversion is performed and the time of the AD start timing.

【0088】また、本ECU1の処理2においては、図
6のS550とS570とS600との各々により、監
視期間におけるNEパルスの各発生タイミングであっ
て、監視開始タイミングとしてのAD起動タイミング
と、監視終了タイミングとしてのAD終了タイミングと
を含む各タイミングの時刻が計測されると共に、その各
時刻が、早いものから順に、T[1],T[2],…と
いった具合に番号付けされて、RAM17に格納され
る。
In the processing 2 of the ECU 1, the timings of the generation of the NE pulse during the monitoring period, ie, the AD start timing as the monitoring start timing, and the monitoring start timing are determined by S550, S570 and S600 in FIG. The time of each timing including the AD end timing as the end timing is measured, and each time is numbered in the order of T [1], T [2],. Is stored in

【0089】そして、本ECU1の処理2においては、
監視終了タイミングとしてのAD終了タイミングが到来
して、図6のS580によりAD終了要求がセットさ
れ、それに伴い、図7のS760でAD処理終了通知用
のフラグがセットされると、次のNEパルスが発生した
時(即ち、図9における時刻Tcの次にクランク角信号
が立ち上がった時)のNE割り込み処理にて、S51
0,S560,及びS590の全てで否定判定され、S
610でAD処理終了通知が有ったと判定されることと
なる。そして更に、その回のNE割り込み処理のS63
0にて、最大値発生角度算出処理要求がセットされるこ
ととなる。
Then, in the process 2 of the ECU 1,
When the AD end timing as the monitoring end timing arrives, the AD end request is set in S580 of FIG. 6, and accordingly, the flag for AD processing end notification is set in S760 of FIG. (Ie, when the crank angle signal rises after time Tc in FIG. 9) in the NE interrupt processing,
0, S560, and S590 are all negative, and S
At 610, it is determined that there is an AD processing end notification. Further, the S63 of the NE interruption processing of that time
At 0, the maximum value generation angle calculation processing request is set.

【0090】すると、その最大値発生角度算出処理要求
に応じて、図8の最大値発生角度算出処理が実質的に実
行され、目的のクランク角(つまり、センサ値が最大値
となった時のクランク角)が算出されることとなる。即
ち、図8の最大値発生角度算出処理は定期的に実行され
る処理であり、CPU13がこの処理の実行を開始する
と、まず最初のS810にて、最大値発生角度算出処理
要求(詳しくは、最大値発生角度算出処理要求用のフラ
グ)がセットされているか否かを判定する。
Then, in response to the request for calculating the maximum value generation angle, the maximum value generation angle calculation processing shown in FIG. 8 is substantially executed, and the target crank angle (that is, when the sensor value reaches the maximum value) is obtained. Crank angle) is calculated. That is, the maximum value generation angle calculation process in FIG. 8 is a process that is periodically executed. When the CPU 13 starts executing this process, first, in the first step S810, a maximum value generation angle calculation process request (for details, It is determined whether or not the flag for requesting the maximum value generation angle calculation process is set.

【0091】そして、S810で最大値発生角度算出処
理要求がセットされていないと判定した場合には、その
まま何もせずに本処理を終了するが、S810で最大値
発生角度算出処理要求がセットされていると判定した場
合には、S820に進む。S820では、最大値発生角
度算出処理要求のフラグをクリアし、続くS830に
て、まず、時刻指標mを0に初期化する。
If it is determined in step S810 that the request for calculating the maximum value generation angle has not been set, the process ends without performing any processing, but the request for calculating the maximum value generation angle is set in step S810. If it is determined that there is, the process proceeds to S820. In S820, the flag of the maximum value generation angle calculation processing request is cleared, and in S830, the time index m is first initialized to 0.

【0092】次に、S840にて、図6のS550,S
570,及びS600によりRAM17に格納された各
番号の時刻のうちで、その時の時刻指標mに1を加えた
番号(m+1)の時刻T[m+1]が、図7のS715
で求められた最大値発生時刻Tよりも大きいか否か(つ
まり、最大値発生時刻Tが時刻T[m]と時刻T[m+
1]との間になっているか否か)を判定し、否定判定し
たならば、S850で時刻指標mを1インクリメントし
てから、再びS840の判定を行う。
Next, at S840, S550 and S550 in FIG.
570 and the time T [m + 1] of the number (m + 1) obtained by adding 1 to the time index m at that time among the times stored in the RAM 17 by S600 in S715 of FIG.
(Ie, the maximum value generation time T is equal to the time T [m] and the time T [m +
1], and if a negative determination is made, the time index m is incremented by one in S850, and the determination in S840 is performed again.

【0093】そして、S840で、時刻T[m+1]が
最大値発生時刻Tよりも大きいと肯定判定したならば、
S860に進む。つまり、S830〜S850の処理に
より、監視期間における各NEパルス間(即ち、クラン
ク角信号の各周期)のうちで、最大値発生時刻Tを含ん
だNEパルス間を特定するようにしており、上記S84
0で肯定判定された時点では、図6のS550,S57
0,及びS600によりRAM17に格納された各番号
の時刻のうちで、その時の時刻指標mの番号の時刻T
[m]から、その時の時刻指標mに1を加えた番号の時
刻T[m+1]までのNEパルス間が、最大値発生時刻
Tを含んだNEパルス間であると特定されることとな
る。
If it is determined in S840 that the time T [m + 1] is greater than the maximum value occurrence time T,
The process proceeds to S860. That is, by the processing of S830 to S850, the interval between the NE pulses including the maximum value occurrence time T is specified among the NE pulses during the monitoring period (that is, each cycle of the crank angle signal). S84
When the determination is affirmative at 0, S550 and S57 in FIG.
0, and the time T of the number of the time index m at that time among the times of each number stored in the RAM 17 by S600.
An interval between NE pulses from [m] to a time T [m + 1] of a number obtained by adding 1 to the time index m at that time is specified as an interval between NE pulses including the maximum value occurrence time T.

【0094】S860では、RAM17から、最大値発
生時刻Tを含んだNEパルス間の開始時刻である時刻T
[m]と、そのNEパルス間の終了時刻T[m+1]と
を読み出して、下記の式3により、最大値発生時刻Tを
含んだNEパルス間の間隔時間と、そのNEパルス間の
開始時刻から最大値発生時刻Tまでの時間との比Rを算
出する。
At S860, the RAM 17 reads the time T which is the start time between NE pulses including the maximum value occurrence time T.
[M] and the end time T [m + 1] between the NE pulses are read out, and the following equation 3 is used to calculate the interval time between the NE pulses including the maximum value occurrence time T and the start time between the NE pulses. From the time to the maximum value occurrence time T is calculated.

【0095】 R=(T−T[m])÷(T[m+1]−T[m]) …式3 そして更に、続くS870にて、上記S860で求めた
比Rと、時刻T[m]でのクランク角CAmと、1NE
パルス間分(クランク角信号の1周期分)のクランク角
である所定角度α(本実施形態では10°CA)とか
ら、下記の式4により、最大値発生時刻Tでのクランク
角γを算出し、そのクランク角γを、センサ値が最大値
となった時のクランク角としてRAM17に記憶する。
そして、その後、本最大値発生角度算出処理を終了す
る。
R = (T−T [m]) ÷ (T [m + 1] −T [m]) Expression 3 Then, in S870, the ratio R obtained in S860 and the time T [m] Crank angle CAm and 1NE
From the predetermined angle α (10 ° CA in the present embodiment) which is the crank angle between pulses (one cycle of the crank angle signal), the crank angle γ at the maximum value occurrence time T is calculated by the following equation 4. Then, the crank angle γ is stored in the RAM 17 as the crank angle when the sensor value reaches the maximum value.
After that, the maximum value generation angle calculation processing ends.

【0096】γ=α×R+CAm …式4 つまり、S860及びS870の処理では、最大値発生
時刻Tを含んだNEパルス間の開始時刻及び終了時刻
(T[m],T[m+1])と、図7のS715で求め
た最大値発生時刻Tと、上記開始時刻でのクランク角C
Amと、1NEパルス間分のクランク角αとから、最大
値発生時刻Tでのクランク角γを、センサ値が最大値と
なった時のクランク角として算出するようにしている。
Γ = α × R + CAm (Equation 4) In other words, in the processing of S860 and S870, the start time and end time (T [m], T [m + 1]) between NE pulses including the maximum value occurrence time T, The maximum value occurrence time T obtained in S715 of FIG. 7 and the crank angle C at the start time described above.
From the Am and the crank angle α for one NE pulse, the crank angle γ at the maximum value generation time T is calculated as the crank angle when the sensor value reaches the maximum value.

【0097】このような最大値発生角度算出処理によ
り、図9に例示する如く、図7のS715で求められた
最大値発生時刻Tが監視開始タイミングとしてのAD起
動タイミングから1つ目のNEパルス間に含まれていた
場合には、RAM17に格納された時刻T[1]〜T
[3]のうちのT[1],T[2]と、最大値発生時刻
Tと、AD起動タイミングでのクランク角(ATDC1
0°CA)と、1NEパルス間分のクランク角αとか
ら、最大値発生時刻Tでのクランク角γが求められ、そ
のクランク角γが、センサ値が最大値となった時のクラ
ンク角としてRAM17に格納されて、エンジン3の制
御に用いられることとなる。
By such a maximum value generation angle calculation process, as shown in FIG. 9, the maximum value generation time T obtained in S715 of FIG. 7 is the first NE pulse from the AD start timing as the monitoring start timing. If it is included in the time interval, the time T [1] to the time T [1] stored in the RAM 17
T [1] and T [2] of [3], the maximum value generation time T, and the crank angle (ATDC1
0 ° CA) and the crank angle α for one NE pulse, the crank angle γ at the maximum value generation time T is determined. The crank angle γ is used as the crank angle when the sensor value reaches the maximum value. It is stored in the RAM 17 and used for controlling the engine 3.

【0098】以上のように本実施形態のECU1では、
従来装置のように、過去のクランク角信号の周期時間を
利用して目的のクランク角を求めるのではなく、センサ
値を一定時間Tint 毎にA/D変換した各AD値の中か
ら、最大値となったものを選択して、その選択したAD
値のA/D変換時刻である最大値発生時刻Tを求めると
共に、監視期間において、その最大値発生時刻Tを含ん
だNEパルス間を特定して、その特定したNEパルス間
の開始時刻及び終了時刻と、最大値発生時刻Tと、上記
開始時刻でのクランク角と、クランク角信号の1周期分
のクランク角αとから、センサ値が最大値となった時の
クランク角を算出するようにしている。
As described above, in the ECU 1 of the present embodiment,
Instead of using the cycle time of the past crank angle signal to determine the target crank angle as in the conventional device, the maximum value is selected from the AD values obtained by A / D conversion of the sensor value at fixed time intervals Tint. Is selected, and the selected AD
The maximum value occurrence time T, which is the A / D conversion time of the value, is determined, and between the NE pulses including the maximum value occurrence time T is specified in the monitoring period, and the start time and the end time between the specified NE pulses are determined. The crank angle when the sensor value reaches the maximum value is calculated from the time, the maximum value generation time T, the crank angle at the start time, and the crank angle α for one cycle of the crank angle signal. ing.

【0099】このため、センサ値が最大値となった時の
クランク角を、エンジン3の回転変動の影響を殆ど受け
ずに、従来よりも格段に高い精度で検出できるようにな
る。尚、本実施形態では、図6のNE割り込み処理にお
けるS510〜S540,S560,S580,S59
0,及びS610〜S630と図7のコンペア割り込み
処理におけるS710,及びS720〜S760とが、
請求項2のサンプリング手段に相当し、図6のNE割り
込み処理におけるS550,S570,及びS600
が、請求項2の計時手段に相当している。そして、図7
のコンペア割り込み処理におけるS715が、特定値発
生時刻検出手段に相当し、図8の最大値発生角度算出処
理が、クランク角算出手段に相当している。
Therefore, the crank angle at the time when the sensor value reaches the maximum value can be detected with a remarkably higher accuracy than the conventional one without being substantially affected by the fluctuation of the rotation of the engine 3. In the present embodiment, S510 to S540, S560, S580, and S59 in the NE interrupt processing of FIG.
0 and S610 to S630 and S710 and S720 to S760 in the compare interrupt processing of FIG.
S550, S570, and S600 in the NE interrupt processing of FIG.
Corresponds to the timing means of claim 2. And FIG.
S715 in the compare interrupt process corresponds to the specific value occurrence time detection means, and the maximum value occurrence angle calculation processing in FIG. 8 corresponds to the crank angle calculation means.

【0100】一方、上記処理2の例では、センサ値が最
大値となった時のクランク角を求めたが、例えば、セン
サ値が、最小値となった時、予め定められた基準値にな
った(超えた又は下回った)時、極大値になった時、極
小値になった時など、他の特定の値になった時のクラン
ク角も、同様の手順で求めることができる。
On the other hand, in the example of the process 2, the crank angle at the time when the sensor value reaches the maximum value is obtained. For example, when the sensor value becomes the minimum value, the crank angle becomes the predetermined reference value. The crank angle at the time when the value reaches another specific value, such as when the value exceeds (exceeds or falls below), when the value reaches a local maximum value, or when the value reaches a local minimum value, can be obtained in a similar procedure.

【0101】以上、本発明の一実施形態について説明し
たが、本発明は、種々の形態を採り得ることは言うまで
もない。例えば、上記実施形態では、エンジン3の各気
筒7に燃焼圧センサ9を配しているが、1つの気筒(例
えば第1気筒#1)の燃焼圧だけを測定する構成として
も良い。
As described above, one embodiment of the present invention has been described, but it goes without saying that the present invention can take various forms. For example, in the above embodiment, the combustion pressure sensor 9 is provided for each cylinder 7 of the engine 3, but may be configured to measure only the combustion pressure of one cylinder (for example, the first cylinder # 1).

【0102】また、上記実施形態では、燃焼圧センサ9
からの燃焼圧信号を検出対象としたが、検出対象のアナ
ログ信号は、他のセンサからの信号であっても良い。一
方、上記実施形態では、A/D変換の周期(サンプリン
グ周期)である一定時間Tint が、常に一定値(30μ
s)であったが、例えば、その一定時間Tint は、エン
ジン回転数に応じて、エンジン回転数が低い場合には大
きな値に設定し、エンジン回転数が高い場合には小さい
値に設定するようにしても良い。このようにすれば、特
に上記処理1において、エンジン回転数が低い場合にA
D値を格納するためのメモリ領域を小さくすることがで
きる。
In the above embodiment, the combustion pressure sensor 9
However, the analog signal to be detected may be a signal from another sensor. On the other hand, in the above embodiment, the fixed time Tint, which is the A / D conversion cycle (sampling cycle), is always a fixed value (30 μm).
However, for example, the constant time Tint is set to a large value when the engine speed is low and to a small value when the engine speed is high, according to the engine speed. You may do it. In this way, especially in the above process 1, when the engine speed is low, A
The memory area for storing the D value can be reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 実施形態のエンジン制御装置(ECU)の構
成を制御対象のエンジンと共に表すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an engine control device (ECU) of an embodiment together with an engine to be controlled.

【図2】 CPUが処理1のために実行するNE割り込
み処理を表すフローチャートである。
FIG. 2 is a flowchart illustrating an NE interrupt process executed by a CPU for a process 1;

【図3】 CPUが処理1のために実行するコンペア割
り込み処理を表すフローチャートである。
FIG. 3 is a flowchart illustrating a compare interrupt process executed by a CPU for process 1;

【図4】 CPUが処理1のために実行するセンサ値算
出処理を表すフローチャートである。
FIG. 4 is a flowchart illustrating a sensor value calculation process executed by a CPU for a process 1;

【図5】 図2〜図4の処理の作用を表すタイムチャー
トである。
FIG. 5 is a time chart showing the operation of the processing of FIGS. 2 to 4;

【図6】 CPUが処理2のために実行するNE割り込
み処理を表すフローチャートである。
FIG. 6 is a flowchart illustrating NE interrupt processing executed by a CPU for processing 2;

【図7】 CPUが処理2のために実行するコンペア割
り込み処理を表すフローチャートである。
FIG. 7 is a flowchart illustrating a compare interrupt process executed by the CPU for process 2;

【図8】 CPUが処理2のために実行する最大値発生
角度算出処理を表すフローチャートである。
FIG. 8 is a flowchart illustrating a maximum value generation angle calculation process executed by a CPU for process 2;

【図9】 図6〜図8の処理の作用を表すタイムチャー
トである。
FIG. 9 is a time chart illustrating the operation of the processing in FIGS. 6 to 8;

【符号の説明】[Explanation of symbols]

1…エンジン制御装置(ECU)、3…エンジン、5…
クランク角センサ、7…気筒、9…燃焼圧センサ、11
…インジェクタ、13…CPU、15…ROM、17…
RAM、19…A/Dコンバータ、21…内部バス、2
3…マイクロコンピュータ(マイコン)、25…入力回
路、27…出力回路
1 ... Engine control device (ECU), 3 ... Engine, 5 ...
Crank angle sensor, 7: cylinder, 9: combustion pressure sensor, 11
... Injector, 13 ... CPU, 15 ... ROM, 17 ...
RAM, 19 A / D converter, 21 internal bus, 2
3 ... microcomputer, 25 ... input circuit, 27 ... output circuit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 森 広樹 愛知県刈谷市昭和町1丁目1番地 株式会 社デンソー内 Fターム(参考) 3G084 DA04 EA05 EB06 FA21 FA33 FA38  ────────────────────────────────────────────────── ─── Continuing from the front page (72) Inventor Hiroki Mori 1-1-1 Showa-cho, Kariya-shi, Aichi F-term in DENSO Corporation (reference) 3G084 DA04 EA05 EB06 FA21 FA33 FA38

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 所定のセンサから出力されるアナログ信
号の値(以下、センサ値という)をデジタル値へとA/
D変換するためのA/D変換手段を備えると共に、エン
ジンのクランク軸が所定角度回転する毎に特定方向のパ
ルスエッジが生じるクランク角信号に基づいて、前記ク
ランク軸の回転角度(以下、クランク角という)を把握
するエンジン制御装置において、 クランク角が所定の指令角度になった時の前記センサ値
を検出するための手段として、 クランク角が前記指令角度となる前に前記クランク角信
号に前記特定方向のパルスエッジが生じるタイミング
(以下、検出開始タイミングという)から、クランク角
が前記指令角度を過ぎた後に前記クランク角信号に前記
特定方向のパルスエッジが生じるタイミング(以下、検
出終了タイミングという)までのサンプリング期間の
間、前記A/D変換手段に前記センサ値を一定時間毎に
A/D変換させて、そのA/D変換で得られた各デジタ
ル値を所定の記憶手段に記憶させるサンプリング手段
と、 前記検出開始タイミングの時刻と前記検出終了タイミン
グの時刻とを夫々計測する計時手段と、 該計時手段により計測された両時刻と、前記検出開始タ
イミングでのクランク角から前記指令角度までの角度
と、前記所定角度とから、前記サンプリング期間内にて
クランク角が前記指令角度になった時刻(以下、指令角
度時刻という)を算出して、前記記憶手段に記憶されて
いる前記サンプリング期間分のデジタル値から、前記算
出した指令角度時刻のセンサ値を求めるセンサ値算出手
段と、 を備えていることを特徴とするエンジン制御装置。
An analog signal output from a predetermined sensor (hereinafter referred to as a sensor value) is converted into a digital value by A / A.
A / D conversion means for D / D conversion is provided, and a rotation angle of the crankshaft (hereinafter referred to as a crank angle) based on a crank angle signal that generates a pulse edge in a specific direction every time the crankshaft of the engine rotates a predetermined angle. Means for detecting the sensor value when the crank angle reaches a predetermined command angle, wherein the crank angle signal is specified before the crank angle reaches the command angle. From a timing at which a pulse edge in the direction occurs (hereinafter referred to as detection start timing) to a timing at which a pulse edge in the specific direction occurs in the crank angle signal after the crank angle has passed the command angle (hereinafter referred to as detection end timing). During the sampling period, the A / D converter converts the sensor value into an A / D signal at regular time intervals. Sampling means for storing each digital value obtained by the A / D conversion in a predetermined storage means; clock means for measuring the time of the detection start timing and the time of the detection end timing, respectively; From the two times measured by the timing means, the angle from the crank angle at the detection start timing to the command angle, and the predetermined angle, the time when the crank angle becomes the command angle within the sampling period ( (Hereinafter referred to as a command angle time), and a sensor value calculating means for calculating a sensor value of the calculated command angle time from a digital value for the sampling period stored in the storage means. An engine control device, characterized in that:
【請求項2】 所定のセンサから出力されるアナログ信
号の値(以下、センサ値という)をデジタル値へとA/
D変換するためのA/D変換手段を備えると共に、エン
ジンのクランク軸が所定角度回転する毎に特定方向のパ
ルスエッジが生じるクランク角信号に基づいて、前記ク
ランク軸の回転角度(以下、クランク角という)を把握
するエンジン制御装置において、 クランク角が第1の角度になって前記クランク角信号に
前記特定方向のパルスエッジが生じるタイミング(以
下、監視開始タイミングという)から、クランク角が第
2の角度になって前記クランク角信号に前記特定方向の
パルスエッジが生じるタイミング(以下、監視終了タイ
ミングという)までの監視期間の中で、前記センサ値が
特定の値となった時のクランク角を検出するための手段
として、 前記監視期間の間、前記A/D変換手段に前記センサ値
を一定時間毎にA/D変換させるサンプリング手段と、 前記監視期間において、前記クランク角信号に前記特定
方向のパルスエッジが生じた各タイミングであって、前
記監視開始タイミングと前記監視終了タイミングとを含
む各タイミングの時刻を夫々計測する計時手段と、 前記A/D変換手段によりA/D変換された各デジタル
値の中から、前記特定の値となったデジタル値を選択す
ると共に、その選択したデジタル値がA/D変換された
時刻(以下、特定値発生時刻という)を検出する特定値
発生時刻検出手段と、 前記監視期間における前記クランク角信号の各周期のう
ちで、前記特定値発生時刻を含んだ周期を特定して、該
周期の開始時刻と終了時刻とを前記計時手段の計測結果
から取得し、その開始時刻及び終了時刻と、前記特定値
発生時刻と、前記開始時刻でのクランク角と、前記所定
角度とから、前記特定値発生時刻でのクランク角を、前
記センサ値が前記特定の値となった時のクランク角とし
て算出するクランク角算出手段と、 を備えていることを特徴とするエンジン制御装置。
2. A / D conversion of a value of an analog signal (hereinafter referred to as a sensor value) output from a predetermined sensor into a digital value.
A / D conversion means for D / D conversion is provided, and a rotation angle of the crankshaft (hereinafter referred to as a crank angle) based on a crank angle signal that generates a pulse edge in a specific direction every time the crankshaft of the engine rotates a predetermined angle. In the engine control device, the crank angle becomes a second angle from the timing at which the crank angle becomes the first angle and the pulse edge in the specific direction occurs in the crank angle signal (hereinafter referred to as monitoring start timing). Detecting a crank angle when the sensor value reaches a specific value during a monitoring period until a pulse edge of the specific direction is generated in the crank angle signal in the crank angle signal (hereinafter referred to as monitoring end timing). During the monitoring period, the A / D converter causes the A / D converter to A / D convert the sensor value at regular intervals. A sampling unit, and a timer for measuring each time at which the pulse edge in the specific direction occurs in the crank angle signal during the monitoring period, including the monitoring start timing and the monitoring end timing. Means for selecting the digital value which has become the specific value from the digital values which have been A / D converted by the A / D conversion means, and the time at which the selected digital value is A / D converted (Hereinafter referred to as a specific value occurrence time) a specific value occurrence time detecting means for detecting a cycle including the specific value occurrence time among the respective cycles of the crank angle signal in the monitoring period, The start time and the end time of the cycle are obtained from the measurement result of the clock means, and the start time and the end time, the specific value occurrence time, and the Crank angle calculating means for calculating, from the crank angle and the predetermined angle, a crank angle at the specific value occurrence time as a crank angle when the sensor value reaches the specific value. An engine control device characterized by the above-mentioned.
JP2000281906A 2000-09-18 2000-09-18 Engine control device Expired - Fee Related JP3777963B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000281906A JP3777963B2 (en) 2000-09-18 2000-09-18 Engine control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000281906A JP3777963B2 (en) 2000-09-18 2000-09-18 Engine control device

Publications (2)

Publication Number Publication Date
JP2002089346A true JP2002089346A (en) 2002-03-27
JP3777963B2 JP3777963B2 (en) 2006-05-24

Family

ID=18766496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000281906A Expired - Fee Related JP3777963B2 (en) 2000-09-18 2000-09-18 Engine control device

Country Status (1)

Country Link
JP (1) JP3777963B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010146258A (en) * 2008-12-18 2010-07-01 Denso Corp Signal processing device
JP2014114747A (en) * 2012-12-10 2014-06-26 Toyota Motor Corp Control device for internal combustion engine
US9760163B2 (en) 2012-03-14 2017-09-12 Denso Corporation Sensor signal processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010146258A (en) * 2008-12-18 2010-07-01 Denso Corp Signal processing device
US9760163B2 (en) 2012-03-14 2017-09-12 Denso Corporation Sensor signal processor
JP2014114747A (en) * 2012-12-10 2014-06-26 Toyota Motor Corp Control device for internal combustion engine

Also Published As

Publication number Publication date
JP3777963B2 (en) 2006-05-24

Similar Documents

Publication Publication Date Title
JP2007171142A (en) Knock sensor signal processor
JP4274253B2 (en) ENGINE CONTROL DEVICE AND PROGRAM
JP4420348B2 (en) 4-cycle engine stroke discrimination device
JP2005220796A (en) Combustion pressure signal processor
US7894977B2 (en) Method for increasing the resolution of output signals from at least one measuring sensor on an internal combustion engine and corresponding controller
US4873958A (en) Engine ignition timing control system
US5050554A (en) Ignition timing control apparatus for engines
JP2000352347A (en) Engine controller
JP2002089346A (en) Engine control device
JP3304763B2 (en) Air-fuel ratio detection device for internal combustion engine
JP2003161245A (en) Combustion detecting device for internal combustion engine
JPH0660619B2 (en) Ignition timing control device for internal combustion engine
JP4518026B2 (en) Fuel injection control device
JPH048286Y2 (en)
JPH1193760A (en) Engine control device and its control method
US4665884A (en) Ignition control apparatus for internal combustion engine
JP2008232034A (en) Process device synchronizing with crankshaft rotation and engine control device
JP4243600B2 (en) Combustion state determination device for internal combustion engine
JP2005315169A (en) Crankshaft rotation synchronous processing system and engine control device
JP2000352348A (en) Cylinder discrimination unit for internal combustion engine
US20020189588A1 (en) Control system for internal combustion engine
JPH0214549B2 (en)
JPS6314766B2 (en)
KR100273530B1 (en) Intrruptting system for top dead center tasking
JP2882610B2 (en) Engine knock detection device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050308

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060220

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100310

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110310

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120310

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120310

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130310

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140310

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees