JP4333552B2 - Engine control device - Google Patents

Engine control device Download PDF

Info

Publication number
JP4333552B2
JP4333552B2 JP2004312332A JP2004312332A JP4333552B2 JP 4333552 B2 JP4333552 B2 JP 4333552B2 JP 2004312332 A JP2004312332 A JP 2004312332A JP 2004312332 A JP2004312332 A JP 2004312332A JP 4333552 B2 JP4333552 B2 JP 4333552B2
Authority
JP
Japan
Prior art keywords
count value
counter
missing tooth
crankshaft
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004312332A
Other languages
Japanese (ja)
Other versions
JP2006125240A (en
Inventor
隆芳 本多
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2004312332A priority Critical patent/JP4333552B2/en
Publication of JP2006125240A publication Critical patent/JP2006125240A/en
Application granted granted Critical
Publication of JP4333552B2 publication Critical patent/JP4333552B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、エンジンのクランク軸の回転角度を逐次計測し、この計測結果に基づいてエンジンを制御するエンジン制御装置に関する。   The present invention relates to an engine control apparatus that sequentially measures the rotation angle of a crankshaft of an engine and controls the engine based on the measurement result.

従来より、エンジン制御装置では、エンジンのクランク軸の回転に応じてクランク軸センサから出力されるクランク軸回転信号(NE信号)と、クランク軸の回転に対して1/2の比率で回転するエンジンのカム軸の回転に応じてカム軸センサから出力される気筒判別信号(G信号)とに基づいて、クランク軸の回転角度を逐次計測し、燃料噴射制御や点火時期制御などを行っている。   2. Description of the Related Art Conventionally, in an engine control device, an engine that rotates at a ratio of 1/2 with respect to a crankshaft rotation signal (NE signal) output from a crankshaft sensor according to the rotation of the crankshaft of the engine and the rotation of the crankshaft. Based on the cylinder discrimination signal (G signal) output from the camshaft sensor according to the rotation of the camshaft, the rotation angle of the crankshaft is sequentially measured to perform fuel injection control, ignition timing control, and the like.

より具体的には、クランク軸回転信号では、クランク軸の回転位置が予め設定された基準位置以外であるときには、クランク軸が所定角度(例えば、10°CA(クランクアングル))回転する毎にパルスを生じる。又、基準位置であるときには、クランク軸が所定角度よりも大きい角度(例えば、30°CA)回転するまでパルスが欠落した欠歯を生じる。   More specifically, the crankshaft rotation signal is pulsed every time the crankshaft rotates by a predetermined angle (for example, 10 ° CA (crank angle)) when the rotation position of the crankshaft is other than a preset reference position. Produce. Further, when the crankshaft is at the reference position, a missing tooth with a missing pulse is generated until the crankshaft rotates at an angle larger than a predetermined angle (for example, 30 ° CA).

又、気筒判別信号では、例えば、クランク軸回転信号における欠歯の発生間隔にて、論理レベルがハイレベルからローレベル、もしくはローレベルからハイレベルへと変化する。   In the cylinder discrimination signal, for example, the logic level changes from a high level to a low level or from a low level to a high level at the occurrence interval of missing teeth in the crankshaft rotation signal.

そして、エンジン制御装置では、エンジン制御装置にて実行すべき各種処理を実行するCPUが、クランク軸回転信号の有効エッジ(一般的には、立ち上がりエッジ)を検出する毎に、割込処理にて、クランク軸の回転角度を示すカウンタのカウント値をカウントアップすると共に、クランク軸回転信号の欠歯を検出する欠歯検出を行い、欠歯を検出した際に、気筒判別信号の論理レベルに応じたカウント値を設定することで、クランク軸の回転角度を逐次計測している。尚、クランク軸センサから出力されるクランク軸回転信号や、カム軸センサから出力される気筒判別信号は、アナログ信号からなり、エンジン制御装置では、これら信号の入力時に波形整形を施して、これら信号を二値化する。   In the engine control device, every time the CPU that executes various processes to be executed by the engine control device detects a valid edge (generally a rising edge) of the crankshaft rotation signal, an interrupt process is performed. In addition to counting up the count value of the counter indicating the rotation angle of the crankshaft, the missing tooth detection for detecting the missing tooth of the crankshaft rotation signal is performed, and when the missing tooth is detected, depending on the logic level of the cylinder discrimination signal By setting the count value, the rotation angle of the crankshaft is sequentially measured. The crankshaft rotation signal output from the crankshaft sensor and the cylinder discrimination signal output from the camshaft sensor are analog signals. The engine control device performs waveform shaping when these signals are input, and these signals Is binarized.

ここで、一般的に、このようなエンジン制御装置では、クランク軸回転信号における有効エッジの発生間隔を逐次計測して、前回の計測結果との比を算出し、この算出比が所定の判定比以上であるといった欠歯判定条件が成立した際に、欠歯を検出したと判定している。   Here, in general, in such an engine control device, the effective edge generation interval in the crankshaft rotation signal is sequentially measured to calculate a ratio with the previous measurement result, and this calculation ratio is a predetermined determination ratio. When the missing tooth determination condition such as above is satisfied, it is determined that a missing tooth is detected.

しかしながら、このようにカウンタのカウントアップや欠歯検出をCPUに実行させていたのでは、燃料噴射制御や点火時期制御などを高い頻度で実行しなければならないエンジンの高回転時に、CPUが実行すべき処理の負荷が著しく増加してしまう。   However, if the CPU counts up and detects missing teeth in this way, the CPU executes the fuel injection control, ignition timing control, etc. at high frequency when the engine must be executed at high frequency. The load on the power to be processed increases significantly.

そこで、これを解決するために、エンジンの回転が不安定で有効エッジの発生間隔が大きく変動し、一定の判定比による欠歯検出が困難なエンジンの始動時には、CPUが、複雑な処理による欠歯検出と、カウント値のカウントアップとを行う一方、エンジンの回転が安定し、有効エッジの発生間隔が一定の範囲内に収まるエンジンの高回転時には、CPUとは別個に設けられた処理回路が、一定の判定比を用いた簡易な欠歯検出と、カウント値のカウントアップとを行うエンジン制御装置が考案されている(例えば、特許文献1を参照)。
特開2004−3454号公報
Therefore, in order to solve this problem, at the start of the engine where the engine rotation is unstable and the effective edge generation interval fluctuates greatly and it is difficult to detect missing teeth with a certain judgment ratio, the CPU is not able to detect the lack of complicated processing. While detecting the teeth and counting up the count value, the engine rotation is stable and the processing interval provided separately from the CPU is at the time of high engine rotation when the effective edge generation interval falls within a certain range. An engine control device has been devised that performs simple missing tooth detection using a fixed determination ratio and count-up of a count value (see, for example, Patent Document 1).
JP 2004-3454 A

ところで、車両には、通常、搭載された電装品などから放射されるノイズや、電装品の作動などに起因する過渡的な電圧低下に対する様々な対策が施されているため、クランク軸センサから出力されるクランク軸回転信号に、エンジン制御装置における波形整形回路の閾値を越えるようなノイズが重畳したり、波形整形回路の閾値を越えられないような出力低下が生じることは希である。   By the way, the vehicle usually has various countermeasures against noise radiated from mounted electrical components, and transient voltage drop caused by electrical component operation. It is rare that noise that exceeds the threshold value of the waveform shaping circuit in the engine control device is superimposed on the crankshaft rotation signal that is generated, or that the output is reduced such that the threshold value of the waveform shaping circuit cannot be exceeded.

又、エンジン制御装置では、上述したように、欠歯の検出時に、気筒判別信号の論理レベルに応じてカウンタが本来取るべきカウント値をカウンタにセットするため、たとえ上述のようなノイズや出力低下が生じて、カウント値に誤差が生じてしまっても、次回の欠歯検出時には、カウント値が本来のカウント値に補正される。   Further, as described above, the engine control device sets the count value that should be originally taken by the counter in accordance with the logic level of the cylinder discrimination signal when detecting missing teeth. Even if an error occurs in the count value, the count value is corrected to the original count value at the next missing tooth detection.

しかしながら、一定の判定比を用いた簡易な欠歯検出を行う場合には、図20に示すように、欠歯が生じていない有効エッジの発生間隔中に、閾値を越えるノイズが重畳した場合に、欠歯判定条件が成立し易く、欠歯の誤検出が生じ易い。尚、図20は、欠歯判定条件が成立するようなタイミングでクランク軸信号にノイズが重畳した場合の一例を示すタイミングチャートである。   However, when performing simple missing tooth detection using a certain determination ratio, as shown in FIG. 20, when noise exceeding a threshold is superimposed on the occurrence interval of effective edges where missing teeth are not generated. Missing tooth determination conditions are easily established, and erroneous detection of missing teeth is likely to occur. FIG. 20 is a timing chart showing an example when noise is superimposed on the crankshaft signal at a timing at which the missing tooth determination condition is satisfied.

又、図21に示すように、車両の減速時などのようにエンジンの回転数が低下して、有効エッジの発生間隔が次第に大きくなる際に、クランク軸センサからの出力が波形整形回路の閾値を越えられずにパルスが欠落したり、又、エンジンの回転数が一定であってもパルスが連続して欠落した場合に、欠歯判定条件が成立し易く、欠歯の誤検出が生じ易い。尚、図21は、欠歯判定条件が成立するようなクランク軸回転信号の出力低下が生じた場合の一例を示すタイミングチャートである。   In addition, as shown in FIG. 21, when the engine speed decreases and the effective edge generation interval gradually increases, such as when the vehicle is decelerated, the output from the crankshaft sensor becomes the threshold value of the waveform shaping circuit. If the pulse is missing without exceeding the limit, or if the pulse is missing continuously even if the engine speed is constant, the missing tooth detection condition is likely to be satisfied, and erroneous detection of missing teeth is likely to occur. . FIG. 21 is a timing chart showing an example of a case where the output decrease of the crankshaft rotation signal occurs so that the missing tooth determination condition is satisfied.

そして、このように欠歯の誤検出が生じた場合には、欠歯の検出タイミングとは異なるタイミングであるにも関わらず、気筒判別信号の論理レベルに応じたカウント値がセットされてしまい、カウンタのカウント値が本来取るべきカウント値に対して大きな誤差を生じてしまうという問題が発生する。   Then, when erroneous detection of missing teeth occurs in this way, the count value corresponding to the logical level of the cylinder discrimination signal is set despite the timing being different from the missing tooth detection timing. There arises a problem that the count value of the counter causes a large error with respect to the count value that should be taken.

尚、このような問題の解決策の1つとして、欠歯の誤検出を判別する論理回路などをエンジン制御装置に設けることが考えられるが、誤検出を確実に判別するためには、論理回路などが大掛かりなものとなり、その結果、エンジン制御装置の規模やコストが大掛かりなものになってしまうことが考えられる。   As one of the solutions to such a problem, it is conceivable to provide a logic circuit or the like for discriminating erroneous detection of missing teeth in the engine control device. As a result, it can be considered that the scale and cost of the engine control device become large.

そこで、本発明は、簡素な構成でありながらも、欠歯の誤検出に起因して、クランク軸の回転角度を示すカウント値に大きな誤差が生じてしまうことを防止可能なエンジン制御装置を提供することを目的とする。   Therefore, the present invention provides an engine control device that can prevent a large error from occurring in the count value indicating the rotation angle of the crankshaft due to erroneous detection of missing teeth, although having a simple configuration. The purpose is to do.

上記目的を達成するためになされた請求項1記載のエンジン制御装置では、エンジンのクランク軸の回転位置が予め設定された基準位置以外であるときには、クランク軸が所定角度回転する毎にパルスを生じ、基準位置であるときには、クランク軸が所定角度よりも大きい角度回転するまでパルスが欠落した欠歯を生じるクランク軸回転信号が第1のカウンタに入力され、この第1のカウンタが、クランク軸回転信号におけるパルスの有効エッジにてカウント値をカウントアップし、このカウント値によってクランク軸の回転角度の計測結果を示す。又、その一方で、発生間隔計測手段が、有効エッジの発生間隔を逐次計測し、欠歯検出手段が、発生間隔計測手段の今回の計測結果と、前回の計測結果との比を逐次算出し、この算出比と、有効エッジ間に欠歯が生じたか否かを判定するために予め設定された判定比とに基づいて欠歯を検出する。   In order to achieve the above object, the engine control apparatus according to claim 1, wherein when the rotational position of the crankshaft of the engine is other than a preset reference position, a pulse is generated each time the crankshaft rotates by a predetermined angle. When the crankshaft is at the reference position, a crankshaft rotation signal that causes missing teeth with missing pulses until the crankshaft rotates at an angle greater than a predetermined angle is input to the first counter. The count value is counted up at the valid edge of the pulse in the signal, and the measurement result of the rotation angle of the crankshaft is indicated by this count value. On the other hand, the generation interval measurement means sequentially measures the effective edge generation interval, and the missing tooth detection means sequentially calculates the ratio between the current measurement result of the generation interval measurement means and the previous measurement result. The missing tooth is detected based on the calculated ratio and a judgment ratio set in advance to judge whether or not a missing tooth has occurred between the effective edges.

そして、欠歯検出手段の欠歯検出タイミングに基づいた補正タイミングにて、第1のカウンタのカウント値が、予め指定された指定数以内のズレが生じた場合に取り得る値である場合に、補正作動手段が補正手段を作動させ、補正手段が、補正タイミングにて第1のカウンタのカウント値が本来取るべき値である本来値に、第1のカウンタのカウント値を補正する。   And, when the count value of the first counter is a value that can be taken when a deviation within a designated number specified in advance occurs at the correction timing based on the missing tooth detection timing of the missing tooth detection means, The correction actuating means activates the correcting means, and the correcting means corrects the count value of the first counter to the original value that the count value of the first counter should originally take at the correction timing.

つまり、このエンジン制御装置では、クランク軸回転信号に生じ得るノイズの数や有効エッジの欠落数を予め測定し、指定数を設定しておけば、欠歯の誤検出に起因して、第1のカウンタのカウント値が大きな誤差を生じてしまうようなタイミングが補正タイミングとなってしまっても、カウント値を間違った本来値に補正してしまうことがない。   In other words, in this engine control device, if the number of noises and the number of missing effective edges that may occur in the crankshaft rotation signal is measured in advance and the specified number is set, the first will be caused due to false detection of missing teeth. Even when the timing at which the counter value of the counter causes a large error becomes the correction timing, the count value is not corrected to an incorrect original value.

即ち、このエンジン制御装置によれば、第1のカウンタのカウント値が、指定数以内のズレが生じた場合に取り得る値である場合にカウント値を本来値に補正するという簡素な構成でありながらも、欠歯の誤検出に起因して、クランク軸の回転角度を示すカウント値に大きな誤差が生じてしまうことを防止できる。 That is, according to the engine control device, the count value of the first counter, the count value when a value that can be taken when a deviation within specified number occurs with a simple configuration that corrects the original value Nevertheless, it is possible to prevent a large error from occurring in the count value indicating the rotation angle of the crankshaft due to erroneous detection of missing teeth.

尚、「第1のカウンタのカウント値」は、第1のカウンタに設定されたカウント値でも良いし、第1のカウンタに設定される直前のカウント値でも良い。
又、「指定数」は、第1のカウンタのカウント値がプラス側にずれる場合とマイナス側にずれる場合とで互いに異なっていても良い。
The “count value of the first counter” may be the count value set in the first counter or the count value immediately before being set in the first counter.
The “designated number” may be different depending on whether the count value of the first counter is shifted to the plus side or the minus value.

又、このエンジン制御装置では、クランク軸回転信号におけるパルスの立ち上がりエッジ及び立ち下がりエッジのうちのいずれか一方、もしくは、両方を有効エッジとしても良く、両方を有効エッジとした場合には、クランク軸の回転角度をより細かく計測できる(つまり、計測分解能を向上できる。)。   In this engine control device, either or both of the rising edge and the falling edge of the pulse in the crankshaft rotation signal may be effective edges, and when both are effective edges, the crankshaft Can be measured more finely (that is, the measurement resolution can be improved).

但し、上述のエンジン制御装置では、クランク軸回転信号に指定数よりも多くのノイズや有効エッジの欠落が生じた場合に、カウント値を補正することができず、実際のクランク軸の回転角度との間に大きな誤差が生じたままとなってしまう。   However, in the above-described engine control device, when more noise than the specified number or missing of valid edges occurs in the crankshaft rotation signal, the count value cannot be corrected, and the actual crankshaft rotation angle and A large error remains during the period.

そこで、請求項1記載のエンジン制御装置では、補正作動手段は、第1のカウンタのカウント値が、指定数を越えるズレが生じた場合に取り得る値である場合でも、今回の補正タイミングにおける第1のカウンタのカウント値と、前回の補正タイミングにおける第1のカウンタのカウント値との差を算出し、算出した差が欠歯の発生間隔に相当するカウント値と等しければ、補正手段を作動させるように設定されている Therefore , in the engine control apparatus according to claim 1, the correction actuating means is configured to change the first counter at the current correction timing even when the count value of the first counter is a value that can be taken when a deviation exceeding the specified number occurs. The difference between the count value of one counter and the count value of the first counter at the previous correction timing is calculated, and if the calculated difference is equal to the count value corresponding to the missing tooth occurrence interval, the correction means is activated. It is set to.

つまり、今回の補正タイミングもしくは前回の補正タイミングが欠歯の誤検出に起因するものであれば、今回の補正タイミングにおける第1のカウンタのカウント値と、前回の補正タイミングにおける第1のカウント値との差が欠歯の発生間隔に相当するカウント値と不等となる。一方、今回の補正タイミング及び前回の補正タイミングが本来の欠歯の検出に起因し、更に、その間に新たなノイズや有効エッジの欠落が生じていなければ、第1のカウンタのカウント値に指定数を越えるズレが発生した場合でも、今回の補正タイミングにおける第1のカウンタのカウント値と前回の補正タイミングにおける第1のカウンタのカウント値との差は、欠歯の発生間隔と等しくなる。   That is, if the current correction timing or the previous correction timing is due to erroneous detection of missing teeth, the count value of the first counter at the current correction timing and the first count value at the previous correction timing The difference between them is unequal to the count value corresponding to the missing tooth occurrence interval. On the other hand, if the current correction timing and the previous correction timing are due to the detection of the original missing tooth, and if no new noise or missing active edge occurs during that time, the specified number of count values of the first counter Even when a deviation exceeding 1 is generated, the difference between the count value of the first counter at the current correction timing and the count value of the first counter at the previous correction timing becomes equal to the missing tooth occurrence interval.

従って、上述のように補正作動手段を設定すれば、指定数を越えるズレが生じても、本来の欠歯の検出に起因する補正タイミングにてカウント値を本来値へと補正できる。
又、たとえ今回の補正タイミング及び前回の補正タイミングが本来の欠歯の検出に起因するものであるにも関わらず、新たなズレが生じてしまっても、次回の補正タイミング以降にて新たなズレが更に生じなければ、次回の補正タイミング以降にてカウント値を本来値へと補正できる。
Therefore, if the correction operation means is set as described above, the count value can be corrected to the original value at the correction timing caused by the original missing tooth detection even if a deviation exceeding the specified number occurs.
Even if the current correction timing and the previous correction timing are due to the original missing tooth detection, even if a new shift occurs, a new shift will occur after the next correction timing. If no further occurs, the count value can be corrected to the original value after the next correction timing.

ここで、指定数を第1のカウンタのカウント2つ分以上とした場合には、例えば、ノイズの発生数や有効エッジの欠落数が第1のカウンタのカウント1つ分であるにも関わらず、欠歯の誤検出によって、第1のカウンタのカウント値が、カウント2つ分以上のズレが生じた場合に取り得る値となっているタイミングが補正タイミングとなり、カウント値を本来値に補正してしまった際に、却って新たな誤差が生じてしまう。   Here, when the specified number is equal to or more than two counts of the first counter, for example, although the number of noise occurrences and the number of missing valid edges is equal to one count of the first counter, for example. The timing at which the count value of the first counter becomes a value that can be taken when there is a deviation of two counts or more due to erroneous detection of missing teeth is the correction timing, and the count value is corrected to the original value. In the event of a failure, a new error will occur.

そこで、指定数以内のズレは、請求項2記載のように、有効エッジの発生数1つ分であることが望ましい。
特に、これを請求項1記載のエンジン制御装置に適用すると、第1のカウンタのカウント値のズレが有効エッジの発生数1つ分である場合には、補正タイミングにて、第1のカウンタのカウント値を本来値に補正でき、又、第1のカウンタのカウント値のズレが有効エッジの発生数2つ分以上である場合には、次回以降の補正タイミングにて、第1のカウンタのカウント値を本来値に補正できる。つまり、新たな誤差を生じることなく、第1のカウンタのカウント値を本来値に補正できる。
Therefore, it is desirable that the deviation within the specified number is equal to the number of occurrences of one valid edge as described in claim 2 .
In particular, when this is applied to the engine control device according to claim 1 , when the deviation of the count value of the first counter is one occurrence of the valid edge, the first counter When the count value can be corrected to the original value and the deviation of the count value of the first counter is equal to or greater than the number of occurrences of two valid edges, the count of the first counter is performed at the next and subsequent correction timings. The value can be corrected to the original value. That is, the count value of the first counter can be corrected to the original value without causing a new error.

ところで、上述したエンジン制御装置はいずれも、請求項3記載のように、エンジンのカム軸の回転位置に応じてレベルが変化する気筒判別信号のレベルを判別するレベル判別手段と、該気筒判別信号のレベルに応じて予め設定された複数種類の本来値のうち、レベル判別手段の判別結果に応じたものを本来値に設定する第1の設定手段とを備えると良い。 By the way, in any of the above-described engine control devices, as described in claim 3, the level discrimination means for discriminating the level of the cylinder discrimination signal whose level changes according to the rotational position of the cam shaft of the engine, and the cylinder discrimination signal It is preferable to include a first setting unit that sets an original value corresponding to a determination result of the level determining unit among a plurality of types of original values preset according to the level.

このようにエンジン制御装置を構成すれば、気筒判別信号のレベルに応じて本来値を設定できる。
又、これに対して、請求項4記載のように、補正タイミングに応じて予め設定された複数種類の本来値のうち、第1のカウンタのカウント値に最も近いものを本来値に設定する第2の設定手段を備えても良い。
By configuring the engine control device in this way, the original value can be set according to the level of the cylinder discrimination signal.
On the other hand, as described in claim 4 , among the plural kinds of original values preset in accordance with the correction timing, the one closest to the count value of the first counter is set as the original value. Two setting means may be provided.

このようにエンジン制御装置を構成すれば、上述のように気筒判別信号のレベルを判定せずとも、本来値を設定できる。
又、請求項5記載のエンジン制御装置では、クランク軸回転信号が入力され、有効エッジにてカウント値をカウントアップすると共に、欠歯検出タイミングにてカウント値を0にリセットする第2のカウンタを備え、該第2のカウンタのカウント値が予め指定された0以外の指定カウント値に達したタイミングを補正タイミングに用いる
By configuring the engine control device in this way, the original value can be set without determining the level of the cylinder discrimination signal as described above.
In the engine control device according to claim 5, a second counter that receives the crankshaft rotation signal, counts up the count value at the valid edge, and resets the count value to 0 at the missing tooth detection timing is provided. The timing at which the count value of the second counter reaches a designated count value other than 0 designated in advance is used as the correction timing .

このように構成されたエンジン制御装置では、本来の欠歯の検出時だけでなく、欠歯の誤検出時にも第2のカウンタのカウント値が0にリセットされるため、指定カウント値を適切に設定すれば、欠歯の誤検出から本来の欠歯の検出に達するまでに第2のカウンタのカウント値が指定カウント値に達することがない。   In the engine control apparatus configured as described above, the count value of the second counter is reset to 0 not only when the original missing tooth is detected but also when the missing tooth is erroneously detected. If set, the count value of the second counter does not reach the specified count value from the erroneous detection of the missing tooth until the original missing tooth detection is reached.

つまり、第2のカウンタを備えていない上述のエンジン制御装置では、欠歯の誤検出に起因した補正タイミングであっても、第1のカウンタのカウント値が、指定数以内のズレが生じた場合に取り得る値である場合に、カウント値を本来値に補正する事態が発生するのに対し、本発明のエンジン制御装置では、本来の欠歯の検出に起因する補正タイミングでのみ、カウント値を本来値へと補正できる。   That is, in the above-described engine control apparatus that does not include the second counter, even when the correction timing due to the erroneous detection of the missing tooth occurs, the count value of the first counter deviates within the specified number. However, in the engine control device of the present invention, the count value is set only at the correction timing caused by the original missing tooth detection. It can be corrected to the original value.

又、請求項6記載のエンジン制御装置では、クランク軸回転信号が入力され、有効エッジにてカウント値をカウントアップすると共に、欠歯検出タイミングにてカウント値を0にリセットする第2のカウンタを備え、補正タイミング間において、第1のカウンタのカウント値と、第2のカウンタのカウント値とを取得するカウント値取得手段と、該カウント値取得手段により取得された第1のカウンタのカウント値と、第2のカウンタのカウント値とを比較し、これらカウント値同士が不整合な場合にのみ、補正作動手段の作動を許可する補正許可手段とを備える In the engine control device according to claim 6, the second counter that receives the crankshaft rotation signal, counts up the count value at the effective edge, and resets the count value to 0 at the missing tooth detection timing is provided. And a count value acquisition means for acquiring the count value of the first counter and the count value of the second counter between the correction timings, and the count value of the first counter acquired by the count value acquisition means And a correction permitting means for comparing the count values of the second counter and permitting the operation of the correction actuating means only when the count values are inconsistent with each other .

つまり、第1のカウンタ及び第2のカウンタは、同様の有効エッジにてそれぞれのカウント値をカウントアップするため、本来は互いのカウント値が整合しているはずであるものの、欠歯の誤検出が生じた場合には、第2のカウンタのカウント値がリセットされ、第1のカウンタのカウント値と不整合が生じる。   In other words, since the first counter and the second counter count up each count value at the same effective edge, although the count values should normally match each other, false detection of missing teeth When this occurs, the count value of the second counter is reset, resulting in a mismatch with the count value of the first counter.

従って、上述のようにエンジン制御装置を構成すれば、欠歯の誤検出が生じた場合でも、第1のカウンタのカウント値を間違った値に補正してしまうことを防止できる。
尚、ここで、エンジンが2サイクルである場合には、第1のカウンタのカウント範囲及び第2のカウンタのカウント範囲は、同一であるため、これらのカウント値同士が不一致な場合を「不整合」とする。
Therefore, if the engine control apparatus is configured as described above, it is possible to prevent the count value of the first counter from being corrected to an incorrect value even when erroneous detection of missing teeth occurs.
Here, when the engine has two cycles, the count range of the first counter and the count range of the second counter are the same. "

又、エンジンが4サイクルである場合には、第1のカウンタのカウント範囲は、クランク軸の回転角度における0°CA〜720°CAに相当するものとなる一方、第2のカウンタのカウント範囲は、0°CA〜360°CAに相当するものとなる。従って、この場合、これらカウント値同士が360°CA以外に相当する誤差を生じている場合を「不整合」とする。   When the engine has four cycles, the count range of the first counter corresponds to 0 ° CA to 720 ° CA in the rotation angle of the crankshaft, while the count range of the second counter is , Corresponding to 0 ° CA to 360 ° CA. Therefore, in this case, a case where an error corresponding to a value other than 360 ° CA occurs between these count values is referred to as “mismatch”.

ここで、カウント値取得手段をCPUによる逐次処理によって実現する場合(つまり、第1のカウンタのカウント値と第2のカウンタのカウント値とを同時ではなく順番に取得する場合)、取得タイミングのズレから、補正許可手段が、実際には第1のカウンタのカウント値と第2のカウンタのカウント値とが整合しているにも関わらず、これらカウント値が不整合であると誤判定したり(図19(a)参照)、不整合であるにも関わらず、整合していると誤判定する(図19(b)参照)事態が発生することが考えられる。   Here, when the count value acquisition means is realized by sequential processing by the CPU (that is, when the count value of the first counter and the count value of the second counter are acquired sequentially rather than simultaneously), the acquisition timing shifts. From this, the correction permission means erroneously determines that these count values are inconsistent even though the count value of the first counter is actually matched with the count value of the second counter ( It is conceivable that a situation in which it is erroneously determined to be consistent (see FIG. 19B) may occur despite the mismatch.

そこで、この場合、請求項6記載のエンジン制御装置では、カウント値取得手段は、有効エッジの発生間隔の最小時間よりも短い時間間隔にて、第1のカウンタのカウント値と、第2のカウンタのカウント値とを少なくとも3つ交互に取得し、補正許可手段は、第1のカウンタのカウント値と、第2のカウンタのカウント値とのうち、複数のカウント値を取得した一方のカウンタのカウント値同士が一致している場合にのみ作動するように設定されている Therefore, in this case, in the engine control apparatus according to the sixth aspect, the count value acquisition means includes the count value of the first counter and the second counter at a time interval shorter than the minimum time of occurrence intervals of the valid edges. And at least three count values are alternately obtained, and the correction permission means counts the count value of one counter that has acquired a plurality of count values among the count value of the first counter and the count value of the second counter. It is set to operate only when the values match .

このようにカウント値取得手段及び補正許可手段が設定されていれば、実際には第1のカウンタのカウント値と第2のカウンタのカウント値とが整合しているにも関わらず、補正作動手段の作動を許可してしまうことを防止できる。   If the count value acquisition unit and the correction permission unit are set in this way, the correction operation unit is actually used even though the count value of the first counter matches the count value of the second counter. It is possible to prevent the operation of.

但し、有効エッジと取得タイミングとが互いに非同期であるが故、カウント値取得手段がカウント値を取得している最中に、有効エッジが発生し、これに起因して、同一のカウンタから取得した複数のカウント値同士が不一致となってしまう事態が発生することが考えられる。   However, since the effective edge and the acquisition timing are asynchronous with each other, an effective edge is generated while the count value acquisition unit is acquiring the count value, and this is acquired from the same counter. It is conceivable that a situation occurs in which a plurality of count values do not match.

そこで、上述のエンジン制御装置は、請求項7記載のように、カウント値取得手段により取得された第1のカウンタのカウント値と、第2のカウンタのカウント値とのうち、複数のカウント値を取得した一方のカウンタのカウント値同士が不一致な場合に、カウント値取得手段を再作動させる再作動手段を備えることが望ましい。 Therefore, as described in claim 7 , the engine control device described above calculates a plurality of count values among the count value of the first counter acquired by the count value acquisition means and the count value of the second counter. It is desirable to provide a reactivation means for reactivating the count value acquisition means when the acquired count values of one counter do not match.

このようにエンジン制御装置が構成されていれば、複数のカウント値を取得した一方のカウンタのカウント値同士が一致するまでカウント値の取得を繰り返すことができ、ひいては、第1のカウンタのカウント値と第2のカウンタのカウント値とが整合しているか否かを確実に判定できる。
また、請求項5乃至請求項7記載のエンジン制御装置では、請求項8記載のように、補正作動手段は、第1のカウンタのカウント値が、指定数を越えるズレが生じた場合に取り得る値である場合でも、今回の補正タイミングにおける第1のカウンタのカウント値と、前回の補正タイミングにおける第1のカウンタのカウント値との差を算出し、算出した差が欠歯の発生間隔に相当するカウント値と等しければ、補正手段を作動させるように設定されていることが望ましい。
If the engine control device is configured in this way, the count value can be repeatedly acquired until the count values of one counter that has acquired a plurality of count values match each other, and thus the count value of the first counter. And the count value of the second counter can be reliably determined.
Further, in the engine control apparatus according to any one of claims 5 to 7, as described in claim 8, the correction actuating means can take when the count value of the first counter exceeds a specified number. Even if it is a value, the difference between the count value of the first counter at the current correction timing and the count value of the first counter at the previous correction timing is calculated, and the calculated difference corresponds to the missing tooth occurrence interval. If it is equal to the count value to be performed, it is desirable to set the correction means to operate.

ところで、上述したエンジン制御装置はいずれも、請求項9記載のように、発生間隔計測手段の前回の計測結果を予め設定された逓倍数で分割した時間を1周期とする逓倍クロック信号を生成する逓倍クロック生成手段と、該逓倍クロック信号によりカウント値を逓倍数までカウントアップすると共に、有効エッジにてカウント値を0にリセットする第3のカウンタとを備えると良い。 By the way, as described in claim 9 , each of the engine control devices described above generates a multiplied clock signal having a period obtained by dividing the previous measurement result of the generation interval measuring means by a preset multiplication number as one cycle. It is preferable to include a multiplied clock generation means and a third counter that counts up the count value to the multiplied number by the multiplied clock signal and resets the count value to 0 at the valid edge.

つまり、逓倍クロック生成手段と第3のカウンタとによって、有効エッジの発生間隔におけるクランク軸の回転角度を計測できるため、第1のカウンタのカウント値によってクランク軸の回転角度の上位を示し、第3のカウンタのカウント値をクランク軸の回転角度の下位を示すことにより、クランク軸の回転角度をより細かく示すことができる(つまり、計測分解能を向上できる。)。   In other words, since the rotation angle of the crankshaft in the effective edge generation interval can be measured by the multiplied clock generation means and the third counter, the upper value of the rotation angle of the crankshaft is indicated by the count value of the first counter, and the third counter By indicating the count value of the counter below the rotation angle of the crankshaft, the rotation angle of the crankshaft can be shown more finely (that is, the measurement resolution can be improved).

尚、この場合、第3のカウンタのカウント値は、有効エッジにてクリアされるため、補正タイミングにて第3のカウンタのカウント値を本来値に応じたカウント値に補正する必要はない。   In this case, since the count value of the third counter is cleared at the valid edge, it is not necessary to correct the count value of the third counter to the count value corresponding to the original value at the correction timing.

又、逓倍クロック生成手段は、欠歯検出手段が算出比を算出するのに用いる発生間隔計測手段と同一のものを用いても良いし、これとは別個のものを用いても良い Further, the multiplication clock generation means may be the same as the generation interval measurement means used by the missing tooth detection means to calculate the calculation ratio, or may be a separate one .

ところで、欠歯検出手段は、請求項10記載のように、ソフトウェアを用いて実現され、欠歯を検出する第1の欠歯検出手段と、算出比と、予め設定された一定の判定比とに基づいて、欠歯を検出する第2の欠歯検出手段と、単位時間当たりのクランク軸の回転数が予め指定された指定回転数に達するまでは、第1の欠歯検出手段を作動させ、該指定回転数に達したのちは、該第1の欠歯検出手段に代えて、第2の欠歯検出手段を作動させる切替手段とを備えると良い。 By the way, as described in claim 10 , the missing tooth detecting means is realized by using software, and includes a first missing tooth detecting means for detecting missing teeth, a calculation ratio, and a predetermined fixed determination ratio. Based on the above, the second missing tooth detecting means for detecting missing teeth and the first missing tooth detecting means are operated until the rotational speed of the crankshaft per unit time reaches a designated rotational speed designated in advance. After reaching the designated rotational speed, it is preferable to provide switching means for operating the second missing tooth detecting means instead of the first missing tooth detecting means.

つまり、エンジンの回転(つまり、クランク軸の回転)が不安定で、有効エッジの発生間隔が大きく変動する回転数では、ソフトウェアによる複雑な処理によって速やかに欠歯を検出でき、又、エンジンの回転が安定し、有効エッジの発生間隔が一定の範囲内に収まる回転数では、簡易に欠歯を検出できる。   In other words, if the engine rotation (that is, crankshaft rotation) is unstable and the effective edge generation interval fluctuates significantly, missing teeth can be detected quickly through complex software processing. Is stable, and missing teeth can be easily detected at a rotational speed where the effective edge generation interval falls within a certain range.

しかも、第1の欠歯検出手段をソフトウェアにより実現するため、エンジン制御装置の規模を大掛かりにすることがない。
尚、第2の欠歯検出手段も第1の欠歯検出手段と同様にソフトウェアを用いて実現されても良いが、燃料噴射制御や点火時期制御などを行うCPUに実行させた場合には、これら制御を高い頻度で行わなければならないエンジンの高回転時にCPUの処理の負荷が著しく増大してしまう。
Moreover, since the first missing tooth detecting means is realized by software, the scale of the engine control device is not increased.
The second missing tooth detection means may also be realized using software in the same manner as the first missing tooth detection means, but when executed by a CPU that performs fuel injection control or ignition timing control, The processing load of the CPU is significantly increased at the time of high engine rotation at which these controls must be performed at a high frequency.

そこで、第2の欠歯検出手段は、請求項11記載のように、ハードウェアを用いて実現されていることが望ましい。
即ち、一定比を用いて欠歯検出を行うためハードウェアで簡素に実現できる上、エンジンの高回転時におけるCPUの処理の負荷を増大させることがない。
Therefore, it is desirable that the second missing tooth detection means is realized using hardware as described in claim 11 .
That is, since missing teeth are detected using a certain ratio, it can be simply realized by hardware, and the processing load of the CPU at the time of high engine rotation is not increased.

以下に本発明の実施形態を図面と共に説明する。
[第1実施形態]
まず、図1は、本実施形態におけるエンジン制御装置(以下、「エンジンECU」という。)1の構成を示す構成ブロック図である。尚、本実施形態では、エンジンECU1は、直列4気筒の4ストローク1サイクルエンジン(所謂4サイクルエンジン)を制御対象とするものである。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
First, FIG. 1 is a configuration block diagram showing a configuration of an engine control apparatus (hereinafter referred to as “engine ECU”) 1 in the present embodiment. In this embodiment, the engine ECU 1 controls an in-line four-cylinder four-stroke one-cycle engine (so-called four-cycle engine).

図1に示すように、エンジンECU1は、エンジンを制御するための各種処理を実行するマイクロコンピュータ(以下、単に「マイコン」という。)2と、外部装置からの入力信号を受け、マイコン2へ入力する入力回路3,4,5,6と、マイコン2からの出力信号を受け、外部装置を作動させる出力回路7とを備える。   As shown in FIG. 1, the engine ECU 1 receives a microcomputer (hereinafter simply referred to as “microcomputer”) 2 that executes various processes for controlling the engine and an input signal from an external device, and inputs it to the microcomputer 2. Input circuits 3, 4, 5, and 6 and an output circuit 7 that receives an output signal from the microcomputer 2 and operates an external device.

ここで、入力回路3は、クランク軸センサ8に接続され、クランク軸センサ8から入力されるクランク軸回転信号(NE信号)から一定周波数帯域のノイズを除去すると共に、このNE信号を矩形波に波形整形してマイコン2へ入力するように構成されている。尚、クランク軸センサ8は、エンジンのクランク軸9に固定されたロータ10の外周に対向して設けられ、ロータ10の外周に所定角度(本実施形態では10°CA)毎の間隔で形成された歯101を検出してパルスを発生する光電式もしくはホールIC式のセンサとして構成されている。但し、ロータ10の外周には、歯101が2個欠落した欠歯部102が1つ設けられている。   Here, the input circuit 3 is connected to the crankshaft sensor 8 and removes noise in a certain frequency band from the crankshaft rotation signal (NE signal) input from the crankshaft sensor 8 and converts the NE signal into a rectangular wave. The waveform is shaped and input to the microcomputer 2. The crankshaft sensor 8 is provided opposite to the outer periphery of the rotor 10 fixed to the crankshaft 9 of the engine, and is formed on the outer periphery of the rotor 10 at intervals of a predetermined angle (10 ° CA in this embodiment). It is configured as a photoelectric or Hall IC sensor that detects a tooth 101 and generates a pulse. However, one missing tooth portion 102 from which two teeth 101 are missing is provided on the outer periphery of the rotor 10.

このため、入力回路3を介してマイコン2に入力されるNE信号(NE10信号)は、クランク軸9が10°回転する毎(10°CA毎)にパルスを生じると共に、ロータ10の欠歯部102がクランク軸センサ8に対向する基準位置に来ると、パルスの有効エッジ(本実施形態では立ち上がりエッジ)の間隔が3倍の長さ(つまり、30°CA分の長さ)となる分だけパルスが欠落した欠歯を生じる(例えば、図4参照)。尚、上述のようにロータ10では、欠歯部102が1つだけ設けられているため、NE10信号では、360°CA毎に欠歯を生じることとなる。   For this reason, the NE signal (NE10 signal) input to the microcomputer 2 via the input circuit 3 generates a pulse every time the crankshaft 9 rotates 10 ° (every 10 ° CA), and the toothless portion of the rotor 10. When 102 reaches the reference position facing the crankshaft sensor 8, the interval between the effective edges of the pulses (rising edge in this embodiment) is three times as long (that is, 30 ° CA). This results in missing teeth with missing pulses (see, eg, FIG. 4). Since the rotor 10 is provided with only one missing tooth portion 102 as described above, a missing tooth is generated every 360 ° CA in the NE10 signal.

又、入力回路4は、カム軸センサ11に接続され、カム軸センサ11から入力される気筒判別信号(G信号)から一定周波数帯域のノイズを除去すると共に、このG信号を矩形波に波形整形してマイコン2へ入力するように構成されている。尚、カム軸センサ11は、クランク軸9の回転に対して1/2の比率で回転するエンジンのカム軸12に固定されたロータ13の外周に対向して設けられ、ロータ13の外周に形成された凹凸に応じて、G信号の論理レベルがハイレベルとローレベルとに変化する磁気抵抗素子(MRE)式のセンサとして構成されている。但し、ロータ13の外周には、60°間隔毎に凹凸が交互に形成されている。   The input circuit 4 is connected to the camshaft sensor 11 and removes noise in a certain frequency band from the cylinder discrimination signal (G signal) input from the camshaft sensor 11 and shapes the G signal into a rectangular wave. And input to the microcomputer 2. The camshaft sensor 11 is provided opposite to the outer periphery of the rotor 13 fixed to the camshaft 12 of the engine that rotates at a ratio of 1/2 with respect to the rotation of the crankshaft 9, and is formed on the outer periphery of the rotor 13. The sensor is configured as a magnetoresistive element (MRE) type sensor in which the logic level of the G signal changes between a high level and a low level in accordance with the unevenness. However, irregularities are alternately formed on the outer periphery of the rotor 13 at intervals of 60 °.

このため、入力回路4を介してマイコン2へ入力されるG信号は、NE10信号のパルス発生期間中では、論理レベルが3回反転すると共に、NE10信号の欠歯発生タイミングでは、そのタイミング毎に交互に異なった論理レベルとなる(図4参照)。但し、本実施形態では、G信号の論理レベルは、クランク軸9の回転角度が360°CAであればローレベルとなり、720°CA(0°CA)であればハイレベルとなる。   For this reason, the G signal input to the microcomputer 2 via the input circuit 4 is inverted in logic level three times during the NE10 signal pulse generation period, and at the NE10 signal missing tooth generation timing, at each timing. The logic levels are alternately different (see FIG. 4). However, in this embodiment, the logical level of the G signal is low when the rotation angle of the crankshaft 9 is 360 ° CA, and is high when the rotation angle is 720 ° CA (0 ° CA).

又、入力回路5は、エンジンを始動させるためのスタータスイッチ14や、アクセルペダルの全閉を検出するアイドルスイッチ15などといったエンジン操作に関わるスイッチ類に接続され、これらスイッチからの入力信号から一定周波数帯域のノイズを除去して、これら入力信号をマイコン2へ入力するように構成されている。   The input circuit 5 is connected to switches related to engine operation, such as a starter switch 14 for starting the engine and an idle switch 15 for detecting the accelerator pedal fully closed. Band noise is removed, and these input signals are input to the microcomputer 2.

又、入力回路6は、エンジンの吸入吸気量を検出するエアフローメータ16や、エンジンのスロットル弁の開度を検出するスロットルセンサ17、エンジンの冷却水の温度を検出する水温センサ18などといったエンジンの状態を検出する各種センサに接続され、これらセンサからの入力信号から一定周波数帯域のノイズを除去して、これら入力信号をマイコン2へ入力するように構成されている。   The input circuit 6 also includes an air flow meter 16 that detects the intake air intake amount of the engine, a throttle sensor 17 that detects the opening of the engine throttle valve, a water temperature sensor 18 that detects the temperature of the engine coolant, and the like. It is connected to various sensors that detect states, and is configured to remove noise in a certain frequency band from input signals from these sensors and to input these input signals to the microcomputer 2.

又、出力回路7は、エンジンの各気筒に設けられた4つの点火コイル41,42,43,44をスイッチングするイグナイタ19と、エンジンの各気筒に設けられた4つの燃料噴射弁51,52,53,54とに接続されており、マイコン2から出力される出力信号に応じて、イグナイタ19と燃料噴射弁51〜54とをそれぞれ作動させるように構成されている。   The output circuit 7 includes an igniter 19 for switching the four ignition coils 41, 42, 43, 44 provided in each cylinder of the engine, and four fuel injection valves 51, 52, provided in each cylinder of the engine. The igniter 19 and the fuel injection valves 51 to 54 are operated according to the output signal output from the microcomputer 2, respectively.

そして、マイコン2は、入力回路3,4を介して入力されるNE10信号とG信号とに基づいて、クランク軸9の回転角度を計測するクランク処理部20と、クランク軸9の回転角度を示す表カウンタ21と、NE10信号における欠歯からの有効エッジの発生数を示す裏カウンタ22と、NE10信号における有効エッジの発生間隔を予め設定された逓倍数(本実施形態では、32逓倍)だけ分割した時間を1周期とする逓倍クロック信号を生成する逓倍回路23とを備える。但し、クランク処理部20は、各種論理回路などから構成されている。又、表カウンタ21は、クランク軸9の回転角度の上位を示す上位カウンタ21aと、下位を示す下位カウンタ21bとから構成されている。   Then, the microcomputer 2 indicates the rotation angle of the crankshaft 9 and the crank processing unit 20 that measures the rotation angle of the crankshaft 9 based on the NE10 signal and the G signal input via the input circuits 3 and 4. The front counter 21, the back counter 22 indicating the number of occurrences of effective edges from missing teeth in the NE10 signal, and the interval between occurrences of effective edges in the NE10 signal are divided by a preset multiplication number (32 multiplications in this embodiment). And a multiplier circuit 23 for generating a multiplied clock signal with one period as one cycle. However, the crank processing unit 20 includes various logic circuits. The table counter 21 includes an upper counter 21a indicating the upper rotation angle of the crankshaft 9 and a lower counter 21b indicating the lower position.

又、マイコン2は、エンジンを制御するための各種処理を実行するCPU24と、CPU24が実行すべき各種処理のプログラムや各種処理に用いるデータを記憶するROM25と、各種処理にて算出される各種データなどを一時記憶するRAM26と、エンジンECU1にて発生したエラーの履歴などを記憶するための不揮発性メモリであるEEPROM27とを備える。   The microcomputer 2 includes a CPU 24 that executes various processes for controlling the engine, a ROM 25 that stores programs for various processes to be executed by the CPU 24 and data used for the various processes, and various data calculated by the various processes. Are temporarily stored, and an EEPROM 27, which is a non-volatile memory for storing a history of errors occurring in the engine ECU 1, and the like.

又、マイコン2は、表カウンタ21のカウント値と燃料噴射制御や点火時期制御などを行うために予め設定された各種設定値とを比較し、表カウンタ21のカウント値がこれら各種設定値と一致した際に、出力回路7に対する角度同期信号や、CPU24に対する割込信号を発生する比較器28と、NE10信号における有効エッジの発生間隔の最小時間よりも十分に短い周期の内部クロック信号によって常時カウントアップされるフリーランタイマ29とを備える。   Further, the microcomputer 2 compares the count value of the table counter 21 with various setting values set in advance for performing fuel injection control, ignition timing control, etc., and the count value of the table counter 21 matches these various setting values. When this occurs, the comparator 28 that generates an angle synchronization signal for the output circuit 7 and an interrupt signal for the CPU 24, and an internal clock signal with a period sufficiently shorter than the minimum time of the valid edge generation interval in the NE10 signal are always counted. And a free-run timer 29 to be uploaded.

又、マイコン2は、入力回路6を介して入力されるエアフローメータ16の信号とスロットルセンサ17の信号と水温センサ18の信号とをディジタル信号に変換し、CPU24へ入力するA/D変換器30と、入力回路5を介して入力されるスタータスイッチ14の信号とアイドルスイッチ15の信号とをCPU24へ入力する一方、CPU24からの出力信号や比較器28からの角度同期信号を出力回路7へ出力するI/Oポート31とを備える。   Further, the microcomputer 2 converts the signal of the air flow meter 16, the signal of the throttle sensor 17, and the signal of the water temperature sensor 18 input via the input circuit 6 into digital signals, and inputs the A / D converter 30 to the CPU 24. The starter switch 14 signal and the idle switch 15 signal input via the input circuit 5 are input to the CPU 24, while the output signal from the CPU 24 and the angle synchronization signal from the comparator 28 are output to the output circuit 7. And an I / O port 31 to be provided.

このように構成されたマイコン2では、CPU24が、周知のエンジンECUのCPUと同様に、燃料噴射制御や点火時期制御などを行うと共に、エンジンの始動時から単位時間当たりのクランク軸9の回転数が予め指定された指定回転数(本実施形態では、500rpm)に達するまでは、NE10信号の有効エッジに起因する割込処理にて、NE10信号とG信号とに基づいて、欠歯検出や気筒検出、クランク軸9の回転角度の計測を行う。そして、クランク軸9の回転数が指定回転数に達したのち、欠歯を更に所定回数(本実施形態では2回)検出すると、クランク処理部20によるクランク軸9の回転角度の計測を有効にし、この割込処理を停止する。尚、このようなCPU24の割込処理は、上述の特許文献1に記載の内容とほぼ同様であるため、ここではこれ以上の説明を省略する。   In the microcomputer 2 configured as described above, the CPU 24 performs fuel injection control, ignition timing control, and the like, as well as a well-known engine ECU CPU, and the number of revolutions of the crankshaft 9 per unit time from the start of the engine. Until the specified rotation speed (500 rpm in the present embodiment) reaches a predetermined value, interrupt processing due to the effective edge of the NE10 signal is used to detect missing teeth and cylinders based on the NE10 signal and the G signal. Detection and measurement of the rotation angle of the crankshaft 9 are performed. Then, after the number of rotations of the crankshaft 9 reaches the designated number of rotations, if the missing teeth are further detected a predetermined number of times (in this embodiment, twice), measurement of the rotation angle of the crankshaft 9 by the crank processing unit 20 is enabled. This interrupt processing is stopped. Note that such interrupt processing of the CPU 24 is substantially the same as the contents described in the above-mentioned Patent Document 1, and therefore further description thereof is omitted here.

以下、クランク処理部20が行う各種処理について説明する。
まず、図2は、クランク処理部20が行う回転角度計測処理の流れを示すフローチャートである。尚、本処理は、NE10信号におけるパルスの有効エッジが発生する毎に実行される。
Hereinafter, various processes performed by the crank processing unit 20 will be described.
First, FIG. 2 is a flowchart showing the flow of the rotation angle measurement process performed by the crank processing unit 20. This process is executed every time a valid edge of a pulse in the NE10 signal occurs.

図2に示すように、本処理では、まず、フリーランタイマ29のタイマ値を0にリセットすると共に、リセットする直前のタイマ値を今回の有効エッジの発生間隔T(n)として、当該クランク処理部20に設けられた記憶領域に設定する(S100)。   As shown in FIG. 2, in this process, first, the timer value of the free-run timer 29 is reset to 0, and the timer value immediately before the reset is set as the current effective edge generation interval T (n). The storage area is set in the unit 20 (S100).

そして、記憶領域にて、下位カウンタ21bから上位カウンタ21aへの桁上がりを許可するキャリー許可フラグFcがONに設定されているか否かを確認する(S105)。
ここで、キャリー許可フラグFcがOFFに設定されている場合には(No:S105)、上位カウンタ21aのカウント値MCntHとして今回設定すべきカウント値を一時記憶するために記憶領域に設定されたカウント値tMCntHに、MCntHを1だけ加算したカウント値を設定すると共に、下位カウンタ21bのカウント値MCntLを0にリセットする(S110)。
Then, in the storage area, it is confirmed whether or not the carry permission flag Fc that permits carry from the lower counter 21b to the upper counter 21a is set to ON (S105).
Here, when the carry permission flag Fc is set to OFF (No: S105), the count set in the storage area for temporarily storing the count value to be set this time as the count value MCntH of the upper counter 21a. A count value obtained by adding 1 to MCntH is set to the value tMCntH, and the count value MCntL of the lower counter 21b is reset to 0 (S110).

そして、tMCntHが33もしくは69(つまり、欠歯の開始時点に相当するカウント値)であるか否かを確認し(S115)、33でも69でもなければ(No:S115)、キャリー許可フラグFc=ON時におけるMCntHを記憶するために記憶領域に設定されたカウント値MCntMを0にリセットし(S120)、後述のS155へ移行する。   Then, it is confirmed whether or not tMCntH is 33 or 69 (that is, a count value corresponding to the start time of missing teeth) (S115). If it is neither 33 nor 69 (No: S115), the carry permission flag Fc = The count value MCntM set in the storage area for storing MCntH at the time of ON is reset to 0 (S120), and the process proceeds to S155 described later.

一方、tMCntHが33もしくは69であれば(Yes:S115)、今回設定すべきキャリー許可フラグFcの状態を一時記憶するために記憶領域に設定された一時許可フラグtFcをONに設定すると共に(S125)、tMCntHの値をMCntMに設定し(S130)、後述のS155へ移行する。   On the other hand, if tMCntH is 33 or 69 (Yes: S115), the temporary permission flag tFc set in the storage area is set ON to temporarily store the state of the carry permission flag Fc to be set this time (S125). ), The value of tMCntH is set to MCntM (S130), and the process proceeds to S155 described later.

一方、S105にて、キャリー許可フラグFcがONに設定されている場合には(Yes:S105)、一時許可フラグtFcをOFFに設定し(S135)、MCntMが33又は69のどちらであるのか確認する(S140)。   On the other hand, if the carry permission flag Fc is set to ON in S105 (Yes: S105), the temporary permission flag tFc is set to OFF (S135) and it is confirmed whether MCntM is 33 or 69. (S140).

ここで、MCntMが33であれば(MCntM=33:S140)、tMCntHを36に設定すると共に、MCntLを0にリセットし(S145)、後述のS155へ移行する。一方、MCntMが69であれば(MCntM=69:S140)、tMCntH及びMCntLを共に0にリセットする(S150)。   If MCntM is 33 (MCntM = 33: S140), tMCntH is set to 36, MCntL is reset to 0 (S145), and the process proceeds to S155 described later. On the other hand, if MCntM is 69 (MCntM = 69: S140), both tMCntH and MCntL are reset to 0 (S150).

そして、記憶領域に設定された、今回の有効エッジの発生間隔T(n)と、前回の有効エッジの発生間隔T(n−1)との比であるT(n)/T(n−1)を算出し、この算出比が欠歯を検出するために予め設定された一定の判定比K(本実施形態では、K=2.4)以上であるか否かを判定する(S155)。   Then, T (n) / T (n−1), which is a ratio between the current effective edge generation interval T (n) set in the storage area and the previous effective edge generation interval T (n−1). ) Is calculated, and it is determined whether or not the calculated ratio is equal to or higher than a predetermined determination ratio K (in this embodiment, K = 2.4) preset in order to detect missing teeth (S155).

ここで、この算出比が判定比K以上であるという欠歯判定条件が満たされていない場合には(No:S155)、欠歯を検出していないものとして、裏カウンタ22のカウント値SCntとして今回設定すべきカウント値を一時記憶するために記憶領域に設定されたカウント値tSCntに、SCntを1だけ加算したカウント値を設定し(S160)、後述のS200へ移行する。   Here, when the missing tooth determination condition that the calculated ratio is equal to or higher than the determination ratio K is not satisfied (No: S155), it is assumed that the missing tooth is not detected, and the count value SCnt of the back counter 22 is detected. A count value obtained by adding 1 to SCnt is set to the count value tSCnt set in the storage area in order to temporarily store the count value to be set this time (S160), and the process proceeds to S200 described later.

一方、欠歯判定条件が満たされている場合には(Yes:S155)、欠歯を検出したものとして、tSCntを0にリセットする(S165)。
そして、tMCntHが33もしくは37であるか否かを確認する(S170)。尚、ここにおける33という値は、クランク軸9が0°〜360°回転する間(0°CA〜360°CA)に、NE10信号において、本来発生しているべきパルスが1つ欠落した場合に、本来の欠歯の検出タイミングにてtMCntHが取り得る値である。又、37という値は、クランク軸9が0°〜360°回転する間に、NE10信号において、ノイズが1つ発生した場合に、本来の欠歯の検出タイミングにてtMCntHが取り得る値である。
On the other hand, if the missing tooth determination condition is satisfied (Yes: S155), tSCnt is reset to 0 assuming that a missing tooth is detected (S165).
Then, it is confirmed whether or not tMCntH is 33 or 37 (S170). Here, the value 33 is obtained when one pulse that should have been generated is lost in the NE10 signal while the crankshaft 9 rotates from 0 ° to 360 ° (0 ° CA to 360 ° CA). TMCntH is a value that can be taken at the original missing tooth detection timing. The value of 37 is a value that tMCntH can take at the original missing tooth detection timing when one noise is generated in the NE10 signal while the crankshaft 9 rotates from 0 ° to 360 °. .

ここで、tMCntHが33もしくは37である場合には(Yes:S170)、tMCntHを36に設定すると共に、MCntLを0にリセットし(S175)、後述のS195へ移行する。尚、この36という値は、本来の欠歯の検出タイミングにおいて、MCntHが本来取るべき値である本来値である。   If tMCntH is 33 or 37 (Yes: S170), tMCntH is set to 36, MCntL is reset to 0 (S175), and the process proceeds to S195 described later. The value of 36 is an original value that MCntH should originally take at the original missing tooth detection timing.

一方、tMCntHが33でも37でもない場合には(No:S170)、tMCntHが69もしくは1であるか否かを確認する(S180)。尚、ここにおける69という値は、クランク軸9が360°〜720°回転する間(360°CA〜720°CA)に、NE10信号において、本来発生しているべきパルスが1つ欠落した場合に、本来の欠歯の検出タイミングにてtMCntHが取り得る値である。又、1という値は、クランク軸9が360°〜720°回転する間に、NE10信号において、ノイズが1つ発生した場合に、本来の欠歯の検出タイミングにてtMCntHが取り得る値である。   On the other hand, if tMCntH is neither 33 nor 37 (No: S170), it is confirmed whether tMCntH is 69 or 1 (S180). Note that the value 69 here is when one pulse that should have occurred in the NE10 signal is missing while the crankshaft 9 rotates 360 ° to 720 ° (360 ° CA to 720 ° CA). TMCntH is a value that can be taken at the original missing tooth detection timing. A value of 1 is a value that tMCntH can take at the original missing tooth detection timing when one noise occurs in the NE10 signal while the crankshaft 9 rotates 360 ° to 720 °. .

ここで、tMCntHが69でも1でもない場合には(No:S180)、後述のS200へ直ちに移行する。
一方、tMCntHが69もしくは1である場合には(Yes:S180)、tMCntH及びMCntLを共に0にリセットして(S185)、一時許可フラグtFcをOFFに設定する(S195)。尚、この0という値は、本来の欠歯の検出タイミングにおけるMCntHの本来値である。
If tMCntH is neither 69 nor 1 (No: S180), the process immediately proceeds to S200 described later.
On the other hand, if tMCntH is 69 or 1 (Yes: S180), both tMCntH and MCntL are reset to 0 (S185), and the temporary permission flag tFc is set to OFF (S195). The value of 0 is the original value of MCntH at the original missing tooth detection timing.

そして、tMCntHの値と、tSCntの値と、一時許可フラグtFcの状態とをそれぞれ、MCntH、SCnt、キャリー許可フラグFcに設定し(S200)、本処理を終了する。   Then, the values of tMCntH, tSCnt, and temporary permission flag tFc are set in MCntH, SCnt, and carry permission flag Fc, respectively (S200), and this process ends.

次に、図3は、クランク処理部20が行う下位カウンタ処理の流れを示すフローチャートである。尚、本処理は、逓倍クロック信号の有効エッジ(本実施形態では、立ち上がりエッジ)が発生する毎に実行される。   Next, FIG. 3 is a flowchart showing the flow of the low-order counter process performed by the crank processing unit 20. This process is executed each time a valid edge (rising edge in the present embodiment) of the multiplied clock signal occurs.

図3に示すように、本処理では、まず、MCntLが最大値(MAX)未満であるか否かを確認し(S300)、最大値未満である場合には(Yes:S300)、MCntLに加算値nを加算したカウント値をMCntLに設定し(S305)、本処理を終了する。尚、本実施形態では、MCntLは8ビットからなり、加算値nは、256/32=8に設定されている。又、最大値は、31×n=248に設定されている。   As shown in FIG. 3, in this process, first, it is confirmed whether or not MCntL is less than the maximum value (MAX) (S300). If it is less than the maximum value (Yes: S300), it is added to MCntL. The count value obtained by adding the value n is set to MCntL (S305), and this process ends. In the present embodiment, MCntL consists of 8 bits, and the added value n is set to 256/32 = 8. The maximum value is set to 31 × n = 248.

一方、S300にて、MCntLが最大値に達している場合には(No:S300)、キャリー許可フラグFcがONに設定されているか否かを確認し(S310)、キャリー許可フラグFcがOFFに設定されている場合には(No:S310)、本処理を直ちに終了する。   On the other hand, if MCntL has reached the maximum value in S300 (No: S300), it is confirmed whether the carry permission flag Fc is set to ON (S310), and the carry permission flag Fc is turned OFF. If it is set (No: S310), this process is immediately terminated.

一方、キャリー許可フラグFcがONに設定されている場合には(Yes:S310)、MCntHが、MCntMにNE10信号における欠歯区間のパルスの欠落数分(つまり、2つ分)を加算した値未満であるか否かを確認する(S315)。   On the other hand, when the carry permission flag Fc is set to ON (Yes: S310), MCntH is a value obtained by adding the number of missing pulses in the missing tooth section in the NE10 signal (that is, two) to MCntM. It is confirmed whether it is less than (S315).

ここで、MCntHがMCntM+2に達している場合には(No:S315)、本処理を直ちに終了する一方、MCntM+2未満である場合には(Yes:S315)、MCntHに1だけ加算した値をMCntHに設定すると共に、MCntLを0にリセットし(S320)、本処理を終了する。   Here, if MCntH has reached MCntM + 2 (No: S315), this process is immediately terminated. On the other hand, if it is less than MCntM + 2 (Yes: S315), a value obtained by adding 1 to MCntH is set to MCntH. At the same time, MCntL is reset to 0 (S320), and this process is terminated.

以上のように構成された本実施形態のエンジンECU1では、図4に示すように、エンジンの始動後、単位時間当たりのクランク軸9の回転数が指定回転数に達するまでは、CPU24が、ソフトウェアによる処理によって、欠歯検出や気筒検出、クランク軸9の回転角度の計測などを実行する。そして、クランク軸9の回転数が指定回転数に達したのち、欠歯を更に2回検出すると、クランク処理部20による欠歯検出と、クランク軸9の回転角度の計測とを有効とする。尚、図4は、エンジン始動時における、エンジンECU1の処理のタイミングを示すタイミングチャートである。但し、図4では、図を簡略化するために、NE10信号については有効エッジのみを示す。   In the engine ECU 1 of the present embodiment configured as described above, as shown in FIG. 4, after the engine is started, until the number of revolutions of the crankshaft 9 per unit time reaches a designated number of revolutions, the CPU 24 By the process of, missing tooth detection, cylinder detection, measurement of the rotation angle of the crankshaft 9 and the like are executed. Then, when the missing tooth is further detected twice after the rotational speed of the crankshaft 9 reaches the designated rotational speed, the missing tooth detection by the crank processing unit 20 and the measurement of the rotational angle of the crankshaft 9 are made effective. FIG. 4 is a timing chart showing the processing timing of the engine ECU 1 when the engine is started. However, in FIG. 4, only the valid edge is shown for the NE10 signal in order to simplify the drawing.

そして、図5に示すように、クランク処理部20は、NE10信号の有効エッジにて、上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとを共にカウントアップする。又、その一方で、逓倍クロック信号(図示せず)の有効エッジにて、下位カウンタ21bのカウント値MCntLをカウントアップすると共に、NE10信号の有効エッジにてMCntLを0にリセットする。   Then, as shown in FIG. 5, the crank processing unit 20 counts up both the count value MCntH of the upper counter 21a and the count value SCnt of the back counter 22 at the valid edge of the NE10 signal. On the other hand, the count value MCntL of the lower counter 21b is counted up at the valid edge of the multiplied clock signal (not shown), and MCntL is reset to 0 at the valid edge of the NE10 signal.

このように各カウンタのカウント値をカウントアップしていき、上位カウンタ21aのカウント値MCntHが欠歯の開始時点に相当する値(つまり、33,69)に達すると、キャリー許可フラグFcをONし、欠歯区間におけるパルスの欠落数分だけ、下位カウンタ21bのカウント値MCntLをラップラウンドさせると共に、下位カウンタ21bから上位カウンタ21aへの桁上がりを行う。   In this way, the count value of each counter is counted up, and when the count value MCntH of the upper counter 21a reaches a value corresponding to the start point of missing teeth (that is, 33, 69), the carry permission flag Fc is turned ON. The count value MCntL of the lower counter 21b is wrapped round by the number of missing pulses in the missing tooth section, and the carry from the lower counter 21b to the upper counter 21a is performed.

そして、欠歯の検出タイミングにて、キャリー許可フラグFcをOFFに設定すると共に、裏カウンタ22のカウント値SCntを0にリセットする。又、上位カウンタ21aのカウント値MCntHが71に達している場合には、0にリセットする。   At the missing tooth detection timing, the carry permission flag Fc is set to OFF, and the count value SCnt of the back counter 22 is reset to zero. If the count value MCntH of the upper counter 21a has reached 71, it is reset to 0.

ここで、図5の破線枠で囲まれた区間にて、NE10信号にノイズや本来発生しているべきパルスの欠落が1つ生じた場合におけるクランク処理部20の動作について説明する。   Here, the operation of the crank processing unit 20 when noise or one missing pulse that should have occurred in the NE10 signal occurs in the section surrounded by the broken line frame in FIG. 5 will be described.

まず、図6に示すように、上位カウンタ21aのカウント値MCntHを本来は25→26へとカウントアップすべき区間において、欠歯判定条件を満たすタイミングにてNE10信号にノイズが1つ発生すると(図中破線枠A内)、クランク処理部20は、欠歯を誤検出する。   First, as shown in FIG. 6, when one noise is generated in the NE10 signal at the timing satisfying the missing tooth determination condition in the section where the count value MCntH of the upper counter 21a should be counted up from 25 to 26 originally ( In the broken line frame A in the figure), the crank processing unit 20 erroneously detects missing teeth.

ここで、クランク処理部20は、裏カウンタ22のカウント値SCntを0にリセットするものの、このタイミングにおけるtMCntHの値(つまり、28)が、NE10信号においてノイズや本来発生しているべきパルスの欠落が1つ発生した場合に、本来の欠歯の検出タイミングにてtMCntHが取り得る値(つまり、33,37,69,1)と異なるため、このタイミングでは、MCntHを本来値に補正せずに28とする(図中破線枠B内)。   Here, although the crank processing unit 20 resets the count value SCnt of the back counter 22 to 0, the value of tMCntH (that is, 28) at this timing is the absence of noise or a pulse that should have occurred in the NE10 signal. When one occurs, it differs from the value that tMCntH can take at the original missing tooth detection timing (that is, 33, 37, 69, 1), so at this timing, MCntH is not corrected to the original value. 28 (inside the broken line frame B in the figure).

そして、上位カウンタ21aのカウント値MCntHが欠歯の開始時点に相当するカウント値(つまり、33)に達すると、キャリー許可フラグFcをONする。
ここで、上述のノイズに起因して、上位カウンタ21aのカウント値MCntHが、本来の欠歯の開始時点前に33に達してしまっているため、キャリー許可フラグFcがONであるにも関わらず、有効エッジが発生する。
When the count value MCntH of the upper counter 21a reaches the count value corresponding to the start point of missing teeth (that is, 33), the carry permission flag Fc is turned ON.
Here, due to the noise described above, the count value MCntH of the upper counter 21a has reached 33 before the start time of the original missing tooth, so that the carry permission flag Fc is ON. A valid edge occurs.

ここで、クランク処理部20は、キャリー許可フラグFcを直ちにOFFすると共に、MCntHを36に設定する。尚、これは、上述のノイズによって本来の欠歯の開始時点前にMCntHが33に達してしまったことにより、本来の欠歯区間にて下位カウンタ21bから上位カウンタ21aへの桁上がりが行われずに、MCntHに誤差が生じてしまうことを防止するための処置である。   Here, the crank processing unit 20 immediately turns off the carry permission flag Fc and sets MCntH to 36. This is because MCntH has reached 33 before the start of the original missing tooth due to the noise described above, and the carry from the lower counter 21b to the higher counter 21a is not performed in the original missing tooth section. In addition, this is a measure for preventing an error from occurring in MCntH.

そして、再度欠歯を検出すると(つまり、本来の欠歯を検出すると)、この検出タイミングでは、tMCntHが37となり、NE10信号においてノイズが1つ発生した場合に本来の欠歯の検出タイミングにてtMCntHが取り得る値と一致するため、このタイミングにて、上位カウンタ21aのカウント値MCntHを本来値である36に補正する(図中破線枠C内)。   When the missing tooth is detected again (that is, when the original missing tooth is detected), tMCntH becomes 37 at this detection timing, and when one noise is generated in the NE10 signal, the original missing tooth detection timing is obtained. Since tMCntH matches a possible value, at this timing, the count value MCntH of the upper counter 21a is corrected to 36, which is the original value (in the broken line frame C in the figure).

次に、図7に示すように、図6と同様の区間にて、欠歯判定条件を満たさないタイミングにてNE10信号にノイズが1つ発生すると(図中破線枠内)、図6の場合と同様に、本来の欠歯の検出タイミングにて、tMCntHが37となり、NE10信号においてノイズが1つ発生した場合に本来の欠歯の検出タイミングにてtMCntHが取り得る値と一致するため、クランク処理部20は、このタイミングにて、上位カウンタ21aのカウント値MCntHを本来値である36に補正する。   Next, as shown in FIG. 7, when one noise is generated in the NE10 signal at the timing not satisfying the missing tooth determination condition in the same section as in FIG. Similarly, tMCntH becomes 37 at the original missing tooth detection timing, and when one noise occurs in the NE10 signal, it matches the value that tMCntH can take at the original missing tooth detection timing. At this timing, the processing unit 20 corrects the count value MCntH of the upper counter 21a to 36, which is the original value.

次に、図8に示すように、上位カウンタ21aのカウント値MCntHを本来は24→25→26へとカウントアップすべき区間において、本来発生しているべきパルスが1つ欠落すると(図中破線枠内)、本来の欠歯の検出タイミングにて、tMCntHが33となる。   Next, as shown in FIG. 8, if one pulse that should have occurred is missing in the section in which the count value MCntH of the upper counter 21a should be counted up from 24 → 25 → 26 (the broken line in the figure). In the frame), tMCntH becomes 33 at the original missing tooth detection timing.

そして、この値は、NE10信号において本来発生しているべきパルスが1つ欠落した場合に本来の欠歯の検出タイミングにてtMCntHが取り得る値と一致するため、クランク処理部20は、このタイミングにて、上位カウンタ21aのカウント値MCntHを本来値である36に補正する。尚、図5〜図8はそれぞれ、クランク処理部20の動作の一例を示すタイミングチャートである。   Since this value matches the value that tMCntH can take at the original missing tooth detection timing when one pulse that should have occurred in the NE10 signal is missing, the crank processing unit 20 determines this timing. Thus, the count value MCntH of the upper counter 21a is corrected to 36, which is the original value. 5 to 8 are timing charts showing an example of the operation of the crank processing unit 20, respectively.

以上のように、本実施形態のエンジンECU1では、表カウンタ21のカウント値が大きな誤差を生じてしまうようなタイミングにて、NE10信号にノイズや本来発生しているべきパルスが1つ欠落し、欠歯を誤検出しても、表カウンタ21のカウント値を間違った本来値に補正してしまうことがない。   As described above, in the engine ECU 1 of the present embodiment, at the timing at which the count value of the table counter 21 causes a large error, the NE10 signal lacks one noise or one pulse that should have occurred, Even if a missing tooth is erroneously detected, the count value of the table counter 21 is not corrected to an incorrect original value.

即ち、本実施形態のエンジンECU1によれば、tMCntHの値が、NE10信号においてノイズもしくは本来発生しているべきパルスの欠落が1つ生じた場合に取り得る値である場合にのみ、表カウンタ21のカウント値を本来値に補正するという簡素な構成でありながらも、欠歯の誤検出に起因して、クランク軸9の回転角度を示すカウント値に大きな誤差が生じてしまうことを防止できる。   That is, according to the engine ECU 1 of the present embodiment, the table counter 21 is used only when the value of tMCntH is a value that can be taken when noise or one missing pulse that should have occurred originally occurs in the NE10 signal. However, it is possible to prevent a large error from occurring in the count value indicating the rotation angle of the crankshaft 9 due to erroneous detection of missing teeth.

又、本実施形態のエンジンECU1では、逓倍クロック信号と下位カウンタ21bとによって、NE10信号の有効エッジの発生間隔におけるクランク軸9の回転角度を計測でき、上位カウンタ21aのカウント値MCntHでクランク軸9の回転角度の上位を示し、下位カウンタ21bのカウント値MCntLでクランク軸9の回転角度の下位を示すことで、クランク軸9の回転角度をより細かく示すことができる(つまり、計測分解能を向上できる。)。   Further, in the engine ECU 1 of the present embodiment, the rotation angle of the crankshaft 9 can be measured by the multiplied clock signal and the lower counter 21b, and the crankshaft 9 can be measured at the effective edge generation interval of the NE10 signal, and the crankshaft 9 can be determined by the count value MCntH of the upper counter 21a. The rotation angle of the crankshaft 9 can be shown more finely (in other words, the measurement resolution can be improved) by indicating the rotation angle of the crankshaft 9 with the count value MCntL of the lower counter 21b. .)

又、本実施形態のエンジンECU1では、欠歯区間にて、上位カウンタ21aのカウント値MCntHを下位カウンタ21bからの桁上がりによってカウントアップするため、欠歯によってNE10信号のパルスが欠落しても、クランク軸9の回転角度を計測できる。   Further, in the engine ECU 1 of the present embodiment, the count value MCntH of the upper counter 21a is counted up by a carry from the lower counter 21b in the missing tooth section, so even if the NE10 signal pulse is lost due to missing teeth, The rotation angle of the crankshaft 9 can be measured.

又、本実施形態のエンジンECU1では、エンジンの始動時には、ソフトウェアによる複雑な処理によって欠歯を検出するため、エンジンECU1の規模を大掛かりにすることなく、エンジンの始動時に速やかに欠歯を検出できる。   Further, in the engine ECU 1 of the present embodiment, missing teeth are detected by complicated processing by software when the engine is started, so that missing teeth can be detected quickly when the engine is started without increasing the scale of the engine ECU 1. .

又、エンジンの回転が安定し、NE10信号における有効エッジの発生間隔が一定の範囲内で収まる回転数では、一定の判定比を用いて欠歯を検出するため、クランク処理部20を簡素に実現できる。更に、クランク処理部20によって簡易に欠歯を検出するため、CPU24の処理負荷を増大させることがない。   In addition, since the engine rotation is stable and the effective edge generation interval in the NE10 signal falls within a certain range, the missing teeth are detected using a certain determination ratio, so the crank processing unit 20 is simply realized. it can. Furthermore, since the missing teeth are easily detected by the crank processing unit 20, the processing load on the CPU 24 is not increased.

尚、本実施形態では、クランク処理部20が行う回転角度計測処理のS110,200と、上位カウンタ21aとが本発明における第1のカウンタに相当し、又、フリーランタイマ29と、回転角度計測処理のS100とが本発明における発生間隔計測手段に相当し、又、S155が本発明における第2の欠歯検出手段に相当する。   In this embodiment, the rotation angle measurement processing S110, 200 performed by the crank processing unit 20 and the upper counter 21a correspond to the first counter in the present invention, and the free-run timer 29, the rotation angle measurement, and the like. The process S100 corresponds to the generation interval measuring means in the present invention, and S155 corresponds to the second missing tooth detecting means in the present invention.

又、本実施形態では、回転角度計測処理のS175,185,200が本発明における補正手段に相当し、S170,180が本発明における補正作動手段に相当する。
又、本実施形態では、回転角度計測処理のS160,165,200と、裏カウンタ22とが本発明における第2のカウンタに相当し、又、逓倍回路23が本発明における逓倍クロック生成手段に相当し、又、回転角度計測処理のS110と、下位カウンタ処理のS300,305と、下位カウンタ21bとが本発明における第3のカウンタに相当する。
In this embodiment, S175, 185, and 200 of the rotation angle measurement process correspond to the correction unit in the present invention, and S170 and 180 correspond to the correction operation unit in the present invention.
In this embodiment, the rotation angle measurement processing S160, 165, and 200 and the back counter 22 correspond to the second counter in the present invention, and the multiplication circuit 23 corresponds to the multiplication clock generation means in the present invention. Further, S110 of the rotation angle measurement process, S300 and 305 of the lower counter process, and the lower counter 21b correspond to the third counter in the present invention.

又、本実施形態では、回転角度計測処理のS115,125と、下位カウンタ処理のS310,315とが本発明におけるキャリーアップ許可手段に相当し、又、CPU24が行う欠歯検出が本発明における第1の欠歯検出手段に相当し、又、CPU24が本発明における切替手段と相当する。   In this embodiment, S115 and 125 of the rotation angle measurement process and S310 and 315 of the lower counter process correspond to the carry-up permission means in the present invention, and the missing tooth detection performed by the CPU 24 is the first in the present invention. This corresponds to one missing tooth detection means, and the CPU 24 corresponds to the switching means in the present invention.

ところで、本実施形態のエンジンECU1では、上述のように、NE10信号において、ノイズや本来発生しているべきパルスの欠落が1つ(つまり、上位カウンタ21aのカウント1つ分)生じた場合を前提としていたが、ノイズや本来発生しているべきパルスの欠落を2つもしくは3つ以内としても良い。   By the way, in the engine ECU 1 of the present embodiment, as described above, it is premised that one or more missing pulses (that is, one count of the upper counter 21a) occur in the NE10 signal. However, the number of noises or missing pulses that should have occurred originally may be within two or three.

より具体的には、ノイズ及びパルスの欠落を2つ以内とする場合には、回転角度計測処理のS170において、tMCntHが32,33もしくは37,38であるか否かを判定し、更に、S180において、tMCntHが68,69もしくは1,2であるか否かを判定するようにクランク処理部20を構成すれば良い。   More specifically, when noise and pulse loss are within two, it is determined whether or not tMCntH is 32, 33 or 37, 38 in S170 of the rotation angle measurement process. In this case, the crank processing unit 20 may be configured to determine whether tMCntH is 68, 69, or 1,2.

又、ノイズ及びパルスの欠落を3つ以内とする場合には、回転角度計測処理のS170において、tMCntHが31〜33もしくは37〜39であるか否かを判定し、更に、S180において、tMCntHが67〜69もしくは1〜3であるか否かを判定するようにクランク処理部20を構成すれば良い。   Further, when the number of missing noises and pulses is within three, it is determined whether or not tMCntH is 31 to 33 or 37 to 39 in S170 of the rotation angle measurement process. Further, in S180, tMCntH is determined as tMCntH. What is necessary is just to comprise the crank process part 20 so that it may determine whether it is 67-69 or 1-3.

又、例えば、ノイズを1つ、パルスの欠落を2つ以内というように互いに数を異ならせても良い。
但し、上述のように、例えば、2つのノイズやパルスの欠落を前提とした場合、図9に示すように、欠歯区間中と、欠歯区間の終了直後とに欠歯の誤検出が生じるようなタイミングでノイズが1つ発生した際には、欠歯区間の終了直後における欠歯の誤検出タイミングにて、tMCntHが38となり、上位カウンタ21aのカウント値MCntHが36に補正されてしまう。
Also, for example, the number may be different from each other, such as one noise and less than two missing pulses.
However, as described above, for example, assuming two noises or missing pulses, false detection of missing teeth occurs in the missing tooth section and immediately after the missing tooth section, as shown in FIG. When one noise is generated at such timing, tMCntH becomes 38 at the erroneous detection timing of missing teeth immediately after the end of the missing tooth section, and the count value MCntH of the upper counter 21a is corrected to 36.

つまり、ノイズが1つしか発生していないにも関わらず、ノイズが2つ発生した場合に本来の欠歯の検出タイミングにてtMCntHが取り得る値38と一致してしまい、本来は37でなければならないにも関わらず、却って新たな誤差−1が生じてしまう。尚、図9は、本実施形態のエンジンECU1において、2つのノイズやパルスの欠落を前提とした場合における問題の一例を示すタイミングチャートである。   In other words, even though only one noise is generated, when two noises are generated, the value coincides with the value 38 that tMCntH can take at the original missing tooth detection timing. In spite of the necessity, a new error −1 is generated. FIG. 9 is a timing chart showing an example of a problem when the engine ECU 1 of the present embodiment is based on the premise of missing two noises and pulses.

そこで、次に、NE10信号にノイズや本来発生しているべきパルスの欠落が2つ以上生じた場合であっても、上述の問題を生じることなく、上位カウンタ21aのカウント値MCntHを補正可能な第2実施形態について説明する。
[第2実施形態]
まず、本実施形態のエンジンECU1は、第1実施形態の回転角度計測処理中において新たに追加した処理を実行するようにクランク処理部20を構成しただけである。
Therefore, next, even when there are two or more missing noises or pulses that should have occurred in the NE10 signal, the count value MCntH of the upper counter 21a can be corrected without causing the above-mentioned problem. A second embodiment will be described.
[Second Embodiment]
First, the engine ECU 1 of the present embodiment merely configures the crank processing unit 20 so as to execute a newly added process during the rotation angle measurement process of the first embodiment.

従って、ここでは、第1実施形態と共通する処理のステップについては同一の符号を付してその説明を省略し、新たに追加した処理の各ステップについてのみ説明する。
ここで、図10は、本実施形態におけるクランク処理部20が行う回転角度計測処理の流れを示すフローチャートである。
Accordingly, here, the same steps as those of the first embodiment are denoted by the same reference numerals, and the description thereof is omitted. Only the newly added steps of the processing will be described.
Here, FIG. 10 is a flowchart showing the flow of the rotation angle measurement process performed by the crank processing unit 20 in the present embodiment.

図10に示すように、本処理では、上述のS180にて、tMCntHが69でも1でもなければ(No:S180)、新たに追加した追加処理を実行したのち(S190)、上述のS200を経て、本処理を終了する。   As shown in FIG. 10, in this process, if tMCntH is neither 69 nor 1 in the above-described S180 (No: S180), the newly added process is executed (S190), and then through the above-described S200. This process is terminated.

次に、図11は、追加処理(S190)の流れを示すフローチャートである。
図11に示すように、本処理では、まず、記憶領域にて、前回の欠歯の検出タイミングにおけるtMCntHが33,37,69,1のいずれでもなかった旨を示すエラーフラグFeがONに設定されているか否かを確認する(S400)。
Next, FIG. 11 is a flowchart showing the flow of the addition process (S190).
As shown in FIG. 11, in this process, first, in the storage area, the error flag Fe indicating that tMCntH was not 33, 37, 69, or 1 at the previous missing tooth detection timing is set to ON. It is confirmed whether it has been done (S400).

ここで、エラーフラグFeがOFFに設定されている場合には(No:S400)、エラーフラグFeをONに設定すると共に(S405)、この際のtMCntHを記憶するために、記憶領域に設定されたカウント値MCntEに、このtMCntHを設定して(S410)、本処理を終了する。   Here, when the error flag Fe is set to OFF (No: S400), the error flag Fe is set to ON (S405), and the tMCntH at this time is set in the storage area. This tMCntH is set to the counted value MCntE (S410), and this process is terminated.

一方、エラーフラグFeがONに設定されている場合には(Yes:S400)、tMCntHと記憶領域に設定されたMCntEとの差の絶対値を算出し、この算出結果が欠歯の発生間隔に相当する値である36であるか否かを判定する(S415)。   On the other hand, if the error flag Fe is set to ON (Yes: S400), the absolute value of the difference between tMCntH and MCntE set in the storage area is calculated, and this calculation result is the missing tooth occurrence interval. It is determined whether or not the corresponding value is 36 (S415).

ここで、差が36以外である場合には(No:S415)、上述のS410へ移行する一方、36である場合には(Yes:S415)、tMCntHが17以上53未満であるか否かを判定する(S420)。尚、ここで、17≦tMCntH<53という範囲は、tMCntH=36を中心とした範囲であり、tMCntHがこの範囲内であるか否かを判定することにより、欠歯の検出タイミングが実際上tMCntH=36に相当するものであるのか、tMCntH=0に相当するものであるのかを判定するのである。   Here, when the difference is other than 36 (No: S415), the process proceeds to the above-described S410. When the difference is 36 (Yes: S415), it is determined whether tMCntH is 17 or more and less than 53. Determination is made (S420). Here, the range of 17 ≦ tMCntH <53 is a range centering on tMCntH = 36. By determining whether or not tMCntH is within this range, the missing tooth detection timing is actually tMCntH. It is determined whether it corresponds to = 36 or tMCntH = 0.

そして、tMCntHが17未満もしくは53以上である場合には(No:S420)、欠歯の検出タイミングがtMCntH=0に相当するものとして、tMCntH及びtMCntLを0にリセットして(S425)、後述のS435に移行する。   If tMCntH is less than 17 or greater than 53 (No: S420), tMCntH and tMCntL are reset to 0 (S425), assuming that the missing tooth detection timing corresponds to tMCntH = 0 (S425). The process proceeds to S435.

一方、tMCntHが17以上53未満である場合には(Yes:S420)、欠歯の検出タイミングがtMCntH=36に相当するものとして、tMCntHに36を設定すると共に、MCntLを0にリセットしたのち(S430)、エラーフラグFeをOFFに設定し(S435)、本処理を終了する。   On the other hand, when tMCntH is 17 or more and less than 53 (Yes: S420), it is assumed that the missing tooth detection timing corresponds to tMCntH = 36, and 36 is set to tMCntH and MCntL is reset to 0 ( (S430), the error flag Fe is set to OFF (S435), and this process ends.

このように構成された本実施形態のクランク処理部20は、図12に示すように、欠歯判定条件を満たさないタイミングにてNE10信号にノイズが2つ発生すると、欠歯の検出タイミングにてtMCntH=38となり、33,37,69,1のいずれでもないため、上位カウンタ21aのカウント値MCntHを本来値の36に補正せずに38とする。   As shown in FIG. 12, the crank processing unit 20 of the present embodiment configured in this way, when two noises occur in the NE10 signal at a timing that does not satisfy the missing tooth determination condition, at the missing tooth detection timing. Since tMCntH = 38, which is neither 33, 37, 69, nor 1, the count value MCntH of the upper counter 21a is set to 38 without being corrected to the original value of 36.

そして、次回の欠歯の検出タイミングまでに新たなノイズやパルスの欠落が生じていなければ、今回の欠歯の検出タイミングにおけるtMCntH(MCntE)と次回の欠歯の検出タイミングにおけるtMCntHとの差が欠歯の発生間隔に相当するため、次回の欠歯の検出タイミングにて、MCntHを本来値の0に補正する。   If there is no new noise or missing pulse until the next missing tooth detection timing, the difference between tMCntH (MCntE) at the current missing tooth detection timing and tMCntH at the next missing tooth detection timing is Since this corresponds to the missing tooth occurrence interval, MCntH is corrected to the original value of 0 at the next missing tooth detection timing.

又、クランク処理部20は、図13に示すように、欠歯判定条件を満たさないように、NE10信号にて、本来発生しているべきパルスが2つ欠落すると、欠歯の検出タイミングにて、tMCntH=32となり、33,37,69,1のいずれでもないため、上位カウンタ21aのカウント値MCntHを本来値の36に補正せずに32とする。   Further, as shown in FIG. 13, the crank processing unit 20 detects the missing tooth detection timing when two missing pulses are missing in the NE10 signal so as not to satisfy the missing tooth determination condition. TMCntH = 32, which is neither 33, 37, 69, nor 1, so the count value MCntH of the upper counter 21a is set to 32 without being corrected to the original value of 36.

そして、次回の欠歯の検出タイミングまでに新たなノイズやパルスの欠落が生じていなければ、今回の欠歯の検出タイミングにおけるtMCntH(MCntE)と次回の欠歯の検出タイミングにおけるtMCntHとの差が欠歯の発生間隔に相当するため、次回の欠歯の検出タイミングにて、MCntHを本来値の0に補正する。   If there is no new noise or missing pulse until the next missing tooth detection timing, the difference between tMCntH (MCntE) at the current missing tooth detection timing and tMCntH at the next missing tooth detection timing is Since this corresponds to the missing tooth occurrence interval, MCntH is corrected to the original value of 0 at the next missing tooth detection timing.

但し、クランク処理部20は、図14に示すように、欠歯判定条件を満たさないタイミングにてNE10信号にノイズが2つ発生すると、上述のように、上位カウンタ21aのカウント値MCntHを本来値の36に補正せずに38とするものの、次回の欠歯の検出タイミングまでに、欠歯判定条件を満たさないように新たにノイズが1つ発生してしまった場合には、今回の欠歯の検出タイミングにおけるtMCntH(MCntE)と次回の欠歯の検出タイミングにおけるtMCntHとの差が欠歯の発生間隔とは異なってしまうため、次回の欠歯の検出タイミングでも、上位カウンタ21aのカウント値MCntHを本来値の0に補正しない。   However, as shown in FIG. 14, when two noises are generated in the NE10 signal at a timing at which the missing tooth determination condition is not satisfied, the crank processing unit 20 sets the count value MCntH of the upper counter 21a to the original value as described above. However, if one new noise is generated so as not to satisfy the missing tooth detection condition by the next missing tooth detection timing, the current missing tooth is corrected. Since the difference between tMCntH (MCntE) at the detection timing of tMCntH and tMCntH at the detection timing of the next missing tooth is different from the missing tooth occurrence interval, the count value MCntH of the upper counter 21a is also detected at the next missing tooth detection timing. Is not corrected to the original value of 0.

しかしながら、これ以降の欠歯の検出タイミングにて、新たにノイズやパルスの欠落が生じなければ、これ以降の欠歯の検出タイミングにて、tMCntEとtMCntHとの差が欠歯の発生間隔に相当するため、その際に、上位カウンタ21aのカウント値MCntHを本来値に補正する。尚、図12〜14はそれぞれ、本実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。   However, if no new missing noise or pulse occurs at the subsequent missing tooth detection timing, the difference between tMCntE and tMCntH corresponds to the missing tooth generation interval at the subsequent missing tooth detection timing. Therefore, at that time, the count value MCntH of the upper counter 21a is corrected to the original value. 12 to 14 are timing charts showing an example of the operation of the crank processing unit 20 in the present embodiment.

つまり、今回の欠歯の検出タイミングもしくは前回の欠歯の検出タイミングが欠歯の誤検出に起因するものであれば、今回の欠歯の検出タイミングにおけるtMCntHと、前回の欠歯の検出タイミングにおけるtMCntHとの差が欠歯の発生間隔に相当するカウント値と不等となる。一方、今回の欠歯の検出タイミング及び前回の欠歯の検出タイミングが本来の欠歯の検出に起因し、更に、その間に新たなノイズやパルスの欠落が生じていなければ、NE10信号に2つ以上のノイズやパルスの欠落が発生した場合でも、今回の欠歯の検出タイミングにおけるtMCntと前回の欠歯の検出タイミングにおけるtMCntHとの差は、欠歯の発生間隔と等しくなる。   That is, if the current missing tooth detection timing or the previous missing tooth detection timing is caused by the erroneous detection of missing teeth, tMCntH at the current missing tooth detection timing and the previous missing tooth detection timing. The difference from tMCntH becomes unequal to the count value corresponding to the missing tooth occurrence interval. On the other hand, if the current missing tooth detection timing and the previous missing tooth detection timing are caused by the original missing tooth detection, and if no new noise or missing pulse has occurred during that time, two NE10 signals are included. Even when the above-mentioned noise or missing pulse occurs, the difference between tMCnt at the present missing tooth detection timing and tMCntH at the previous missing tooth detection timing is equal to the missing tooth occurrence interval.

従って、本実施形態のエンジンECU1によれば、2つ以上のノイズやパルスの欠落が生じても、本来の欠歯の検出タイミングにて上位カウンタ21aのカウント値MCntHを本来値へと補正できる。   Therefore, according to the engine ECU 1 of the present embodiment, even if two or more noises or missing pulses occur, the count value MCntH of the upper counter 21a can be corrected to the original value at the original missing tooth detection timing.

又、たとえ今回の欠歯の検出タイミング及び前回の欠歯の検出タイミングが本来の欠歯の検出に起因するものであるにも関わらず、新たなノイズやパルスの欠落が生じてしまっても、次回の欠歯のタイミング以降にて新たなノイズやパルスの欠落が更に生じなければ、次回の欠歯の検出タイミング以降にて上位カウンタ21aのカウント値MCntHを本来値へと補正できる。   In addition, even if new missing teeth or missing pulses occur even though the detection timing of this missing tooth and the previous missing tooth detection timing are due to the original missing tooth detection, If no new noise or missing pulse occurs after the next missing tooth timing, the count value MCntH of the upper counter 21a can be corrected to the original value after the next missing tooth detection timing.

尚、本実施形態では、クランク処理部20が行う追加処理のS400,415が本発明における請求項2記載の補正実行手段に相当し、S420〜S430、回転角度計測処理のS200が本発明における第2の設定手段に相当する。   In this embodiment, S400 and 415 of the additional processing performed by the crank processing unit 20 correspond to the correction execution means described in claim 2 in the present invention, and S420 to S430 and S200 of the rotation angle measurement processing are the first in the present invention. This corresponds to 2 setting means.

ところで、本実施形態では、クランク処理部20は、S420〜430にて、tMCntHを最も近い本来値に補正したが、G信号の論理レベルに応じた本来値を設定するように構成されていても良い。   By the way, in this embodiment, the crank processing unit 20 has corrected tMCntH to the nearest original value in S420 to 430, but may be configured to set the original value according to the logical level of the G signal. good.

つまり、上述したように、G信号の論理レベルは、クランク軸9の回転角度が360°CAであればローレベルとなり、720°CA(0°CA)であればハイレベルとなるため、G信号の論理レベルを判別することで、正しい本来値を設定できる。   That is, as described above, the logical level of the G signal is low when the rotation angle of the crankshaft 9 is 360 ° CA, and is high when 720 ° CA (0 ° CA). By determining the logical level, a correct original value can be set.

従って、上述の追加処理のS420にて、G信号の論理レベルを判定し、ハイレベルであれば、S425に移行し、ローレベルであれば、S430に移行するようにクランク処理部20を構成すれば良い。尚、この場合、S420,425,430が本発明におけるレベル判別手段と第1の設定手段とに相当する。
[第3実施形態]
次に、第3実施形態について説明する。但し、本実施形態のエンジンECU1は、第2実施形態のクランク処理部20が行っていた処理の一部をCPU24のソフトウェア処理で実現しただけであり、これに関わる部分以外については第2実施形態と全く同様である。従って、ここでは、第2実施形態と共通する部分についてはその説明を省略し、異なる部分についてのみ説明する。
Therefore, the crank processing unit 20 is configured to determine the logical level of the G signal in S420 of the above-described additional processing, and shift to S425 if it is high and shift to S430 if it is low. It ’s fine. In this case, S420, 425, and 430 correspond to the level discriminating means and the first setting means in the present invention.
[Third Embodiment]
Next, a third embodiment will be described. However, the engine ECU 1 of the present embodiment only realizes part of the processing performed by the crank processing unit 20 of the second embodiment by software processing of the CPU 24, and the parts other than those related to this are the second embodiment. Is exactly the same. Therefore, description of parts common to the second embodiment will be omitted here, and only different parts will be described.

まず、本実施形態のエンジンECU1では、クランク処理部20は、表カウンタ21及び裏カウンタ22のカウントアップ及び欠歯検出のみを行うように構成され、CPU24は、上述の内部クロック信号の有効エッジ(本実施形態では立ち上がりエッジ)に同期して、表カウンタ21及び裏カウンタ22のカウント値の両方を読み込み、表カウンタ21のカウント値を補正可能に構成されている(図示省略)。そして、CPU24は、上述の各種ソフトウェア処理の他、以下の異常判定処理を行うように設定されている。   First, in the engine ECU 1 of the present embodiment, the crank processing unit 20 is configured to only count up and detect missing teeth of the front counter 21 and the back counter 22, and the CPU 24 performs the valid edge ( In the present embodiment, in synchronization with the rising edge), both the count values of the front counter 21 and the back counter 22 are read, and the count value of the front counter 21 can be corrected (not shown). The CPU 24 is set to perform the following abnormality determination process in addition to the above-described various software processes.

ここで、図15は、CPU24が行う異常判定処理の流れを示すフローチャートである。尚、本処理は、一定周期毎に繰り返し実行される。
図15に示すように、本処理では、まず、上位カウンタ21aのカウント値MCntHを取得し、カウント値CntM1としてRAM26に設定する(S500)。続いて、裏カウンタ22のカウント値SCntを取得し、カウント値CntSとしてRAM26に設定する(S505)。そして、再度、上位カウンタ21aのカウント値MCntHを取得し、カウント値CntM1とは別のカウント値CntM2としてRAM26に設定したのち(S510)、CntM1とCntM2とが一致しているか否かを確認する(S515)。
Here, FIG. 15 is a flowchart showing the flow of the abnormality determination process performed by the CPU 24. This process is repeatedly executed at regular intervals.
As shown in FIG. 15, in this process, first, the count value MCntH of the upper counter 21a is obtained and set in the RAM 26 as the count value CntM1 (S500). Subsequently, the count value SCnt of the back counter 22 is acquired and set in the RAM 26 as the count value CntS (S505). Then, the count value MCntH of the upper counter 21a is acquired again and set in the RAM 26 as a count value CntM2 different from the count value CntM1 (S510), and it is confirmed whether CntM1 and CntM2 match (S510). S515).

ここで、CntM1とCntM2とが不一致な場合には(No:S515)、これらが一致するまでS500〜S515の処理を繰り返す一方、CntM1とCntM2とが一致している場合には(Yes:S515)、CntM1とCntSとが整合しているか否かを判定する(S520)。尚、ここでは、CntM1とCntSとが一致しているか、もしくはこれらの差の絶対値が36である場合に、整合していると判定し、これら以外の場合には、不整合であると判定する。   Here, when CntM1 and CntM2 do not match (No: S515), the processes of S500 to S515 are repeated until they match, while when CntM1 and CntM2 match (Yes: S515). Then, it is determined whether CntM1 and CntS are consistent (S520). Here, when CntM1 and CntS match or when the absolute value of the difference between them is 36, it is determined that they are matched, and in other cases, they are determined to be mismatched. To do.

そして、CntM1とCntSとが整合していると判定した場合には(Yes:S520)、本処理を直ちに終了する一方、不整合であると判定した場合には(No:S520)、不整合が発生した旨をエラー履歴としてEEPROM27に設定する(S525)。   If it is determined that CntM1 and CntS are consistent (Yes: S520), the process is immediately terminated. On the other hand, if it is determined that there is a mismatch (No: S520), the mismatch is not detected. The occurrence is set in the EEPROM 27 as an error history (S525).

続いて、CntSが0であるか否か(つまり、クランク処理部20が欠歯を検出したか否か)を確認し(S530)、0でない場合には(No:S530)、本処理を直ちに終了する。   Subsequently, it is confirmed whether or not CntS is 0 (that is, whether or not the crank processing unit 20 has detected a missing tooth) (S530). If it is not 0 (No: S530), this process is immediately performed. finish.

一方、CntSが0である場合には(Yes:S530)、第2実施形態のクランク処理部20と同様の補正を行う補正処理を実行したのち(S535)、本処理を終了する。
ここで、図16は、上述の補正処理(S535)の流れを示すフローチャートである。
On the other hand, when CntS is 0 (Yes: S530), after performing the correction process which performs the correction | amendment similar to the crank process part 20 of 2nd Embodiment (S535), this process is complete | finished.
Here, FIG. 16 is a flowchart showing the flow of the above-described correction processing (S535).

図16に示すように、本処理では、まず、CntM1が33もしくは37であるか否かを確認し(S600)、CntM1が33もしくは37である場合には(Yes:S600)、後述のS635に直ちに移行する一方、33でも37でもない場合には(No:S600)、CntM1が69もしくは1であるか否かを確認する(S605)。   As shown in FIG. 16, in this process, first, it is confirmed whether CntM1 is 33 or 37 (S600). If CntM1 is 33 or 37 (Yes: S600), the process proceeds to S635 described later. On the other hand, if it is not 33 or 37 (No: S600), it is checked whether CntM1 is 69 or 1 (S605).

そして、CntM1が69もしくは1である場合には(Yes:S605)、後述のS640に直ちに移行する一方、69でも1でもない場合には(No:S605)、RAM26にてエラーフラグFeがONに設定されているか否かを確認する(S610)。   If CntM1 is 69 or 1 (Yes: S605), the process immediately proceeds to S640 described later, whereas if it is neither 69 nor 1 (No: S605), the error flag Fe is turned ON in the RAM 26. It is confirmed whether it is set (S610).

ここで、エラーフラグFeがOFFに設定されている場合には(No:S610)、エラーフラグFeをONに設定したのち(S615)、CntM1をCntE(第2実施形態におけるMCntEに相当)としてRAM26に設定し(S620)、本処理を終了する。   If the error flag Fe is set to OFF (No: S610), the error flag Fe is set to ON (S615), and then CntM1 is set to CntE (corresponding to MCntE in the second embodiment). (S620), and this process ends.

一方、エラーフラグFeがONに設定されている場合には(Yes:S610)、CntM1とCntEとの差の絶対値を算出し、この算出結果が36であるか否かを判定する(S625)。   On the other hand, when the error flag Fe is set to ON (Yes: S610), the absolute value of the difference between CntM1 and CntE is calculated, and it is determined whether or not the calculation result is 36 (S625). .

ここで、差が36以外である場合には(No:S625)、上述のS620に移行する一方、差が36である場合には(Yes:S625)、CntM1が17以上53未満であるか否かを判定する(S630)。   Here, when the difference is other than 36 (No: S625), the process proceeds to the above-described S620, while when the difference is 36 (Yes: S625), whether CntM1 is 17 or more and less than 53. Is determined (S630).

そして、CntM1が17以上53未満である場合には(Yes:S630)、欠歯の検出タイミングがMCntH=36に相当するものとして、MCntHに36を設定して(S635)、後述のS645に移行する。   If CntM1 is 17 or more and less than 53 (Yes: S630), assuming that the missing tooth detection timing corresponds to MCntH = 36, 36 is set in MCntH (S635), and the process proceeds to S645 described later. To do.

一方、CntM1が17未満もしくは53以上である場合には(No:S630)、欠歯の検出タイミングがMCntH=0に相当するものとして、MCntHを0にリセットしたのち(S640)、エラーフラグFeをOFFに設定して(S645)、本処理を終了する。尚、S635,640において、CPU24が、上位カウンタ21aのカウント値MCntHのみを補正して、下位カウンタ21bのカウント値MCntLの補正を行わないのは、クランク処理部20がNE10信号の有効エッジにてMCntLを0にリセットするため、CPU24がわざわざこれを行う必要がないためである。   On the other hand, when CntM1 is less than 17 or 53 or more (No: S630), it is assumed that the missing tooth detection timing corresponds to MCntH = 0, and MCntH is reset to 0 (S640), and then the error flag Fe is set. It is set to OFF (S645), and this process ends. In S635 and 640, the CPU 24 corrects only the count value MCntH of the upper counter 21a and does not correct the count value MCntL of the lower counter 21b. The crank processor 20 is at the effective edge of the NE10 signal. This is because MCntL is reset to 0, and the CPU 24 does not have to do this purposely.

以上のように構成された本実施形態のエンジンECU1では、上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとが不整合な場合にのみ、CPU24が補正処理を行うため、欠歯の誤検出が生じた場合でも、上位カウンタ21aのカウント値MCntHを間違った値に補正してしまうことを防止できる。   In the engine ECU 1 of the present embodiment configured as described above, the CPU 24 performs the correction process only when the count value MCntH of the upper counter 21a and the count value SCnt of the back counter 22 are inconsistent. Even when erroneous detection occurs, it is possible to prevent the count value MCntH of the upper counter 21a from being corrected to an incorrect value.

又、本実施形態のエンジンECU1では、第2実施形態のクランク処理部20が行う処理の一部をCPU24のソフトウェア処理で行っているため、クランク処理部20の構成をその分簡素にすることができ、ひいては、エンジンECU1自体の構成も簡素にできる。   Further, in the engine ECU 1 of the present embodiment, part of the processing performed by the crank processing unit 20 of the second embodiment is performed by software processing of the CPU 24, so that the configuration of the crank processing unit 20 can be simplified correspondingly. As a result, the configuration of the engine ECU 1 itself can be simplified.

又、本実施形態のエンジンECU1では、CPU24が上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとを同時ではなく、順番に取得するため、取得タイミングにズレが生じる。   Further, in the engine ECU 1 of the present embodiment, the CPU 24 acquires the count value MCntH of the upper counter 21a and the count value SCnt of the back counter 22 in order rather than simultaneously, and therefore there is a deviation in the acquisition timing.

しかしながら、図17(a),(b)、図18(a),(b)における黒点に示すように、CPU24は、MCntHとSCntとを交互に取得し、2回取得したMCntH同士が一致している場合にのみ、MCntHとSCntとが整合しているか否かを判定するため、実際には整合しているにも関わらず不整合であると判定したり、不整合であるにも関わらず整合していると判定してしまうことを防止できる。尚、図17は、上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとが整合している場合における取得タイミングの一例を示す説明図である。又、図18は、上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとが不整合な場合における取得タイミングの一例を示す説明図である。   However, as indicated by the black dots in FIGS. 17A, 17B, 18A, and 18B, the CPU 24 alternately acquires MCntH and SCnt, and MCntH acquired twice coincides with each other. In order to determine whether or not MCntH and SCnt are consistent, it is determined that the MCntH and SCnt are inconsistent even though they are actually matched. It can be prevented from being determined to be consistent. FIG. 17 is an explanatory diagram showing an example of the acquisition timing when the count value MCntH of the upper counter 21a and the count value SCnt of the back counter 22 match. FIG. 18 is an explanatory diagram showing an example of acquisition timing when the count value MCntH of the upper counter 21a and the count value SCnt of the back counter 22 are inconsistent.

又、本実施形態のエンジンECU1では、図17(c),(d)、図18(c),(d)における黒点に示すように、CPU24は、MCntHを2つ取得する間にてNE10信号の有効エッジが発生して、取得したMCntH同士が不一致であれば、MCntH同士が一致するまでMCntH及びSCntの取得を繰り返すため、MCntHとSCntとが整合しているか否かを確実に判定できる。   Further, in the engine ECU 1 of the present embodiment, as shown by the black dots in FIGS. 17C, 17D, 18C, and 18D, the CPU 24 receives the NE10 signal while acquiring two MCntHs. If the obtained MCntHs do not coincide with each other, and the acquisition of MCntH and SCnt is repeated until the MCntHs coincide with each other, it is possible to reliably determine whether MCntH and SCnt match.

尚、本実施形態では、補正処理のS635,640が本発明における補正手段に相当し、S600,605,610,625が本発明における補正作動手段に相当する。
又、本実施形態では、補正処理のS630,635,640が本発明における第2の設定手段に相当し、異常判定処理のS500,505,510が本発明におけるカウント値取得手段に相当する。
In this embodiment, S635 and 640 of the correction process correspond to the correction unit in the present invention, and S600, 605, 610, and 625 correspond to the correction operation unit in the present invention.
In the present embodiment, the correction processing S630, 635, 640 corresponds to the second setting means in the present invention, and the abnormality determination processing S500, 505, 510 corresponds to the count value acquisition means in the present invention.

又、本実施形態では、異常判定処理のS515,520が本発明における補正許可手段に相当し、S515が本発明における再作動手段に相当する。
ところで、本実施形態では、裏カウンタ22のカウント値SCntが0である場合(つまり、欠歯の検出タイミング)に、補正処理を行うようにCPU24が設定されていたが、0以外の指定値に達している場合に、補正処理を行うように設定されていても良い。
In this embodiment, S515 and 520 of the abnormality determination process correspond to the correction permission means in the present invention, and S515 corresponds to the reactivation means in the present invention.
In the present embodiment, the CPU 24 is set to perform the correction process when the count value SCnt of the back counter 22 is 0 (that is, the missing tooth detection timing). It may be set to perform the correction process when it has reached.

つまり、裏カウンタ22のカウント値SCntは、欠歯の誤検出時にも0にリセットされるため、指定カウント値を適切に設定すれば、欠歯の誤検出から本来の欠歯の検出に達するまでに裏カウンタ22のカウント値SCntが指定カウント値に達することがなく、本来の欠歯の検出に起因するタイミングでのみ、上位カウンタ21aのカウント値MCntHを本来の欠歯の検出タイミングにて取るべき本来値へと補正できる。これにより、CPU24の処理の負荷を軽減することができる。   In other words, the count value SCnt of the back counter 22 is reset to 0 even when a missing tooth is erroneously detected. Therefore, if the designated count value is appropriately set, until the missing tooth is detected erroneously until the original missing tooth is detected. The count value SCnt of the back counter 22 does not reach the specified count value, and the count value MCntH of the upper counter 21a should be taken at the original missing tooth detection timing only at the timing caused by the original missing tooth detection. It can be corrected to the original value. Thereby, the processing load of the CPU 24 can be reduced.

又、本実施形態では、CPU24は、補正処理のS500〜S515にて、上位カウンタ21aのカウント値MCntHを2回読み込み、これらが互いに一致しているか否かを判定していたが、これに代えて、裏カウンタ22のカウント値SCntを2回読み込み、これらが互いに一致しているか否かを判定するように設定されていても良い。   In this embodiment, the CPU 24 reads the count value MCntH of the upper counter 21a twice in S500 to S515 of the correction process and determines whether or not they match each other. Thus, the count value SCnt of the back counter 22 may be read twice, and it may be set so as to determine whether or not they match each other.

又、本実施形態では、S525にてエラー履歴を行ったが、これに代えて、車両を安全に走行させるためのフェイルセーフ処理を実行するように設定されていても良い。
又、本実施形態では、上位カウンタ21aのカウント値MCntHを補正したのち、再度、MCntHとSCntとが整合しているか否かを判定し、正しく補正されていることを確認するようにCPU24が設定されていても良い。
In the present embodiment, the error history is performed in S525, but instead of this, it may be set to execute a fail-safe process for driving the vehicle safely.
In this embodiment, after correcting the count value MCntH of the upper counter 21a, the CPU 24 determines again whether MCntH and SCnt are matched and confirms that the correction is correct. May be.

又、本実施形態では、上位カウンタ21aのカウント値MCntHが変わるタイミングにて、クランク処理部20が補正を行うようにCPU24が設定されていても良い。
以上、本発明の実施の形態について説明したが、本発明は、上記実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の形態をとり得ることはいうまでもない。
In the present embodiment, the CPU 24 may be set so that the crank processing unit 20 performs correction at the timing when the count value MCntH of the upper counter 21a changes.
Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and it goes without saying that various forms can be taken as long as they belong to the technical scope of the present invention. .

例えば、上記いずれの実施形態でも、NE10信号の立ち上がりエッジを有効エッジとしていたが、立ち下がりエッジを有効エッジとしても良いし、立ち上がりエッジ及び立ち下がりエッジの両方を有効エッジとしても良い。尚、両方を有効エッジとした場合には、クランク軸9の回転角度をより細かく計測できる(つまり、計測分解能を向上できる。)。   For example, in any of the above embodiments, the rising edge of the NE10 signal is the effective edge, but the falling edge may be the effective edge, or both the rising edge and the falling edge may be the effective edge. When both are effective edges, the rotation angle of the crankshaft 9 can be measured more finely (that is, the measurement resolution can be improved).

又、上記いずれの実施形態でも、欠歯の検出タイミングで上位カウンタ21aのカウント値MCntHを0や36に設定しているが、0や36以外の値(例えば、15や51)を設定しても良い。尚、この場合、MCntHに1加算する処理にて、ガード値を設定する処理(MCntH=72→0)を追加すれば良い。   In any of the above embodiments, the count value MCntH of the upper counter 21a is set to 0 or 36 at the missing tooth detection timing, but a value other than 0 or 36 (for example, 15 or 51) is set. Also good. In this case, a process of setting a guard value (MCntH = 72 → 0) may be added in the process of adding 1 to MCntH.

又、上記いずれの実施形態でも、本発明を4サイクルの直列4気筒エンジンを制御するエンジンECUに適用したが、これとは異なる他の形態のエンジンを制御するエンジンECUに適用しても勿論良い。   In any of the above-described embodiments, the present invention is applied to an engine ECU that controls a four-cycle in-line four-cylinder engine. However, the present invention may of course be applied to an engine ECU that controls another form of engine. .

又、上記いずれの実施形態でも、ロータ10は、欠歯部102が1つだけ設けられていたが、複数設けられていても勿論良い。尚、複数の場合には、欠歯102は、連続して設けられていても良い。   In any of the above embodiments, the rotor 10 is provided with only one missing tooth portion 102, but a plurality of rotor teeth may be provided. In a plurality of cases, the missing teeth 102 may be provided continuously.

又、上記いずれの実施形態でも、ロータ10の歯101は、10°CA毎の間隔で形成されていたが、他の回転角度(例えば、6°CA)毎の間隔で形成されていても勿論良い。   In any of the above-described embodiments, the teeth 101 of the rotor 10 are formed at intervals of 10 ° CA. However, the teeth 101 may of course be formed at intervals of other rotation angles (for example, 6 ° CA). good.

第1実施形態におけるエンジンECU1の構成を示す構成ブロック図である。1 is a configuration block diagram showing a configuration of an engine ECU 1 in a first embodiment. 第1実施形態におけるクランク処理部20が行う回転角度計測処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the rotation angle measurement process which the crank process part 20 in 1st Embodiment performs. 第1実施形態におけるクランク処理部20が行う下位カウンタ処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the low-order counter process which the crank process part 20 in 1st Embodiment performs. エンジン始動時における、第1実施形態のエンジンECU1の処理のタイミングを示すフローチャートである。It is a flowchart which shows the timing of the process of engine ECU1 of 1st Embodiment at the time of engine starting. 第1実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。It is a timing chart which shows an example of operation | movement of the crank process part 20 in 1st Embodiment. 第1実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。It is a timing chart which shows an example of operation | movement of the crank process part 20 in 1st Embodiment. 第1実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。It is a timing chart which shows an example of operation | movement of the crank process part 20 in 1st Embodiment. 第1実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。It is a timing chart which shows an example of operation | movement of the crank process part 20 in 1st Embodiment. 第1実施形態のエンジンECU1において、2つのノイズやパルスの欠落を前提とした場合における問題の一例を示すタイミングチャートである。3 is a timing chart showing an example of a problem when two noises and missing pulses are assumed in the engine ECU 1 of the first embodiment. 第2実施形態におけるクランク処理部20が行う回転角度計測処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the rotation angle measurement process which the crank process part 20 in 2nd Embodiment performs. 第2実施形態におけるクランク処理部20が行う追加処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the additional process which the crank process part 20 in 2nd Embodiment performs. 第2実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートであるIt is a timing chart which shows an example of operation of crank processing part 20 in a 2nd embodiment. 第2実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。It is a timing chart which shows an example of operation of crank processing part 20 in a 2nd embodiment. 第2実施形態におけるクランク処理部20の動作の一例を示すタイミングチャートである。It is a timing chart which shows an example of operation of crank processing part 20 in a 2nd embodiment. 第3実施形態におけるCPU24が行う異常判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the abnormality determination process which CPU24 in 3rd Embodiment performs. 第3実施形態におけるCPU24が行う補正処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the correction process which CPU24 in 3rd Embodiment performs. 上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとが整合している場合における取得タイミングの一例を示す説明図である。It is explanatory drawing which shows an example of the acquisition timing in case count value MCntH of the high-order counter 21a and count value SCnt of the back counter 22 are in agreement. 上位カウンタ21aのカウント値MCntHと裏カウンタ22のカウント値SCntとが不整合な場合における取得タイミングの一例を示す説明図である。It is explanatory drawing which shows an example of the acquisition timing in case count value MCntH of the high-order counter 21a and count value SCnt of the back counter 22 are inconsistent. 取得タイミングのズレの一例を示す説明図である。It is explanatory drawing which shows an example of the shift | offset | difference of an acquisition timing. 欠歯判定条件が成立するようなタイミングでクランク軸信号にノイズが重畳した場合の一例を示すタイミングチャートである。It is a timing chart which shows an example at the time of noise superimposing on a crankshaft signal at the timing which a missing tooth determination condition is satisfied. 欠歯判定条件が成立するようなクランク軸回転信号の出力低下が生じた場合の一例を示すタイミングチャートである。It is a timing chart which shows an example when the output fall of the crankshaft rotation signal that the missing tooth determination condition is satisfied occurs.

符号の説明Explanation of symbols

1…エンジンECU、2…マイコン、3,4,5,6…入力回路、7…出力回路、8…クランク軸センサ、9…クランク軸、10,13…ロータ、11…カム軸センサ、12…カム軸、14…スタータスイッチ、15…アイドルスイッチ、16…エアフローメータ、17…スロットルセンサ、18…水温センサ、19…イグナイタ、20…クランク処理部、21…表カウンタ、21a…上位カウンタ、21b…下位カウンタ、22…裏カウンタ、23…逓倍回路、24…CPU、25…ROM、26…RAM、27…EEPROM、28…比較器、29…フリーランタイマ、30…A/D変換器、31…I/Oポート、41,42,43,44…点火コイル、51,52,53,54…燃料噴射弁、101…歯、102…欠歯部。   DESCRIPTION OF SYMBOLS 1 ... Engine ECU, 2 ... Microcomputer, 3, 4, 5, 6 ... Input circuit, 7 ... Output circuit, 8 ... Crankshaft sensor, 9 ... Crankshaft, 10,13 ... Rotor, 11 ... Camshaft sensor, 12 ... Camshaft, 14 ... Starter switch, 15 ... Idle switch, 16 ... Air flow meter, 17 ... Throttle sensor, 18 ... Water temperature sensor, 19 ... Igniter, 20 ... Crank processor, 21 ... Table counter, 21a ... Upper counter, 21b ... Lower counter, 22 ... back counter, 23 ... multiplication circuit, 24 ... CPU, 25 ... ROM, 26 ... RAM, 27 ... EEPROM, 28 ... comparator, 29 ... free-run timer, 30 ... A / D converter, 31 ... I / O port, 41, 42, 43, 44 ... ignition coil, 51, 52, 53, 54 ... fuel injection valve, 101 ... tooth, 102 ... missing tooth part.

Claims (11)

エンジンのクランク軸の回転角度を逐次計測し、この計測結果に基づいて該エンジンを制御するエンジン制御装置であって、
前記クランク軸の回転位置が予め設定された基準位置以外であるときには、前記クランク軸が所定角度回転する毎にパルスを生じ、前記基準位置であるときには、前記クランク軸が前記所定角度よりも大きい角度回転するまで前記パルスが欠落した欠歯を生じるクランク軸回転信号が入力され、該クランク軸回転信号における前記パルスの有効エッジにてカウント値をカウントアップし、該カウント値によって前記計測結果を示す第1のカウンタと、
前記有効エッジの発生間隔を逐次計測する発生間隔計測手段と、
該発生間隔計測手段の今回の計測結果と、前回の計測結果との比を逐次算出し、この算出比と、前記有効エッジ間に前記欠歯が生じたか否かを判定するために予め設定された判定比とに基づいて、前記欠歯を検出する欠歯検出手段と、
該欠歯検出手段の欠歯検出タイミングに基づいた補正タイミングにて前記第1のカウンタのカウント値が本来取るべき値である本来値に、前記第1のカウンタのカウント値を補正する補正手段と、
前記補正タイミングにて、前記第1のカウンタのカウント値が、予め指定された指定数以内のズレが生じた場合に取り得る値である場合、ならびに、前記第1のカウンタのカウント値が、前記指定数を越えるズレが生じた場合に取り得る値であっても、今回の前記補正タイミングにおける前記第1のカウンタのカウント値と、前回の前記補正タイミングにおける前記第1のカウンタのカウント値との差を算出し、算出した差が前記欠歯の発生間隔に相当するカウント値と等しい場合には、前記補正手段を作動させる補正作動手段と、
を備えることを特徴とするエンジン制御装置。
An engine control device that sequentially measures the rotation angle of the crankshaft of an engine and controls the engine based on the measurement result,
When the rotational position of the crankshaft is other than a preset reference position, a pulse is generated each time the crankshaft rotates by a predetermined angle, and when the crankshaft is at the reference position, the crankshaft has an angle larger than the predetermined angle. A crankshaft rotation signal that causes a missing tooth missing the pulse until the rotation is input, the count value is counted up at the effective edge of the pulse in the crankshaft rotation signal, and the measurement result is indicated by the count value. 1 counter,
An occurrence interval measuring means for sequentially measuring the occurrence interval of the effective edge;
A ratio between the current measurement result of the generation interval measuring means and the previous measurement result is sequentially calculated, and is set in advance to determine whether or not the missing tooth has occurred between the calculated ratio and the effective edge. Missing tooth detection means for detecting the missing tooth based on the determination ratio;
Correction means for correcting the count value of the first counter to an original value, which is a value that the count value of the first counter should originally take at a correction timing based on the missing tooth detection timing of the missing tooth detection means; ,
In the correction timing, the count value of the first counter is a value that can be taken when a deviation within a designated number specified in advance occurs , and the count value of the first counter Even if it is a value that can be taken when a deviation exceeding the specified number occurs, the count value of the first counter at the current correction timing and the count value of the first counter at the previous correction timing When the difference is calculated, and the calculated difference is equal to the count value corresponding to the occurrence interval of the missing teeth, the correction operation means for operating the correction means,
An engine control device comprising:
前記指定数以内のズレは、前記有効エッジの発生数1つ分であることを特徴とする請求項1記載のエンジン制御装置。The engine control apparatus according to claim 1, wherein the deviation within the specified number is one occurrence of the effective edge. 前記エンジンのカム軸の回転位置に応じてレベルが変化する気筒判別信号のレベルを判別するレベル判別手段と、Level discriminating means for discriminating the level of a cylinder discriminating signal whose level changes according to the rotational position of the cam shaft of the engine;
該気筒判別信号のレベルに応じて予め設定された複数種類の前記本来値のうち、前記レベル判別手段の判別結果に応じたものを前記本来値に設定する第1の設定手段と、First setting means for setting a value corresponding to a determination result of the level determination means to the original value among a plurality of types of the original values set in advance according to the level of the cylinder determination signal;
を備えることを特徴とする請求項1又は請求項2記載のエンジン制御装置。The engine control apparatus according to claim 1, further comprising:
前記補正タイミングに応じて予め設定された複数種類の前記本来値のうち、前記第1のカウンタのカウント値に最も近いものを前記本来値に設定する第2の設定手段を備えることを特徴とする請求項1又は請求項2記載のエンジン制御装置。Of the plurality of kinds of original values preset in accordance with the correction timing, there is provided second setting means for setting a value closest to the count value of the first counter to the original value. The engine control device according to claim 1 or 2. エンジンのクランク軸の回転角度を逐次計測し、この計測結果に基づいて該エンジンを制御するエンジン制御装置であって、An engine control device that sequentially measures the rotation angle of the crankshaft of an engine and controls the engine based on the measurement result,
前記クランク軸の回転位置が予め設定された基準位置以外であるときには、前記クランク軸が所定角度回転する毎にパルスを生じ、前記基準位置であるときには、前記クランク軸が前記所定角度よりも大きい角度回転するまで前記パルスが欠落した欠歯を生じるクランク軸回転信号が入力され、該クランク軸回転信号における前記パルスの有効エッジにてカウント値をカウントアップし、該カウント値によって前記計測結果を示す第1のカウンタと、When the rotational position of the crankshaft is other than a preset reference position, a pulse is generated each time the crankshaft rotates by a predetermined angle, and when the crankshaft is at the reference position, the crankshaft has an angle larger than the predetermined angle. A crankshaft rotation signal that causes a missing tooth missing the pulse until the rotation is input, the count value is counted up at the effective edge of the pulse in the crankshaft rotation signal, and the measurement result is indicated by the count value. 1 counter,
前記有効エッジの発生間隔を逐次計測する発生間隔計測手段と、An occurrence interval measuring means for sequentially measuring the occurrence interval of the effective edge;
該発生間隔計測手段の今回の計測結果と、前回の計測結果との比を逐次算出し、この算出比と、前記有効エッジ間に前記欠歯が生じたか否かを判定するために予め設定された判定比とに基づいて、前記欠歯を検出する欠歯検出手段と、A ratio between the current measurement result of the generation interval measuring means and the previous measurement result is sequentially calculated, and is set in advance to determine whether or not the missing tooth has occurred between the calculated ratio and the effective edge. Missing tooth detection means for detecting the missing tooth based on the determination ratio;
該欠歯検出手段の欠歯検出タイミングに基づいた補正タイミングにて前記第1のカウンタのカウント値が本来取るべき値である本来値に、前記第1のカウンタのカウント値を補正する補正手段と、Correction means for correcting the count value of the first counter to an original value, which is a value that the count value of the first counter should originally take at a correction timing based on the missing tooth detection timing of the missing tooth detection means; ,
前記補正タイミングにて、前記第1のカウンタのカウント値が、予め指定された指定数以内のズレが生じた場合に取り得る値である場合に、前記補正手段を作動させる補正作動手段と、Correction operation means for operating the correction means when the count value of the first counter is a value that can be taken when a deviation within a specified number specified in advance occurs at the correction timing;
前記クランク軸回転信号が入力され、前記有効エッジにてカウント値をカウントアップすると共に、前記欠歯検出タイミングにてカウント値を0にリセットする第2のカウンタと、A second counter that receives the crankshaft rotation signal, counts up the count value at the effective edge, and resets the count value to 0 at the missing tooth detection timing;
を備え、With
該第2のカウンタのカウント値が予め指定された0以外の指定カウント値に達したタイミングを前記補正タイミングに用いることを特徴とするエンジン制御装置。An engine control device characterized in that a timing at which the count value of the second counter reaches a designated count value other than 0 designated in advance is used as the correction timing.
エンジンのクランク軸の回転角度を逐次計測し、この計測結果に基づいて該エンジンを制御するエンジン制御装置であって、An engine control device that sequentially measures the rotation angle of the crankshaft of an engine and controls the engine based on the measurement result,
前記クランク軸の回転位置が予め設定された基準位置以外であるときには、前記クランク軸が所定角度回転する毎にパルスを生じ、前記基準位置であるときには、前記クランク軸が前記所定角度よりも大きい角度回転するまで前記パルスが欠落した欠歯を生じるクランク軸回転信号が入力され、該クランク軸回転信号における前記パルスの有効エッジにてカウント値をカウントアップし、該カウント値によって前記計測結果を示す第1のカウンタと、When the rotational position of the crankshaft is other than a preset reference position, a pulse is generated each time the crankshaft rotates by a predetermined angle, and when the crankshaft is at the reference position, the crankshaft has an angle larger than the predetermined angle. A crankshaft rotation signal that causes a missing tooth missing the pulse until the rotation is input, the count value is counted up at the effective edge of the pulse in the crankshaft rotation signal, and the measurement result is indicated by the count value. 1 counter,
前記有効エッジの発生間隔を逐次計測する発生間隔計測手段と、An occurrence interval measuring means for sequentially measuring the occurrence interval of the effective edge;
該発生間隔計測手段の今回の計測結果と、前回の計測結果との比を逐次算出し、この算出比と、前記有効エッジ間に前記欠歯が生じたか否かを判定するために予め設定された判定比とに基づいて、前記欠歯を検出する欠歯検出手段と、A ratio between the current measurement result of the generation interval measuring means and the previous measurement result is sequentially calculated, and is set in advance to determine whether or not the missing tooth has occurred between the calculated ratio and the effective edge. Missing tooth detection means for detecting the missing tooth based on the determination ratio;
該欠歯検出手段の欠歯検出タイミングに基づいた補正タイミングにて前記第1のカウンタのカウント値が本来取るべき値である本来値に、前記第1のカウンタのカウント値を補正する補正手段と、Correction means for correcting the count value of the first counter to an original value, which is a value that the count value of the first counter should originally take at a correction timing based on the missing tooth detection timing of the missing tooth detection means; ,
前記補正タイミングにて、前記第1のカウンタのカウント値が、予め指定された指定数以内のズレが生じた場合に取り得る値である場合に、前記補正手段を作動させる補正作動手段と、Correction operation means for operating the correction means when the count value of the first counter is a value that can be taken when a deviation within a specified number specified in advance occurs at the correction timing;
前記クランク軸回転信号が入力され、前記有効エッジにてカウント値をカウントアップすると共に、前記欠歯検出タイミングにてカウント値を0にリセットする第2のカウンタと、A second counter that receives the crankshaft rotation signal, counts up the count value at the effective edge, and resets the count value to 0 at the missing tooth detection timing;
前記補正タイミング間において、前記第1のカウンタのカウント値と、前記第2のカウンタのカウント値とを取得するカウント値取得手段と、Count value acquisition means for acquiring the count value of the first counter and the count value of the second counter between the correction timings;
該カウント値取得手段により取得された前記第1のカウンタのカウント値と、前記第2のカウンタのカウント値とを比較し、これらカウント値同士が不整合な場合にのみ、前記補正作動手段の作動を許可する補正許可手段と、The count value of the first counter acquired by the count value acquisition means is compared with the count value of the second counter, and the operation of the correction operation means is performed only when these count values are inconsistent. Amendment permitting means to permit
を備え、With
前記カウント値取得手段は、前記有効エッジの発生間隔の最小時間よりも短い時間間隔にて、前記第1のカウンタのカウント値と、前記第2のカウンタのカウント値とを少なくとも3つ交互に取得し、The count value acquisition unit alternately acquires at least three count values of the first counter and a count value of the second counter at a time interval shorter than a minimum time of occurrence intervals of the valid edges. And
前記補正許可手段は、前記第1のカウンタのカウント値と、前記第2のカウンタのカウント値とのうち、複数のカウント値を取得した一方のカウンタのカウント値同士が一致している場合にのみ作動することを特徴とするエンジン制御装置。The correction permission means is only when the count values of one counter that has acquired a plurality of count values of the count value of the first counter and the count value of the second counter match each other. An engine control device that operates.
前記カウント値取得手段により取得された前記第1のカウンタのカウント値と、前記第2のカウンタのカウント値とのうち、複数のカウント値を取得した一方のカウンタのカウント値同士が不一致な場合に、前記カウント値取得手段を再作動させる再作動手段を備えることを特徴とする請求項6記載のエンジン制御装置。When the count values of one counter that has acquired a plurality of count values out of the count values of the first counter acquired by the count value acquisition means and the count values of the second counter do not match. The engine control device according to claim 6, further comprising a reactivation means for reactivating the count value acquisition means. 前記補正作動手段は、前記第1のカウンタのカウント値が、前記指定数を越えるズレが生じた場合に取り得る値である場合でも、今回の前記補正タイミングにおける前記第1のカウンタのカウント値と、前回の前記補正タイミングにおける前記第1のカウンタのカウント値との差を算出し、算出した差が前記欠歯の発生間隔に相当するカウント値と等しければ、前記補正手段を作動させることを特徴とする請求項5乃至請求項7いずれか記載のエンジン制御装置。Even when the count value of the first counter is a value that can be taken when a deviation exceeding the specified number occurs, the correction actuating means is configured to obtain the count value of the first counter at the current correction timing. Calculating a difference from the count value of the first counter at the previous correction timing, and operating the correction means if the calculated difference is equal to a count value corresponding to the missing tooth occurrence interval. The engine control device according to any one of claims 5 to 7. 前記発生間隔計測手段の前回の計測結果を予め設定された逓倍数で分割した時間を1周期とする逓倍クロック信号を生成する逓倍クロック生成手段と、A multiplied clock generating means for generating a multiplied clock signal having a period obtained by dividing the previous measurement result of the generation interval measuring means by a preset multiplication number;
該逓倍クロック信号によりカウント値を前記逓倍数までカウントアップすると共に、前記有効エッジにて前記カウント値を0にリセットする第3のカウンタと、A third counter that counts up the count value to the multiplication number by the multiplied clock signal and resets the count value to 0 at the effective edge;
を備えることを特徴とする請求項1乃至請求項8いずれか記載のエンジン制御装置。The engine control device according to any one of claims 1 to 8, further comprising:
前記欠歯検出手段は、The missing tooth detection means includes
ソフトウェアを用いて実現され、前記欠歯を検出する第1の欠歯検出手段と、First missing tooth detection means that is implemented using software and detects the missing teeth;
前記算出比と、予め設定された一定の判定比とに基づいて、前記欠歯を検出する第2の欠歯検出手段と、Second missing tooth detecting means for detecting the missing tooth based on the calculated ratio and a predetermined fixed determination ratio;
単位時間当たりの前記クランク軸の回転数が予め指定された指定回転数に達するまでは、前記第1の欠歯検出手段を作動させ、該指定回転数に達したのちは、該第1の欠歯検出手段に代えて、前記第2の欠歯検出手段を作動させる切替手段と、The first missing tooth detecting means is operated until the number of revolutions of the crankshaft per unit time reaches a designated designated number of revolutions, and after reaching the designated number of revolutions, the first missing piece is detected. Switching means for operating the second missing tooth detecting means instead of the tooth detecting means;
を備えることを特徴とする請求項1乃至請求項9いずれか記載のエンジン制御装置。The engine control apparatus according to any one of claims 1 to 9, further comprising:
前記第2の欠歯検出手段は、ハードウェアを用いて実現されていることを特徴とする請求項10記載のエンジン制御装置。The engine control apparatus according to claim 10, wherein the second missing tooth detection unit is realized using hardware.
JP2004312332A 2004-10-27 2004-10-27 Engine control device Expired - Fee Related JP4333552B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004312332A JP4333552B2 (en) 2004-10-27 2004-10-27 Engine control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004312332A JP4333552B2 (en) 2004-10-27 2004-10-27 Engine control device

Publications (2)

Publication Number Publication Date
JP2006125240A JP2006125240A (en) 2006-05-18
JP4333552B2 true JP4333552B2 (en) 2009-09-16

Family

ID=36720230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004312332A Expired - Fee Related JP4333552B2 (en) 2004-10-27 2004-10-27 Engine control device

Country Status (1)

Country Link
JP (1) JP4333552B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4586903B2 (en) 2008-07-22 2010-11-24 株式会社デンソー Engine control device
JP5984508B2 (en) 2012-05-25 2016-09-06 ルネサスエレクトロニクス株式会社 Semiconductor data processing apparatus and engine control apparatus
KR20140121652A (en) * 2013-04-08 2014-10-16 콘티넨탈 오토모티브 시스템 주식회사 Method and apparatus for synchronizating can amd clank of vehicle
US9797747B2 (en) 2013-04-18 2017-10-24 Denso Corporation Rotation detector

Also Published As

Publication number Publication date
JP2006125240A (en) 2006-05-18

Similar Documents

Publication Publication Date Title
JP4258448B2 (en) Reverse rotation detection device for internal combustion engine
JP4586903B2 (en) Engine control device
CN111664013B (en) Engine synchronization system and control method thereof
JP4168907B2 (en) Engine control device
US4788956A (en) Method of detecting abnormality in crank angle signal of internal combustion engines
JP4542569B2 (en) Engine control device
JP4310744B2 (en) Engine control device
JP4333552B2 (en) Engine control device
JP4453839B2 (en) Engine control device
JP3506116B2 (en) Engine control device
JP2003003901A (en) Engine control device
JP2005264862A (en) Engine control device
JP2009235963A (en) Method and device for detecting crank angle of engine
JP2004245162A (en) Internal combustion engine control device and method for processing crank angle signal of internal combustion engine
JP4475704B2 (en) Engine control device
JP4390033B2 (en) Internal combustion engine control device
JP7291238B2 (en) Engine control device and engine control method
JP2003184629A (en) Crank angle determining device for internal combustion engine
JP3883701B2 (en) Misfire detection device for internal combustion engine
JP2007218203A (en) Ignition failure diagnostic device, ignition failure diagnostic system and ignition failure diagnostic method
JPH0672568B2 (en) Rotational position detection device for internal combustion engine control
JP6717185B2 (en) Engine controller
JP6695265B2 (en) Internal combustion engine controller
JP6003869B2 (en) Engine control device
JP2770742B2 (en) Rotational position detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090403

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090615

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 3

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130703

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees