JP5803853B2 - Electronic control unit - Google Patents

Electronic control unit Download PDF

Info

Publication number
JP5803853B2
JP5803853B2 JP2012193247A JP2012193247A JP5803853B2 JP 5803853 B2 JP5803853 B2 JP 5803853B2 JP 2012193247 A JP2012193247 A JP 2012193247A JP 2012193247 A JP2012193247 A JP 2012193247A JP 5803853 B2 JP5803853 B2 JP 5803853B2
Authority
JP
Japan
Prior art keywords
microcomputer
count value
crank counter
crank
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.)
Active
Application number
JP2012193247A
Other languages
Japanese (ja)
Other versions
JP2014047752A (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 JP2012193247A priority Critical patent/JP5803853B2/en
Publication of JP2014047752A publication Critical patent/JP2014047752A/en
Application granted granted Critical
Publication of JP5803853B2 publication Critical patent/JP5803853B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)

Description

本発明は、二つの処理装置を有する電子制御装置に関するものである。   The present invention relates to an electronic control device having two processing devices.

従来、エンジン側に気筒内の圧力を検出する気筒内圧センサ(Cylinder Pressure Sensor、以降、略してCPSとも称する)を設け、CPSの検出結果(CPS信号)をもとに燃料噴射制御や点火時期制御等など(以下、総称してCPS制御と称する)を行う燃料噴射制御装置が知られている(例えば、引用文献1)。   Conventionally, an in-cylinder pressure sensor (Cylinder Pressure Sensor, hereinafter abbreviated as CPS) is provided on the engine side to detect the pressure in the cylinder, and fuel injection control and ignition timing control are performed based on the CPS detection result (CPS signal). And the like (hereinafter collectively referred to as CPS control) are known (for example, cited document 1).

また、特許文献2に開示されたエンジン制御装置のように、二つの処理装置(マイクロコンピュータ、以下マイコンと称する)を有する電子制御装置がある。このエンジン制御装置は、互いに通信可能な複数の二つのマイコンを内蔵したECUを中心として、各種のエンジン制御を行うものである。また、この第1マイコンと第2マイコンには、一つのクランクセンサからのクランク角信号が入力される構成になっている。   Moreover, there is an electronic control device having two processing devices (a microcomputer, hereinafter referred to as a microcomputer), such as an engine control device disclosed in Patent Document 2. This engine control device performs various types of engine control centering on an ECU incorporating a plurality of two microcomputers capable of communicating with each other. Further, the first microcomputer and the second microcomputer are configured to receive a crank angle signal from one crank sensor.

特開2004−100559号公報JP 2004-1000055 A 特開2000−248990号公報JP 2000-248990 A

ところで、CPS制御を実行する際には、クランクカウンタでクランク角信号をカウントし、このカウント値に同期して処理を行うことが考えられる。つまり、カウント値に同期してCPS信号を取得して噴射量・噴射時期・点火時期の演算を行う。そして、この演算後に、カウント値に同期してイグナイタ、インジェクタ等のアクチュエータ駆動を行う。このように、クランクカウンタの精度が非常に重要となってくる。   By the way, when executing the CPS control, it is conceivable that the crank angle signal is counted by a crank counter and the processing is performed in synchronization with the count value. That is, the CPS signal is acquired in synchronization with the count value, and the injection amount, injection timing, and ignition timing are calculated. After this calculation, actuators such as an igniter and an injector are driven in synchronization with the count value. Thus, the accuracy of the crank counter becomes very important.

また、特許文献2のように二つのマイコンを用いて、CPS制御を行うことも考えられる。つまり、二つのマイコンで協調制御することでCPS制御を行う。この場合、例えば、第2マイコンにCPS信号取得から筒内状態量算出までの機能を配置し、第1マイコンに筒内状態量から噴射量・噴射時期・点火時期の演算からアクチュエータ駆動までの機能を配置する。また、第1マイコンと第2マイコンの夫々に設けられたクランクカウンタで、クランク角信号をカウントする。そして、第2マイコンは、自身のクランクカウンタのカウント値に同期してCPS信号を取得すると共に、そのカウント値に同期して筒内状態量を算出し、算出した筒内状態量を第1マイコンに送信する。一方、第1マイコンは、受信した筒内状態量に基づいて、自身のクランクカウンタのカウント値に同期して演算、アクチュエータ駆動を行う。   Further, it is conceivable to perform CPS control using two microcomputers as in Patent Document 2. In other words, CPS control is performed by cooperative control using two microcomputers. In this case, for example, a function from CPS signal acquisition to in-cylinder state quantity calculation is arranged in the second microcomputer, and a function from in-cylinder state quantity to calculation of injection amount / injection timing / ignition timing to actuator drive is arranged in the first microcomputer. Place. The crank angle signal is counted by a crank counter provided in each of the first microcomputer and the second microcomputer. The second microcomputer acquires the CPS signal in synchronization with the count value of its own crank counter, calculates the in-cylinder state quantity in synchronization with the count value, and uses the calculated in-cylinder state quantity as the first microcomputer. Send to. On the other hand, the first microcomputer performs calculation and actuator driving in synchronization with the count value of its own crank counter based on the received in-cylinder state quantity.

しかしながら、第1マイコンと第2マイコンのいずれか一方で、クランクカウンタが意図したタイミングでカウントアップできなかったり、クランクカウンタが意図しないタイミングでカウントアップしたりすることがある。このような場合、第1マイコンでのカウント値と第2マイコンでのカウント値にズレ(カウントズレ)が発生することもありうる。よって、カウント値に同期してCPS制御を行う場合、カウントズレが発生すると、適切に制御を行うことができない可能性がある。   However, either the first microcomputer or the second microcomputer may not be able to count up at the timing that the crank counter is intended, or may be counted up at the timing that the crank counter is not intended. In such a case, a deviation (count deviation) may occur between the count value in the first microcomputer and the count value in the second microcomputer. Therefore, when CPS control is performed in synchronization with the count value, there is a possibility that control cannot be performed appropriately if a count shift occurs.

従って、カウントズレが発生した場合は、カウントズレを補正(修正)する必要がある。なお、クランクカウンタのカウント値を補正する技術としては、クランクセンサの特異な入力信号により、クランクカウンタを補正する技術(例えば、クランク信号欠歯判定技術)が知られている。しかしながら、クランク信号欠歯判定の場合、欠歯部の数にもよるが、カウントズレが発生していたとしても、通常360°CA(Crank Angle)毎にしかカウントズレを検出しない。   Therefore, when a count shift occurs, it is necessary to correct (correct) the count shift. As a technique for correcting the count value of the crank counter, a technique (for example, a crank signal missing tooth determination technique) for correcting the crank counter with a unique input signal of the crank sensor is known. However, in the case of crank signal missing tooth determination, although it depends on the number of missing teeth, even if a count deviation occurs, the count deviation is usually detected only every 360 ° CA (Crank Angle).

本発明は、上記問題点に鑑みなされたものであり、二つの処理装置間でのカウントズレを、360°CAよりも細かい間隔で検出することができる電子制御装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to provide an electronic control device capable of detecting a count shift between two processing devices at an interval finer than 360 ° CA. .

上記目的を達成するために本発明は、協調制御を行う第1処理装置(10)と第2処理装置(40)とを備え、クランクセンサ(220)からクランクシャフトの回転に応じたクランク角信号が入力される電子制御装置であって、
第2処理装置は、
第1処理装置と通信を行う第2通信手段(S34,S305)と、
クランクセンサから出力されたクランク角信号をカウントする第2クランクカウンタ(61,S25,S303)と、
第2クランクカウンタのカウント値に同期して処理を実行するものであり、第1処理装置が実行する処理に必要な処理用信号を生成し、第2通信手段にて処理用信号を送信する第2処理部(50)と、を含み、
第1処理装置は、
第2処理装置と通信を行う第1通信手段(S54,S310)と、
クランクセンサから出力されたクランク角信号をカウントする第1クランクカウンタ(31,S53,S309)と、
第1クランクカウンタのカウント値に同期して処理を実行するものであり、第1通信手段を介して取得した処理用信号に基づいて処理を実行する第1処理部(20)と、を含み、
第1通信手段は、予め設定された360°CA間隔よりも短い間隔で第1クランクカウンタのカウント値を送信するものであり、
第2処理装置は、予め設定された360°CA間隔よりも短い間隔で、第2クランクカウンタのカウント値と、第2通信手段にて取得した第1クランクカウンタのカウント値とを比較することで、第2クランクカウンタのカウント値と第1クランクカウンタのカウント値とにズレが発生しているか否かを監視する監視手段(S304)と、を備えていることを特徴とする。
In order to achieve the above object, the present invention includes a first processing device (10) and a second processing device (40) that perform cooperative control, and a crank angle signal corresponding to rotation of a crankshaft from a crank sensor (220). Is an electronic control device to which
The second processor is
Second communication means (S34, S305) for communicating with the first processing device;
A second crank counter (61, S25, S303) for counting a crank angle signal output from the crank sensor;
The processing is executed in synchronization with the count value of the second crank counter, a processing signal necessary for processing executed by the first processing device is generated, and the processing signal is transmitted by the second communication means. 2 processing units (50),
The first processing device
First communication means (S54, S310) for communicating with the second processing device;
A first crank counter (31, S53, S309) for counting a crank angle signal output from the crank sensor;
A first processing unit (20) that performs processing in synchronization with the count value of the first crank counter, and that performs processing based on the processing signal acquired via the first communication means,
The first communication means transmits the count value of the first crank counter at an interval shorter than a preset 360 ° CA interval,
The second processing device compares the count value of the second crank counter with the count value of the first crank counter acquired by the second communication means at an interval shorter than a preset 360 ° CA interval. And monitoring means (S304) for monitoring whether or not a deviation occurs between the count value of the second crank counter and the count value of the first crank counter.

このように、第1処理装置は、予め設定された360°CA間隔よりも短い間隔で第1クランクカウンタのカウント値を送信する(第1通信手段)。一方、監視手段(第2処理装置)は、第2クランクカウンタのカウント値と、第2通信手段を介して取得した第1クランクカウンタのカウント値とを比較することで、第1クランクカウンタのカウント値と第2クランクカウンタのカウント値とにズレ(カウントズレ)が発生しているか否かを監視する。つまり、本発明は、第2通信手段を介して取得した第1クランクカウンタのカウント値を用いて、カウントズレが発生しているか否かを監視するので、従来技術のように欠歯部の個数に関係なく、360°CA間隔よりも短い間隔(細かい間隔)で監視することができる。   Thus, the first processing device transmits the count value of the first crank counter at an interval shorter than the preset 360 ° CA interval (first communication means). On the other hand, the monitoring means (second processing device) compares the count value of the first crank counter by comparing the count value of the second crank counter with the count value of the first crank counter acquired through the second communication means. It is monitored whether or not a deviation (count deviation) occurs between the value and the count value of the second crank counter. That is, according to the present invention, since the count value of the first crank counter acquired through the second communication means is used to monitor whether or not the count deviation has occurred, the number of missing teeth as in the prior art Regardless of the interval, it is possible to monitor at an interval (fine interval) shorter than the 360 ° CA interval.

ECUの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of ECU. ECUにおけるCPS制御の処理タイミング例(4気筒の場合)を示す図面である。It is drawing which shows the process timing example (in the case of 4 cylinders) of CPS control in ECU. ECUにおける全体の処理動作を示すフローチャートである。It is a flowchart which shows the whole processing operation in ECU. ECUにおける各マイコンの処理動作を説明する説明図であり、ズレが発生していない正常時の図面である。It is explanatory drawing explaining the processing operation of each microcomputer in ECU, and is drawing at the time of the normal with no deviation | shift. 第2マイコンの受信トリガ処理を示すフローチャートである。It is a flowchart which shows the reception trigger process of a 2nd microcomputer. 第2マイコンの30CA処理を示すフローチャートである。It is a flowchart which shows the 30CA process of a 2nd microcomputer. 第2マイコンのメモリ配列比較処理を示すフローチャートである。It is a flowchart which shows the memory arrangement | sequence comparison process of a 2nd microcomputer. 第1マイコンの受信トリガ処理を示すフローチャートである。It is a flowchart which shows the reception trigger process of a 1st microcomputer. 第1マイコンの30CA処理を示すフローチャートである。It is a flowchart which shows the 30CA process of a 1st microcomputer. ECUにおける各マイコンの処理動作を説明する説明図であり、第1マイコンでの処理抜けによるズレ発生時の図面である。It is explanatory drawing explaining the processing operation of each microcomputer in ECU, and is drawing at the time of the shift | offset | difference by the process omission in a 1st microcomputer. ECUにおける各マイコンの処理動作を説明する説明図であり、第1マイコンでのノイズ発生時の図面である。It is explanatory drawing explaining the processing operation of each microcomputer in ECU, and is drawing at the time of the noise generation in a 1st microcomputer. ECUにおける各マイコンの処理動作を説明する説明図であり、第2マイコンでのノイズ発生時の図面である。It is explanatory drawing explaining the processing operation of each microcomputer in ECU, and is drawing at the time of the noise generation in a 2nd microcomputer.

以下、本発明の実施形態を図に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

まず、図1に基づいて、ECU100(electronic control unit:電子制御装置)の構成に関して説明する。ECU100は、車両に搭載されるものであり、主に、第1マイコン(第1処理装置)10と第2マイコン(第2処理装置)40とを備えて構成されている。本実施形態では、一例として、4気筒エンジン(内燃機関)の制御を行うパワートレイン制御ECUに適用したECU100を採用する。   First, the configuration of an ECU 100 (electronic control unit) will be described with reference to FIG. The ECU 100 is mounted on a vehicle and mainly includes a first microcomputer (first processing device) 10 and a second microcomputer (second processing device) 40. In this embodiment, as an example, an ECU 100 applied to a powertrain control ECU that controls a four-cylinder engine (internal combustion engine) is employed.

ECU100は、内燃機関の各気筒における圧力を検出して、CPS信号(検出信号)を出力する気筒内圧センサ210や、クランクシャフトの回転に応じたクランク角信号を出力するクランクセンサ220などが接続されている。よって、ECU100は、CPS信号やクランク角信号などが入力される。また、ECU100は、イグナイタ310、インジェクタ320、異常警告部330などへ制御信号を出力するものである。なお、気筒内圧センサ210、クランクセンサ220、イグナイタ310、インジェクタ320、異常警告部330に関しては、周知技術であるため詳しい説明は省略する。   ECU 100 is connected to an in-cylinder pressure sensor 210 that detects a pressure in each cylinder of the internal combustion engine and outputs a CPS signal (detection signal), a crank sensor 220 that outputs a crank angle signal corresponding to the rotation of the crankshaft, and the like. ing. Therefore, the ECU 100 receives a CPS signal, a crank angle signal, and the like. The ECU 100 outputs a control signal to the igniter 310, the injector 320, the abnormality warning unit 330, and the like. Note that the cylinder internal pressure sensor 210, the crank sensor 220, the igniter 310, the injector 320, and the abnormality warning unit 330 are well-known techniques, and thus detailed description thereof is omitted.

第1マイコン10は、主に、処理部(第1処理部)20とメモリ空間30とを備えて構成されている。   The first microcomputer 10 mainly includes a processing unit (first processing unit) 20 and a memory space 30.

処理部20は、後ほど説明するクランクカウンタ(第1クランクカウンタ)31のカウント値に同期して処理を実行するものであり、第2マイコン40から受信した情報(筒内状態量など)を基に各種処理(例えば内燃機関の制御などの各種制御)を行う。本実施形態においては、一例として、イグナイタ310に制御信号を出力することで点火時期制御を行う点火制御部21、インジェクタ320に制御信号を出力することで燃料噴射制御を行う噴射制御部22、失火検出を行う失火検出部23を備えた処理部20を採用している。つまり、第1マイコン10は、CPS制御を行うものである。なお、CPS制御として失火検出を含むようにしてもよい。   The processing unit 20 executes processing in synchronization with a count value of a crank counter (first crank counter) 31 described later, and is based on information (in-cylinder state quantity and the like) received from the second microcomputer 40. Various processes (for example, various controls such as control of an internal combustion engine) are performed. In the present embodiment, as an example, an ignition control unit 21 that performs ignition timing control by outputting a control signal to the igniter 310, an injection control unit 22 that performs fuel injection control by outputting a control signal to the injector 320, and misfire A processing unit 20 including a misfire detection unit 23 that performs detection is employed. That is, the first microcomputer 10 performs CPS control. Note that misfire detection may be included as CPS control.

より詳細には、処理部20は、後ほど説明するクランクカウンタ31に同期して各種処理を実施する。点火制御部21は、クランクカウンタ31に同期して、第2マイコン40から筒内状態量を取得し、取得した筒内状態量を基に点火補正演算を行う(点火制御)。そして、点火制御部21は、点火補正演算後に、クランクカウンタ31に同期して、イグナイタ310に制御信号を出力することでイグナイタ310を駆動する(点火時期制御)。   More specifically, the processing unit 20 performs various processes in synchronization with a crank counter 31 described later. The ignition control unit 21 acquires the in-cylinder state quantity from the second microcomputer 40 in synchronization with the crank counter 31 and performs an ignition correction calculation based on the acquired in-cylinder state quantity (ignition control). Then, after the ignition correction calculation, the ignition control unit 21 drives the igniter 310 by outputting a control signal to the igniter 310 in synchronization with the crank counter 31 (ignition timing control).

また、噴射制御部22は、クランクカウンタ31に同期して、第2マイコン40から筒内状態量を取得し、取得した筒内状態量を基に噴射補正演算を行う(噴射制御)。そして、噴射制御部22は、噴射補正演算後に、クランクカウンタ31に同期して、インジェクタ320に制御信号を出力することでインジェクタ320を駆動する(燃料噴射制御)。   Further, the injection control unit 22 acquires an in-cylinder state quantity from the second microcomputer 40 in synchronization with the crank counter 31 and performs an injection correction calculation based on the acquired in-cylinder state quantity (injection control). Then, after the injection correction calculation, the injection control unit 22 drives the injector 320 by outputting a control signal to the injector 320 in synchronization with the crank counter 31 (fuel injection control).

また、失火検出部23は、クランクカウンタ31に同期して、第2マイコン40から筒内状態量を取得し、取得した筒内状態量を基に失火検出を行う。そして、失火検出部23は、異常(失火)を検出した場合、異常警報部330に制御信号を出力することで、異常警報部330に異常警報を発生させる。   In addition, the misfire detection unit 23 acquires the in-cylinder state quantity from the second microcomputer 40 in synchronization with the crank counter 31, and performs misfire detection based on the acquired in-cylinder state quantity. When the misfire detection unit 23 detects an abnormality (misfire), it outputs a control signal to the abnormality alarm unit 330 to cause the abnormality alarm unit 330 to generate an abnormality alarm.

なお、クランクカウンタ31に同期とは、クランクカウンタ31のカウントアップに同期や、クランクカウンタ31のカウント値のインクリメントに同期や、クランク角に同期と言い換えることもできる。クランクカウンタ61の場合も同様である。   Synchronizing with the crank counter 31 can also be referred to as synchronizing with counting up the crank counter 31, synchronizing with incrementing the count value of the crank counter 31, or synchronizing with crank angle. The same applies to the crank counter 61.

また、メモリ空間30には、クランクカウンタ31、クランクカウンタ補正値メモリ(以下、補正値メモリとも称する)32、通信異常メモリ33、ズレ発生メモリ(第1ズレ記憶手段)34が設けられている。   The memory space 30 is provided with a crank counter 31, a crank counter correction value memory (hereinafter also referred to as a correction value memory) 32, a communication abnormality memory 33, and a deviation occurrence memory (first deviation storage means) 34.

クランクカウンタ31は、車両のエンジンの回転に伴うクランク角度に対応してカウントアップされるものである。このクランクカウンタ31は、クランクセンサ220からの信号(入力信号、クランク角信号、クランクセンサ入力信号と言い換えることもできる)が入力される毎に、カウント値をインクリメントするものである。言い換えると、第1マイコン10は、クランクセンサ220からの入力信号をカウントして、そのカウント値を記憶(格納とも称する)している。本実施形態では、一例として、クランクセンサ220からの信号に基づいて(つまり、クランク角が30°CA増大する毎)に、「0→1→2→・・→22→23→0」とカウント値をインクリメントするクランクカウンタ31を採用している。よって、例えば、カウント値「0」は0°CA、カウント値「1」は30°CAを示すものである。   The crank counter 31 is counted up according to the crank angle accompanying the rotation of the vehicle engine. The crank counter 31 increments the count value every time a signal from the crank sensor 220 (in other words, an input signal, a crank angle signal, or a crank sensor input signal) is input. In other words, the first microcomputer 10 counts the input signal from the crank sensor 220 and stores the count value (also referred to as storage). In the present embodiment, as an example, based on a signal from the crank sensor 220 (that is, every time the crank angle increases by 30 ° CA), “0 → 1 → 2 →. → 22 → 23 → 0” is counted. A crank counter 31 that increments the value is employed. Therefore, for example, the count value “0” indicates 0 ° CA, and the count value “1” indicates 30 ° CA.

補正値メモリ32は、第2マイコン40から送信されたクランクカウンタ61のカウント値を格納するものである。この第2マイコン40から送信されたカウント値は、第1マイコン10のクランクカウンタ31のカウント値を補正するためのものであるため、補正値とも言い換えることができる。補正値メモリ32は、例えば、メモリ空間30(メモリ)に設けられた複数の記憶領域の一つを採用することができる。   The correction value memory 32 stores the count value of the crank counter 61 transmitted from the second microcomputer 40. Since the count value transmitted from the second microcomputer 40 is for correcting the count value of the crank counter 31 of the first microcomputer 10, it can also be referred to as a correction value. As the correction value memory 32, for example, one of a plurality of storage areas provided in the memory space 30 (memory) can be adopted.

通信異常メモリ33は、第2マイコン40から受信したキーワード「AA」を格納するものである。このキーワード「AA」は、第1マイコン10と第2マイコン40との間における通信に異常が生じていることを示すものである。よって、キーワード「AA」は、通信異常のキーワード、又は、異常通知のキーワードと言い換えることもできる。この異常通知のキーワードとしては、一例として、本実施形態で採用している「AA」などの特異な値を採用することができる。しかしながら、本発明はこれに限定されるものではない。なお、通信異常メモリ33は、例えば、メモリ空間30(メモリ)に設けられた複数の記憶領域の一つを採用することができる。   The communication abnormality memory 33 stores the keyword “AA” received from the second microcomputer 40. This keyword “AA” indicates that an abnormality has occurred in communication between the first microcomputer 10 and the second microcomputer 40. Therefore, the keyword “AA” can be rephrased as a communication abnormality keyword or abnormality notification keyword. As an example of the abnormality notification keyword, a unique value such as “AA” employed in the present embodiment can be employed as an example. However, the present invention is not limited to this. Note that the communication abnormality memory 33 can employ, for example, one of a plurality of storage areas provided in the memory space 30 (memory).

ズレ発生メモリ34は、ズレ発生を示す値(ズレが発生したこと)を格納するものである。このズレ発生を示す値とは、カウントズレが発生したことを示す値である。ズレ発生メモリ34は、例えば、メモリ空間30(メモリ)に設けられた複数の記憶領域の一つを採用することができる。なお、カウントズレが発生したことを、単にズレ発生とも称する。   The deviation occurrence memory 34 stores a value indicating the occurrence of deviation (the occurrence of deviation). The value indicating the occurrence of deviation is a value indicating that a count deviation has occurred. For example, one of a plurality of storage areas provided in the memory space 30 (memory) can be adopted as the deviation generation memory 34. Note that occurrence of a count deviation is also simply referred to as a deviation.

第2マイコン40は、主に、処理部(第2処理部)50とメモリ空間60とを備えて構成されている。処理部50は、後ほど説明するクランクカウンタ(第2クランクカウンタ)61に同期して処理を実行するものであり、第1マイコン10が実行する処理に必要な処理用信号を生成し、この処理用信号を送信する。本実施形態においては、一例として、気筒内圧センサ210よりCPS信号を取り込み、このCPS信号を基に筒内状態量(処理用信号)を算出する筒内状態量算出部51、気筒内圧センサ210の異常判定を実施するセンサ異常判定部52を備えた処理部50を採用している。ただし、処理部50は、これに限定されるものではない。なお、上述のように、燃料噴射制御や点火時期制御は、筒内状態量を元に実行されるものである。よって、CPS制御の実行に必要な筒内状態量を算出する第2マイコンは、CPS制御を行うものということができる。   The second microcomputer 40 mainly includes a processing unit (second processing unit) 50 and a memory space 60. The processing unit 50 executes processing in synchronization with a crank counter (second crank counter) 61 described later, generates a processing signal necessary for processing executed by the first microcomputer 10, and performs processing for this processing. Send a signal. In the present embodiment, as an example, an in-cylinder state quantity calculation unit 51 that takes in a CPS signal from the in-cylinder pressure sensor 210 and calculates an in-cylinder state quantity (processing signal) based on the CPS signal. A processing unit 50 including a sensor abnormality determination unit 52 that performs abnormality determination is employed. However, the processing unit 50 is not limited to this. As described above, fuel injection control and ignition timing control are executed based on the in-cylinder state quantity. Therefore, it can be said that the second microcomputer that calculates the in-cylinder state quantity necessary for executing the CPS control performs the CPS control.

より詳細には、処理部50は、後ほど説明するクランクカウンタ61に同期して、気筒毎に設けられた気筒内圧センサ210からCPS信号(各気筒のCPS信号)を取り込む。そして、処理部50(筒内状態量算出部51)は、クランクカウンタ31に同期して、筒内状態量を算出する。更に、処理部50は、クランクカウンタ31に同期して、筒内状態量を第1マイコン10に送信する。また、処理部50(センサ異常判定部52)は、クランクカウンタ31に同期して、気筒内圧センサ210の異常判定を実施する。そして、処理部50は、クランクカウンタ31に同期して、異常判定結果を第1マイコン10に送信する。このように、第2マイコン40は、第1マイコン10と同様に、クランクカウンタ61のカウント値に従って各種処理を実施する。   More specifically, the processing unit 50 takes in a CPS signal (CPS signal of each cylinder) from a cylinder internal pressure sensor 210 provided for each cylinder in synchronization with a crank counter 61 described later. Then, the processing unit 50 (in-cylinder state amount calculation unit 51) calculates the in-cylinder state amount in synchronization with the crank counter 31. Further, the processing unit 50 transmits the in-cylinder state quantity to the first microcomputer 10 in synchronization with the crank counter 31. In addition, the processing unit 50 (sensor abnormality determination unit 52) performs abnormality determination of the cylinder pressure sensor 210 in synchronization with the crank counter 31. Then, the processing unit 50 transmits an abnormality determination result to the first microcomputer 10 in synchronization with the crank counter 31. As described above, the second microcomputer 40 performs various processes according to the count value of the crank counter 61 in the same manner as the first microcomputer 10.

さらに、処理部50は、予め設定された360°CA間隔よりも短い間隔で、クランクカウンタ61のカウント値と、クランクカウンタ31のカウント値とを比較することで、カウントズレが発生しているか否かを監視する(監視手段)。なお、本実施形態では一例として、TDC毎にカウントズレを監視する例を採用している。つまり、本実施形態においては、予め設定された360°CA間隔よりも短い間隔として、TDC間隔を採用している。また、TDCは、top dead centre(上死点)を示すものである。このカウントズレの監視に関しては、後ほど詳しく説明する。   Further, the processing unit 50 compares the count value of the crank counter 61 with the count value of the crank counter 31 at an interval shorter than a preset 360 ° CA interval to determine whether or not a count deviation has occurred. Is monitored (monitoring means). In the present embodiment, as an example, an example in which the count shift is monitored for each TDC is employed. That is, in this embodiment, the TDC interval is adopted as an interval shorter than the preset 360 ° CA interval. TDC indicates a top dead center. The monitoring of the count shift will be described in detail later.

また、メモリ空間60には、クランクカウンタ61、クランクカウンタ受信値メモリ(以下、受信値メモリとも称する)62、第1メモリ配列(第1記憶手段)63、第2メモリ配列(第2記憶手段)64、通信異常メモリ65、ズレ発生メモリ(第2ズレ記憶手段)66が設けられている。なお、クランクカウンタ61は、上述のクランクカウンタ31と同様であるため詳しい説明は省略する。   The memory space 60 includes a crank counter 61, a crank counter received value memory (hereinafter also referred to as a received value memory) 62, a first memory array (first storage means) 63, and a second memory array (second storage means). 64, a communication abnormality memory 65, and a deviation occurrence memory (second deviation storage means) 66 are provided. Since the crank counter 61 is the same as the crank counter 31 described above, detailed description thereof is omitted.

受信値メモリ62は、第1マイコン10から送信されたクランクカウンタ31のカウント値を格納するものである。受信値メモリ62に格納されるカウント値は、第2マイコン40が受信したカウント値であるため、受信値とも言い換えることができる。受信値メモリ62は、例えば、メモリ空間60(メモリ)に設けられた複数の記憶領域の一つを採用することができる。   The reception value memory 62 stores the count value of the crank counter 31 transmitted from the first microcomputer 10. Since the count value stored in the reception value memory 62 is the count value received by the second microcomputer 40, it can also be referred to as a reception value. The reception value memory 62 can employ, for example, one of a plurality of storage areas provided in the memory space 60 (memory).

第1メモリ配列63は、第1マイコン10から異なる複数のタイミング(ここでは、一例として三回を採用している)で送信された、クランクカウンタ31のカウント値を格納するものである。このため、この第1メモリ配列63は、第1要素631、第2要素632、第3要素633を含むものである。この第1要素631、第2要素632、第3要素633の夫々には、第1マイコン10から送信され、一旦受信値メモリ62に格納された受信値が格納される。より詳細には、第1要素631には、受信値メモリ62に一旦格納された受信値が格納される。第2要素632には、受信値メモリ62及び第1要素631の夫々に一旦格納された受信値が格納される。第3要素633には、受信値メモリ62、第1要素631及び第2要素632の夫々に一旦格納された受信値が格納される。なお、第1要素631、第2要素632、第3要素633の夫々に格納されている受信値を単に「値」とも称する。   The first memory array 63 stores count values of the crank counter 31 transmitted from the first microcomputer 10 at a plurality of different timings (here, three times are adopted as an example). For this reason, the first memory array 63 includes a first element 631, a second element 632, and a third element 633. In each of the first element 631, the second element 632, and the third element 633, the reception value transmitted from the first microcomputer 10 and temporarily stored in the reception value memory 62 is stored. More specifically, the received value once stored in the received value memory 62 is stored in the first element 631. The second element 632 stores the reception value temporarily stored in each of the reception value memory 62 and the first element 631. In the third element 633, the reception value temporarily stored in each of the reception value memory 62, the first element 631, and the second element 632 is stored. The received values stored in the first element 631, the second element 632, and the third element 633 are also simply referred to as “values”.

第2メモリ配列64は、異なる複数のタイミング(ここでは、一例として三回を採用している)におけるクランクカウンタ61のカウント値を格納するものである。このため、この第2メモリ配列64は、第1要素641、第2要素642、第3要素643を含むものである。この第1要素641には、クランクカウンタ61のカウント値が格納される。また、第2要素642には、第1要素641に一旦格納されたカウント値が格納される。そして、第3要素643には、第1要素641及び第2要素642の夫々に一旦格納されたカウント値が格納される。なお、第1要素641、第2要素642、第3要素643の夫々に格納されている受信値を単に「値」とも称する。   The second memory array 64 stores count values of the crank counter 61 at a plurality of different timings (here, three times are adopted as an example). Therefore, the second memory array 64 includes a first element 641, a second element 642, and a third element 643. In the first element 641, the count value of the crank counter 61 is stored. The second element 642 stores the count value once stored in the first element 641. The third element 643 stores the count value temporarily stored in each of the first element 641 and the second element 642. The received values stored in the first element 641, the second element 642, and the third element 643 are also simply referred to as “values”.

なお、ECU100が正常に動作している場合、第1要素631と第1要素641には、同じ値が格納されることになる。同様に、第2要素632と第2要素642には、同じ値が格納されることになる。また、第3要素633と第3要素643には、同じ値が格納されることになる。   Note that when the ECU 100 is operating normally, the same value is stored in the first element 631 and the first element 641. Similarly, the same value is stored in the second element 632 and the second element 642. Further, the same value is stored in the third element 633 and the third element 643.

なお、ECU100が正常に動作している場合とは、クランクカウンタ31,61が正常にインクリメントしている状態である。例えば、第1マイコン10に処理抜けが発生した場合、クランクカウンタ31は、正常にインクリメントできない。また、第1マイコン10にノイズが発生した場合、クランクカウンタ31は、正常にインクリメントできない。同様に、第2マイコン40にノイズが発生した場合、クランクカウンタ61は、正常にインクリメントできない。なお、ECU100が正常に動作している場合とは、カウントズレが生じていない状態とも言い換えることができる。   The case where the ECU 100 is operating normally is a state where the crank counters 31 and 61 are normally incremented. For example, when a process omission occurs in the first microcomputer 10, the crank counter 31 cannot normally increment. In addition, when noise occurs in the first microcomputer 10, the crank counter 31 cannot normally increment. Similarly, when noise occurs in the second microcomputer 40, the crank counter 61 cannot normally increment. In addition, it can be paraphrased that the case where ECU100 is operate | moving normally is the state where the count shift has not arisen.

この第1要素631、第2要素632、第3要素633の夫々は、例えば、メモリ空間30(メモリ)に設けられた複数の記憶領域の一つを採用することができる。同様に、第1要素641、第2要素642、第3要素643の夫々は、例えば、メモリ空間30(メモリ)に設けられた複数の記憶領域の一つを採用することができる。   For example, each of the first element 631, the second element 632, and the third element 633 may employ one of a plurality of storage areas provided in the memory space 30 (memory). Similarly, each of the first element 641, the second element 642, and the third element 643 can employ, for example, one of a plurality of storage areas provided in the memory space 30 (memory).

通信異常メモリ65は、上述のキーワード「AA」を格納するものである。つまり、第2マイコン40は、通信異常メモリ33にキーワード「AA」を格納するとともに、このキーワード「AA」を第1マイコン10に送信する。通信異常メモリ65は、例えば、メモリ空間60(メモリ)に設けられた複数の記憶領域の一つを採用することができる。   The communication abnormality memory 65 stores the above-described keyword “AA”. That is, the second microcomputer 40 stores the keyword “AA” in the communication abnormality memory 33 and transmits the keyword “AA” to the first microcomputer 10. As the communication abnormality memory 65, for example, one of a plurality of storage areas provided in the memory space 60 (memory) can be adopted.

ズレ発生メモリ66は、上述のズレ発生を示す値(ズレが発生したこと)を格納するものである。ズレ発生メモリ66は、例えば、メモリ空間30(メモリ)に設けられた複数の記憶領域の一つを採用することができる。   The deviation occurrence memory 66 stores a value indicating that the deviation has occurred (that a deviation has occurred). For example, one of a plurality of storage areas provided in the memory space 30 (memory) can be adopted as the deviation generation memory 66.

この第1マイコン10と第2マイコン40とは、通信(データの送受信)が可能に構成されている。本実施形態においては、一例として、第1マイコン10と第2マイコン40との通信にクランク角度同期DMA通信を採用している。このクランク角度同期DMA通信は、クランク角に同期したDMA通信であり、例えば30°CA毎や180°CA毎の角度タイミングで行なわれるものである。つまり、第1マイコン10は、クランクカウンタ31のカウント値に同期して通信を行なう(第1通信手段)。同様に、第2マイコン40は、クランクカウンタ61のカウント値に同期して通信を行う(第2通信手段)。   The first microcomputer 10 and the second microcomputer 40 are configured to be capable of communication (data transmission / reception). In the present embodiment, as an example, crank angle synchronous DMA communication is employed for communication between the first microcomputer 10 and the second microcomputer 40. This crank angle synchronous DMA communication is a DMA communication synchronized with the crank angle, and is performed at an angular timing of every 30 ° CA or 180 ° CA, for example. That is, the first microcomputer 10 communicates in synchronization with the count value of the crank counter 31 (first communication means). Similarly, the second microcomputer 40 communicates in synchronization with the count value of the crank counter 61 (second communication means).

上述のように点火時期制御や燃料噴射制御は、クランク角に同期して行っている。つまり、噴射タイミングや点火タイミングは、クランク角に同期している。よって、このように、第1マイコン10と第2マイコン40がクランク角に同期して通信することによって、点火時期制御や燃料噴射制御に応じた補正を行うことが可能となる。   As described above, the ignition timing control and the fuel injection control are performed in synchronization with the crank angle. That is, the injection timing and the ignition timing are synchronized with the crank angle. Therefore, as described above, the first microcomputer 10 and the second microcomputer 40 communicate in synchronization with the crank angle, so that correction according to ignition timing control or fuel injection control can be performed.

図1における符号101は、第1マイコン10がマスタとなるクランク角度同期DMA通信(第1通信とも称する)である。第1マイコン10は、クランクカウンタ31のカウント値をクランク角度同期DMA通信101で第2マイコン40へ送信する(第1通信手段)。第1マイコン10は、予め設定された360°CA間隔よりも短い間隔(ここでは30°CA毎)に、クランクカウンタ31のカウント値を送信する。このように、第1マイコン10がクランクカウンタ31のカウント値を、第2マイコン40に対して送信するのは、カウントズレが発生しているか否かを監視するためである。これは、本発明の技術的特徴の一部である。   Reference numeral 101 in FIG. 1 denotes crank angle synchronous DMA communication (also referred to as first communication) in which the first microcomputer 10 serves as a master. The first microcomputer 10 transmits the count value of the crank counter 31 to the second microcomputer 40 by the crank angle synchronization DMA communication 101 (first communication means). The first microcomputer 10 transmits the count value of the crank counter 31 at intervals shorter than a preset 360 ° CA interval (here, every 30 ° CA). Thus, the reason why the first microcomputer 10 transmits the count value of the crank counter 31 to the second microcomputer 40 is to monitor whether a count shift has occurred. This is part of the technical features of the present invention.

また、図1における符号102は、第2マイコン40がマスタとなるクランク角度同期DMA通信(第2通信とも称する)である。第2マイコン40は、自身が算出した筒内状態量や異常判定結果などをクランク角度同期DMA通信102で第1マイコン10へ送信する。カウントズレが発生していた場合には、第2マイコン40がクランクカウンタ61のカウント値を、第1マイコン10に対して送信する。なお、DMAはDirect Memory Accessである。   1 is crank angle synchronous DMA communication (also referred to as second communication) in which the second microcomputer 40 serves as a master. The second microcomputer 40 transmits the in-cylinder state amount and the abnormality determination result calculated by itself to the first microcomputer 10 through the crank angle synchronization DMA communication 102. If the count shift has occurred, the second microcomputer 40 transmits the count value of the crank counter 61 to the first microcomputer 10. DMA is Direct Memory Access.

なお、本実施形態においては、第1マイコン10と第2マイコン40との通信の一例として、DMA通信を採用している。しかしながら、本発明はこれに限定されるものではない。第1マイコン10と第2マイコン40との通信は、クランク角に同期したシリアル通信であれば採用することができる。例えば、ECU100の内部CAN通信やUART通信を採用することができる。なお、CANはController Area Networkである。一方、UARTは、Universal Asynchronous Receiver Transmitterである。   In the present embodiment, DMA communication is employed as an example of communication between the first microcomputer 10 and the second microcomputer 40. However, the present invention is not limited to this. The communication between the first microcomputer 10 and the second microcomputer 40 can be adopted as long as it is serial communication synchronized with the crank angle. For example, internal CAN communication or UART communication of the ECU 100 can be employed. Note that CAN is a controller area network. On the other hand, UART is a Universal Asynchronous Receiver Transmitter.

このように、ECU100は、第1マイコン10と第2マイコン40とが通信するものであり、自身で行う処理(搭載された機能)が第1マイコン10と第2マイコン40とに分散されている。言い換えると、ECU100は、第1マイコン10と第2マイコン40とが通信することで、CPS制御を第1マイコン10と第2マイコン40とで協調制御するものである。つまり、ECU100は、CPS制御を2マイコン10,40で協調制御させる為に、第1マイコン10と第2マイコン40とが通信するとともに、第2マイコン40がCPS信号の取得から筒内状態量の算出までを行い、第1マイコン10が点火制御、噴射制御などを行う。また、第1マイコン10と第2マイコン40とは、CPS信号に基づいて、内燃機関を協調制御すると言い換えることができる。   As described above, the ECU 100 communicates between the first microcomputer 10 and the second microcomputer 40, and the processing (equipped function) performed by itself is distributed between the first microcomputer 10 and the second microcomputer 40. . In other words, the ECU 100 controls the CPS control cooperatively between the first microcomputer 10 and the second microcomputer 40 when the first microcomputer 10 and the second microcomputer 40 communicate with each other. That is, the ECU 100 communicates between the first microcomputer 10 and the second microcomputer 40 in order to control the CPS control by the two microcomputers 10 and 40, and the second microcomputer 40 determines the in-cylinder state quantity from the acquisition of the CPS signal. The calculation is performed until the first microcomputer 10 performs ignition control, injection control, and the like. In other words, the first microcomputer 10 and the second microcomputer 40 can be paraphrased as cooperative control of the internal combustion engine based on the CPS signal.

なお、上述のように、第2マイコン40は、主に、CPS信号の取得から筒内状態量の算出までを行う。一方、上述のように、第1マイコン10は、主に点火制御、噴射制御などを行う。言い換えると、第1マイコン10は、ECU100の主機能が設けられている。よって、第1マイコン10の処理負荷は、第2マイコン40の処理負荷よりも高くなる。このように、第2マイコン40は、第1マイコン10よりも協調制御(CPS制御)における処理負荷が軽くなるように設定されている。よって、カウントズレの監視は、協調制御における処理負荷が軽い第2マイコン40に行わせると好ましい。このようにすることによって、第1マイコン10の処理負荷と、第2マイコン40の処理負荷とを近づけることができる(均等化することができる)。   As described above, the second microcomputer 40 mainly performs from the acquisition of the CPS signal to the calculation of the in-cylinder state quantity. On the other hand, as described above, the first microcomputer 10 mainly performs ignition control, injection control, and the like. In other words, the first microcomputer 10 is provided with the main function of the ECU 100. Therefore, the processing load on the first microcomputer 10 is higher than the processing load on the second microcomputer 40. Thus, the second microcomputer 40 is set so that the processing load in the cooperative control (CPS control) is lighter than that of the first microcomputer 10. Therefore, it is preferable to monitor the count shift by causing the second microcomputer 40, which has a light processing load in the cooperative control, to be performed. By doing in this way, the processing load of the 1st microcomputer 10 and the processing load of the 2nd microcomputer 40 can be brought close (equalization is possible).

ここで、図2を用いて、ECU100におけるCPS制御に関して説明する。なお、図2における「BXX(XXは数字)」は、BeforeTDC XX°CA=TDCタイミングの前XX°を示すものである。よって、例えば「B60」は、BeforeTDC 60°CA=TDCタイミングの前60°を示すものである。一方、「AXX」は、AfterTDC XX°CA =TDCタイミングの後XX°を示すものである。よって、例えば「A60」は、AfterTDC 60°CA =TDCタイミングの後60°を示すものである。   Here, the CPS control in the ECU 100 will be described with reference to FIG. Note that “BXX (XX is a number)” in FIG. 2 indicates BeforeTDC XX ° CA = XX ° before TDC timing. Therefore, for example, “B60” indicates Before TDC 60 ° CA = 60 ° before TDC timing. On the other hand, “AXX” indicates AfterTDC XX ° CA = XX ° after TDC timing. Thus, for example, “A60” indicates AfterTDC 60 ° CA = 60 ° after TDC timing.

まず、第2マイコン40は、気筒毎の計測角度区間(例えばB60〜A60)でCPS信号を取得する(第1気筒の場合S201)。また、第2マイコン40は、ある角度タイミング(例えばA120)までに筒内状態量を算出する。そして、第2マイコン40は、算出した筒内状態量を第2通信102で第1マイコン10へ送信する(第1気筒の場合はS202)。   First, the second microcomputer 40 acquires a CPS signal in a measurement angle section (for example, B60 to A60) for each cylinder (S201 in the case of the first cylinder). Further, the second microcomputer 40 calculates the in-cylinder state quantity by a certain angle timing (for example, A120). Then, the second microcomputer 40 transmits the calculated in-cylinder state quantity to the first microcomputer 10 by the second communication 102 (S202 in the case of the first cylinder).

一方、第1マイコン10は、受信した気筒毎の筒内状態量を元に、各制御に合わせたタイミングで失火検出を行うと共に、噴射補正演算及び点火補正演算(噴射量、噴射時期、点火時期などの補正量の算出)を開始する(第1気筒の場合はS203)。   On the other hand, the first microcomputer 10 detects misfire at a timing according to each control based on the received in-cylinder state quantity for each cylinder, and performs injection correction calculation and ignition correction calculation (injection quantity, injection timing, ignition timing). And the like (S203 in the case of the first cylinder).

第1マイコン10と第2マイコン40は、夫々のクランクカウンタ31,61のカウント値に応じて各種処理を行うものである。しかしながら、第1マイコン10のカウント値と第2マイコン40のカウント値がずれることもありうる。   The first microcomputer 10 and the second microcomputer 40 perform various processes according to the count values of the crank counters 31 and 61, respectively. However, the count value of the first microcomputer 10 and the count value of the second microcomputer 40 may be shifted.

このようにズレが発生した場合、第2マイコン40は、意図しない角度区間や別気筒のCPS信号を取得し筒内状態量の算出を行う可能性がある。一方、第1マイコン10は、ズレが発生した場合、意図しないタイミングに従って噴射制御、点火制御、及び失火検出を実施してしまう可能性がある。この結果、ECU100は、正常にCPS制御を行うことができない可能性がある。   When the deviation occurs as described above, the second microcomputer 40 may acquire an unintended angle section or a CPS signal of another cylinder and calculate the in-cylinder state quantity. On the other hand, when a deviation occurs, the first microcomputer 10 may perform injection control, ignition control, and misfire detection according to unintended timing. As a result, the ECU 100 may not be able to perform CPS control normally.

そこで、ECU100は、各マイコン10,40が保持するカウント値を監視し、補正を行うものである。ここで、図3を用いて、ECU100における、カウント値の監視処理,補正処理を含む全体の処理動作の概略を説明する。   Therefore, the ECU 100 monitors and corrects the count value held by each of the microcomputers 10 and 40. Here, with reference to FIG. 3, an outline of the entire processing operation including the count value monitoring process and the correction process in the ECU 100 will be described.

上述のように、第1マイコン10と第2マイコン40は、協調制御する。第2マイコン40は、クランク角度同期DMA受信トリガ処理で、受信値を受信値メモリに格納するクランクカウンタ受信値メモリ格納処理S301を実行する。また、第2マイコン40は、30°CA毎にメモリ配列への格納処理S302、クランクカウンタの更新処理S303、及びその他の30°CA処理S306を実施する。   As described above, the first microcomputer 10 and the second microcomputer 40 perform cooperative control. The second microcomputer 40 executes a crank counter received value memory storage process S301 for storing the received value in the received value memory in the crank angle synchronization DMA reception trigger process. Further, the second microcomputer 40 performs a storage process S302 in the memory array, a crank counter update process S303, and other 30 ° CA processes S306 every 30 ° CA.

更に、第2マイコン40は、TDCタイミングでは、メモリ配列比較処理S304を実施する。また、第2マイコン40は、メモリ配列比較処理S304によって、ズレ発生を検出した際には、第2通信102によって第1マイコン10にクランクカウンタ31の補正値を送信するクランクカウンタDMA送信処理S305を実行する。   Further, the second microcomputer 40 performs a memory arrangement comparison process S304 at the TDC timing. Further, when the second microcomputer 40 detects the occurrence of misalignment by the memory array comparison process S304, the second microcomputer 40 performs a crank counter DMA transmission process S305 for transmitting the correction value of the crank counter 31 to the first microcomputer 10 by the second communication 102. Run.

一方、第1マイコン10は、30°CA毎にクランクカウンタ更新処理S309、クランクカウンタ31の値を第2マイコン40に送信するクランクカウンタDMA送信処理S310、及びその他の30°CA処理S311を実施する。   On the other hand, the first microcomputer 10 performs crank counter update processing S309 every 30 ° CA, crank counter DMA transmission processing S310 for transmitting the value of the crank counter 31 to the second microcomputer 40, and other 30 ° CA processing S311. .

更に、第1マイコン10は、第2マイコン40がズレ発生を検出した場合には、補正処理S308を実施する。また、第1マイコン10は、第2マイコン40がズレ発生を検出した場合には、クランク角度同期DMA受信トリガ処理で、補正値を補正値メモリに格納するクランクカウンタ補正値メモリ格納処理S307を実行する。この図3に示す処理の繰り返しによって、第1マイコン10及び第2マイコン40のカウント値を監視し、カウントズレが発生した場合はカウントズレの補正(修正)を行うフローとなる。   Further, when the second microcomputer 40 detects the occurrence of deviation, the first microcomputer 10 performs the correction process S308. In addition, when the second microcomputer 40 detects the occurrence of deviation, the first microcomputer 10 executes crank counter correction value memory storage processing S307 for storing the correction value in the correction value memory in the crank angle synchronization DMA reception trigger processing. To do. By repeating the processing shown in FIG. 3, the count values of the first microcomputer 10 and the second microcomputer 40 are monitored, and when a count shift occurs, the count shift is corrected (corrected).

ここで、図4〜図9を用いて、第1マイコン10及び第2マイコン40における各処理の詳細な説明を行う。まず、図4〜図7を用いて、第2マイコン40の処理動作に関して説明する。   Here, each process in the 1st microcomputer 10 and the 2nd microcomputer 40 is demonstrated in detail using FIGS. First, the processing operation of the second microcomputer 40 will be described with reference to FIGS.

第2マイコン40は、図5のフローチャートで示すように、クランク角度同期DMA受信トリガ処理を実行する。ステップS10では、受信した値が正常であるか否かを判定する。第2マイコン40は、第1マイコン10からの第1通信受信時に、受信した値(カウント値)が正常な値であるか否かを判定する。そして、正常であると判定した場合はステップS11へ進み、正常でないと判定した場合はステップS12へ進む。なお、この判定は、例えば、DMA通信異常や通信データの合計値によって判定することができる。   As shown in the flowchart of FIG. 5, the second microcomputer 40 executes crank angle synchronization DMA reception trigger processing. In step S10, it is determined whether the received value is normal. When receiving the first communication from the first microcomputer 10, the second microcomputer 40 determines whether or not the received value (count value) is a normal value. And when it determines with it being normal, it progresses to step S11, and when it determines with it being normal, it progresses to step S12. This determination can be made based on, for example, a DMA communication abnormality or a total value of communication data.

ステップS11では、受信した値を受信値メモリ62に格納する。一方、ステップS12では、受信異常のキーワードを受信値メモリ62に格納する。なお、受信異常のキーワードとしては、一例として、本実施形態で採用している「EE」などの特異な値を採用することができる。しかしながら、本発明はこれに限定されるものではない。   In step S11, the received value is stored in the received value memory 62. On the other hand, in step S 12, the reception abnormality keyword is stored in the reception value memory 62. As a keyword for reception abnormality, for example, a unique value such as “EE” adopted in the present embodiment can be adopted. However, the present invention is not limited to this.

例えば、図4のタイミングt1に示すように、第1マイコン10は、カウント値(ここでは「2」)を第1通信101で第2マイコン40に送信する。そして、図4のタイミングt2に示すように、第2マイコン40は、受信した値が正常であると判定した場合は、受信した値(ここでは「2」)を受信値メモリ62に格納する。なお、ステップS11,12は、上述のクランクカウンタ受信値メモリ格納処理S301に相当するものである。   For example, as shown at timing t <b> 1 in FIG. 4, the first microcomputer 10 transmits a count value (here “2”) to the second microcomputer 40 through the first communication 101. Then, as shown at timing t <b> 2 in FIG. 4, when the second microcomputer 40 determines that the received value is normal, the second microcomputer 40 stores the received value (here “2”) in the received value memory 62. Steps S11 and S12 correspond to the above-described crank counter received value memory storage process S301.

このように、「EE」を格納することによって、受信したクランクカウンタの値と通信異常とを差別化することができる。よって、後ほど説明するメモリ配列比較処理において、正常な値を使用することができる。   Thus, by storing “EE”, it is possible to differentiate between the received crank counter value and communication abnormality. Therefore, normal values can be used in the memory array comparison processing described later.

また、第2マイコン40は、図6のフローチャートで示すように、30°CA処理を実行する。この30°CA処理は、クランク角が30°CA増大する毎に実行する処理である。つまり、第2マイコン40は、クランクセンサ入力信号が入力されるたびに、30°CA処理を実行する。   Further, as shown in the flowchart of FIG. 6, the second microcomputer 40 executes a 30 ° CA process. This 30 ° CA process is executed every time the crank angle increases by 30 ° CA. That is, the second microcomputer 40 executes the 30 ° CA process each time a crank sensor input signal is input.

ステップS20では、第1メモリ配列63の第2要素632に第1要素631の値、第3要素633に第2要素632の値を格納する。つまり、第1メモリ配列63の第2要素632、第3要素633を、夫々第1要素631の値、第2要素632の値で更新する。   In step S20, the value of the first element 631 is stored in the second element 632 of the first memory array 63, and the value of the second element 632 is stored in the third element 633. That is, the second element 632 and the third element 633 of the first memory array 63 are updated with the value of the first element 631 and the value of the second element 632, respectively.

ステップS21では、第2メモリ配列64の第2要素642に第1要素641の値、第3要素643に第2要素642の値を格納する。つまり、第2メモリ配列64の第2要素642、第3要素643を、夫々第1要素641の値、第2要素642の値で更新する。   In step S21, the value of the first element 641 is stored in the second element 642 of the second memory array 64, and the value of the second element 642 is stored in the third element 643. That is, the second element 642 and the third element 643 of the second memory array 64 are updated with the value of the first element 641 and the value of the second element 642, respectively.

ステップS22では、受信値メモリ62の値を第1メモリ配列63の第1要素631に格納する。つまり、第1メモリ配列63の第1要素631を、受信値メモリ62の値で更新する。   In step S22, the value of the received value memory 62 is stored in the first element 631 of the first memory array 63. That is, the first element 631 of the first memory array 63 is updated with the value of the received value memory 62.

ステップS23では、クランクカウンタ61のカウント値を第2メモリ配列64の第1要素641に格納する。つまり、第2メモリ配列64の第1要素641を、クランクカウンタ61のカウント値で更新する。このステップS20〜S23は、上述の格納処理S302に相当するものである。   In step S23, the count value of the crank counter 61 is stored in the first element 641 of the second memory array 64. That is, the first element 641 of the second memory array 64 is updated with the count value of the crank counter 61. Steps S20 to S23 correspond to the above-described storage process S302.

ステップS24では、受信値メモリ62に初期値「FF」を格納する。つまり、受信値メモリ62の値をメモリ配列へ格納した後は、受信値メモリ62を初期値「FF」で初期化しておく。なお、初期値としては、一例として、本実施形態で採用している「FF」などの値を採用することができる。しかしながら、本発明はこれに限定されるものではない。このようにすることで、受信値メモリ62の初期値が更新されていないことで、第1マイコン10からの受信なしや、受信遅れを検出することも可能である。   In step S 24, the initial value “FF” is stored in the reception value memory 62. That is, after the value of the reception value memory 62 is stored in the memory array, the reception value memory 62 is initialized with the initial value “FF”. As an initial value, for example, a value such as “FF” employed in the present embodiment can be employed. However, the present invention is not limited to this. By doing in this way, since the initial value of the reception value memory 62 is not updated, it is possible to detect no reception from the first microcomputer 10 or a reception delay.

例えば、図4に示すように、受信値メモリ62に「2」を格納した直後の30°CAタイミングであるタイミングt3(クランクカウンタ61のカウント値「3」)で、ステップS20〜S24の処理を行う。   For example, as shown in FIG. 4, the processing of steps S20 to S24 is performed at timing t3 (count value “3” of the crank counter 61) that is 30 ° CA timing immediately after “2” is stored in the reception value memory 62. Do.

具体的には、第1メモリ配列63に関しては、クランクカウンタ61のカウント値「3」のときの第2要素632に、クランクカウンタ61のカウント値「2」のときの第1要素631の値「1」を格納する(S20)。また、クランクカウンタ61のカウント値「3」のときの第3要素633に、クランクカウンタ61のカウント値「2」のときの第2要素632の値「0」を格納する(S20)。さらに、クランクカウンタ61のカウント値「3」のときの第1要素631に、受信値メモリ62の値「2」を格納する(S22)。なお、受信値メモリ62の値を使用した後は、受信値メモリ62に初期値「FF」を格納する(S24)。   Specifically, with respect to the first memory array 63, the value “1” of the first element 631 when the count value of the crank counter 61 is “2” is added to the second element 632 when the count value of the crank counter 61 is “3”. 1 "is stored (S20). Further, the value “0” of the second element 632 when the count value “2” of the crank counter 61 is stored in the third element 633 when the count value “3” of the crank counter 61 is stored (S20). Further, the value “2” of the reception value memory 62 is stored in the first element 631 when the count value of the crank counter 61 is “3” (S22). After using the value in the reception value memory 62, the initial value “FF” is stored in the reception value memory 62 (S24).

同様に、第2メモリ配列64に関して、クランクカウンタ61のカウント値「3」のときの第2要素642に、クランクカウンタ61のカウント値「2」のときの第1要素641の値「1」を格納する(S21)。また、クランクカウンタ61のカウント値「3」のときの第3要素643に、クランクカウンタ61のカウント値「2」のときの第2要素642の値「0」を格納する(S21)。更に、クランクカウンタ61のカウント値「3」のときの第1要素641に、クランクカウンタ61の前回のカウント値「2」を格納する(S23)。   Similarly, with respect to the second memory array 64, the value “1” of the first element 641 when the count value of the crank counter 61 is “2” is set to the second element 642 when the count value of the crank counter 61 is “3”. Store (S21). Further, the value “0” of the second element 642 when the count value “2” of the crank counter 61 is stored in the third element 643 when the count value “3” of the crank counter 61 is stored (S21). Further, the previous count value “2” of the crank counter 61 is stored in the first element 641 when the count value of the crank counter 61 is “3” (S23).

ステップS25では、通常のクランクカウンタ61の更新処理を行う。ここでは、クランクカウンタ61のカウント値をインクリメント(カウントアップ)する。このように、ステップS20〜S24は、クランクカウンタ61の更新処理実施前に行われる。このステップS25は、上述のクランクカウンタ更新処理S303に相当するものである。例えば、図4に示すように、クランクカウンタ61のカウント値が「2」である場合、直後の30°CAタイミングでは、クランクカウンタ31のカウント値を「3」にインクリメントする。   In step S25, normal crank counter 61 update processing is performed. Here, the count value of the crank counter 61 is incremented (counted up). Thus, steps S20 to S24 are performed before the update process of the crank counter 61 is performed. This step S25 corresponds to the above-described crank counter update process S303. For example, as shown in FIG. 4, when the count value of the crank counter 61 is “2”, the count value of the crank counter 31 is incremented to “3” at the 30 ° CA timing immediately after.

ステップS26では、TDCタイミングであるか否かを判定する。そして、TDCタイミングであると判定した場合はステップS27へ進み、TDCタイミングではないと判定した場合はステップS28へ進む。   In step S26, it is determined whether it is TDC timing. If it is determined that it is TDC timing, the process proceeds to step S27, and if it is determined that it is not TDC timing, the process proceeds to step S28.

ステップS27では、メモリ配列比較処理を行う。このメモリ配列比較処理は、格納処理後に行うものであり、第1メモリ配列63と第2メモリ配列64の各要素の比較を行い、クランクカウンタ31のカウント値と、クランクカウンタ61のカウント値とにズレが発生しているかをチェック(監視)する処理である。例えば、図4においては、クランクカウンタ61のカウント値「6」のときがTDCタイミングである。よって、ここでメモリ配列比較処理を行う。ステップS27は、上述のメモリ配列比較処理S304に相当するものである。このメモリ配列比較処理に関しては、後ほど詳しく説明する。なお、ステップS28では、その他の30°CA処理を行う(上述のS306に相当する)。   In step S27, a memory array comparison process is performed. This memory array comparison process is performed after the storage process, and each element of the first memory array 63 and the second memory array 64 is compared, and the count value of the crank counter 31 and the count value of the crank counter 61 are compared. This is a process for checking (monitoring) whether a deviation has occurred. For example, in FIG. 4, the count value “6” of the crank counter 61 is the TDC timing. Therefore, memory array comparison processing is performed here. Step S27 corresponds to the above-described memory arrangement comparison process S304. This memory arrangement comparison process will be described in detail later. In step S28, other 30 ° CA processing is performed (corresponding to S306 described above).

このように、本実施形態では、本実施携帯においては、第2マイコン40は、TDC毎にメモリ配列比較処理を行う例を採用している。しかしながら、このメモリ配列比較処理は、30°CA毎に行うようにしてもよい。   Thus, in the present embodiment, in the present embodiment, the second microcomputer 40 employs an example in which the memory array comparison process is performed for each TDC. However, this memory array comparison process may be performed every 30 ° CA.

なお、後ほど説明するが、カウントズレが発生していた場合、このカウントズレを補正する。また、このカウントズレは、各気筒のCPS信号の取得開始時期までに補正できればよい。よって、メモリ配列比較処理は、本実施形態で採用しているように、TDC毎に実施すれば十分である。更に、TDC毎にメモリ配列比較処理を行うことによって、30°CA毎にメモリ配列比較処理を行うよりも処理負荷を軽減することができ好適である。   As will be described later, if a count shift has occurred, the count shift is corrected. Further, it is sufficient that this count shift can be corrected by the acquisition start time of the CPS signal of each cylinder. Therefore, it is sufficient that the memory arrangement comparison process is performed for each TDC as employed in the present embodiment. Furthermore, performing the memory array comparison process for each TDC is preferable because the processing load can be reduced compared to performing the memory array comparison process for every 30 ° CA.

また、図2で示したように、第1マイコン10としては、各気筒共通でクランクカウンタ31のカウント値を使用している。各気筒は、前回のTDCタイミング前後の一定角度区間におけるCPS信号を使用しフィードバックするが、その間にも別気筒のTDCタイミングが存在している(図2のS204)。よって、第1マイコン10において対象気筒の処理開始前にズレ補正が可能である。なお、気筒数が増えた場合には、360°CA内のTDCタイミングも比例して増える。このため、気筒数が増えても影響範囲を抑えることが可能となる。   As shown in FIG. 2, the first microcomputer 10 uses the count value of the crank counter 31 common to each cylinder. Each cylinder feeds back using a CPS signal in a constant angle section before and after the previous TDC timing, but there is also a TDC timing for another cylinder in the meantime (S204 in FIG. 2). Therefore, the first microcomputer 10 can correct the deviation before starting the processing of the target cylinder. When the number of cylinders increases, the TDC timing within 360 ° CA also increases in proportion. For this reason, even if the number of cylinders increases, it becomes possible to suppress the influence range.

また、メモリ配列比較処理は、第2マイコン40での各気筒のCPS出力電圧値の取得開始時期までに補正できるマージンを持ったタイミングで実行すれば、第1マイコン10での処理で使用される制御への影響は1気筒分に抑えることができる。   Further, if the memory arrangement comparison process is executed at a timing having a margin that can be corrected by the second microcomputer 40 before the acquisition start time of the CPS output voltage value of each cylinder, it is used in the process in the first microcomputer 10. The influence on the control can be suppressed to one cylinder.

さらに、クランク角に同期してメモリ配列比較処理を行うことにより、噴射、点火回数に応じた補正を行うことが可能となる。つまり、メモリ配列比較処理間どうしで噴射、点火回数がバラつくことを抑制することができる。よって、エンジン回転数が高い場合であっても影響範囲が広がるのを抑制することができる。しかしながら、時間同期でメモリ配列比較処理を行うようにしてもよい。   Further, by performing the memory array comparison process in synchronization with the crank angle, it is possible to perform correction according to the number of injections and ignitions. That is, it is possible to suppress variations in the number of injections and ignitions between the memory array comparison processes. Therefore, it is possible to suppress the influence range from expanding even when the engine speed is high. However, the memory array comparison process may be performed in time synchronization.

ここで、図7のフローチャートを用いて、メモリ配列比較処理に関して説明する。まず、ステップS30では、第1メモリ配列63の第1要素631〜第3要素633に「EE」が2つ以上あるか否かを判定する。このように、「EE」が2つ以上あるか否かを判定するのは、通信異常が多発したか否かを判定するためである。なお、通信異常が多発した場合は、第1マイコン10のクランクカウンタ31のカウント値を監視できない。よって、通信異常が多発した場合は、カウントズレの発生をチェックすることができない。従って、ステップS30は、カウントズレの発生のチェックを行うことが可能であるか否かの判定と言い換えることができる。   Here, the memory arrangement comparison process will be described with reference to the flowchart of FIG. First, in step S <b> 30, it is determined whether or not there are two or more “EE” in the first element 631 to the third element 633 of the first memory array 63. As described above, the reason for determining whether or not there are two or more “EE” is to determine whether or not communication abnormalities frequently occur. In addition, when communication abnormality occurs frequently, the count value of the crank counter 31 of the first microcomputer 10 cannot be monitored. Therefore, when communication abnormality occurs frequently, occurrence of a count shift cannot be checked. Therefore, step S30 can be paraphrased as a determination as to whether or not it is possible to check the occurrence of a count shift.

そして、ステップS30において、「EE」が2つ以上あると判定した場合は通信異常が多発しているとみなしてステップS36へ進み、「EE」が2つ以上あると判定しなかった場合は通信異常が多発していないとみなしてステップS31へ進む。   If it is determined in step S30 that there are two or more “EE”, it is considered that there are many communication abnormalities, and the process proceeds to step S36. If it is not determined that there are two or more “EE”, communication is performed. The process proceeds to step S31 assuming that there are not many abnormalities.

ステップS36では、異常通知のキーワード「AA」を第1マイコン10に送信する。つまり、第2マイコン40は、「AA」を第2通信102で第1マイコン10に送信する。   In step S <b> 36, the abnormality notification keyword “AA” is transmitted to the first microcomputer 10. That is, the second microcomputer 40 transmits “AA” to the first microcomputer 10 by the second communication 102.

また、ステップS37では、通信異常メモリ65に「AA」を格納する。なお、異常通知のキーワード(ここでは「AA」)は、第2マイコン40でのメモリ配列比較処理が実施不可である異常発生を示す値とも言い換えることができる。   In step S37, “AA” is stored in the communication abnormality memory 65. It should be noted that the keyword for abnormality notification (here, “AA”) can also be rephrased as a value indicating the occurrence of abnormality for which the memory array comparison processing in the second microcomputer 40 cannot be performed.

このように、通信異常が多発した場合は、異常を第1マイコン10に知らせると共に、自身でも記憶しておく。言い換えると、通信異常が多発した場合は、カウントズレが発生しているかを検出できないことを第1マイコン10に知らせると共に、自身でも記憶しておく。   As described above, when communication abnormality occurs frequently, the abnormality is notified to the first microcomputer 10 and stored by itself. In other words, when frequent communication abnormalities occur, the first microcomputer 10 is informed that it is impossible to detect whether a count shift has occurred, and is stored by itself.

パワトレECUでは、上記のような異常の場合、異常発生を記憶し、システムの故障判定に用いることがあるので異常発生を記憶するようにしてもよい。また、「AA」を記憶することで、CPS制御の有無切り替えを行い、間違って異常値を使用してしまうことが回避可能となる。つまり、「AA」が記憶されていない場合はCPS制御を行うようにし、「AA」が記憶されている場合はCPS制御を行わないようにしてもよい。これによって、間違って異常値を使用してしまうことが回避可能となる。   In the power train ECU, in the case of an abnormality as described above, the occurrence of the abnormality is stored and may be used for system failure determination. In addition, by storing “AA”, it is possible to avoid erroneous use of an abnormal value by switching the presence / absence of CPS control. That is, CPS control may be performed when “AA” is not stored, and CPS control may not be performed when “AA” is stored. This makes it possible to avoid using an abnormal value by mistake.

一方、ステップS31では、第1メモリ配列63の第1要素631〜第3要素633に「FF」があるか否かを判定する。「FF」があると判定しなかった場合はステップS32へ進み、「FF」があると判定した場合はステップS34へ進む。   On the other hand, in step S <b> 31, it is determined whether or not “FF” exists in the first element 631 to the third element 633 of the first memory array 63. If it is not determined that “FF” exists, the process proceeds to step S32. If it is determined that “FF” exists, the process proceeds to step S34.

ステップS32では、第1メモリ配列63と第2メモリ配列64の各要素を比較する。このステップS32での処理は、カウントズレが発生しているか否かを確認するために行う。具体的には、第1メモリ配列63の第1要素631と第2メモリ配列64の第1要素641とを比較する。また、第1メモリ配列63の第2要素632と第2メモリ配列64の第2要素642とを比較する。そして、第1メモリ配列63の第3要素633と第2メモリ配列64の第3要素643とを比較する。   In step S32, each element of the first memory array 63 and the second memory array 64 is compared. The process in step S32 is performed to confirm whether or not a count shift has occurred. Specifically, the first element 631 of the first memory array 63 and the first element 641 of the second memory array 64 are compared. Also, the second element 632 of the first memory array 63 and the second element 642 of the second memory array 64 are compared. Then, the third element 633 of the first memory array 63 and the third element 643 of the second memory array 64 are compared.

ステップS33では、第1メモリ配列63と第2メモリ配列64の「EE」を除く全ての要素が一致しているかを判定する。そして、一致していないと判定した場合は、カウントズレが発生しているとみなしてステップS34へ進む。一方、一致していると判定した場合は、ズレは発生していないとみなして図7のフローチャートで示す処理を終了する。   In step S33, it is determined whether all elements except for “EE” in the first memory array 63 and the second memory array 64 match. If it is determined that they do not match, it is considered that a count shift has occurred, and the process proceeds to step S34. On the other hand, if it is determined that they match, it is assumed that no deviation has occurred, and the process shown in the flowchart of FIG. 7 is terminated.

例えば、図4のタイミングt4に示すように、第1要素631と第1要素641には「5」、第2要素632と第2要素642には「4」、第3要素633と第3要素643には「3」が格納されている。よって、この例の場合は、一致していると判定されることになる。なお、一致しない場合の例に関しては、後ほど説明する。   For example, as shown at timing t4 in FIG. 4, the first element 631 and the first element 641 are “5”, the second element 632 and the second element 642 are “4”, and the third element 633 and the third element. 643 stores “3”. Therefore, in this example, it is determined that they match. An example of the case where they do not match will be described later.

ステップS34では、第2マイコン40は、クランクカウンタ61のカウント値を第2通信102によって第1マイコン10に送信する。このステップS34での処理は、ステップS31でYESと判定された場合、又は、ステップS33でNOと判定された場合に実行される。   In step S <b> 34, the second microcomputer 40 transmits the count value of the crank counter 61 to the first microcomputer 10 through the second communication 102. The process in step S34 is executed when YES is determined in step S31, or when NO is determined in step S33.

ステップS31でYESと判定された場合(つまり、第1要素631〜第3要素633に「FF」が存在する場合)、第1マイコン10側の30°CA処理抜けによってクランクカウンタ31のカウントアップが実施されていないことになる。又は、クランクカウンタ61が、第2マイコン40側のノイズによってカウントアップを実施してしまったことになる。   When it is determined YES in step S31 (that is, when “FF” exists in the first element 631 to the third element 633), the crank counter 31 is incremented by 30 ° CA processing omission on the first microcomputer 10 side. It will not be implemented. Alternatively, the crank counter 61 has counted up due to noise on the second microcomputer 40 side.

一方、ステップS33でNOと判定された場合(つまり、一致していなかった場合)、カウントズレが発生していることになる。よって、ステップS34では、第1マイコン10と第2マイコン40とのカウント値を一致させるために、クランクカウンタ61のカウント値を補正値として第1マイコン10に送信する(第2通信手段、送信手段)。   On the other hand, if it is determined NO in step S33 (that is, if they do not match), a count shift has occurred. Therefore, in step S34, in order to match the count values of the first microcomputer 10 and the second microcomputer 40, the count value of the crank counter 61 is transmitted as a correction value to the first microcomputer 10 (second communication means, transmission means). ).

なお、CPS制御においては、第2マイコン40で算出した値を使用して第1マイコン10は制御を行う。このことから、本実施形態においては、クランクカウンタ31のカウント値よりも、クランクカウンタ61のカウント値の方がより信用できる値として扱う。よって、カウントズレが発生した場合は、クランクカウンタ61のカウント値で、クランクカウンタ31のカウント値を補正する。   In the CPS control, the first microcomputer 10 performs control using the value calculated by the second microcomputer 40. For this reason, in the present embodiment, the count value of the crank counter 61 is treated as a more reliable value than the count value of the crank counter 31. Therefore, when the count shift occurs, the count value of the crank counter 31 is corrected with the count value of the crank counter 61.

ステップS35では、ズレ発生を記憶する。つまり、第2マイコン40は、カウントズレが発生した場合、ズレ発生を示す値をズレ発生メモリ66に記憶する(第2ズレ記憶手段)。このようにズレ発生を示す値をズレ発生メモリ66に記憶することによって、制御によってはズレ発生が記憶されていた場合に、前回の制御値を用いるなど影響範囲を限定することができる。   In step S35, the occurrence of deviation is stored. That is, when the count deviation occurs, the second microcomputer 40 stores a value indicating the occurrence of deviation in the deviation occurrence memory 66 (second deviation storage means). By storing the value indicating the occurrence of deviation in the deviation occurrence memory 66 in this manner, the range of influence can be limited by using the previous control value when deviation occurrence is stored depending on the control.

なお、「AA」やズレ発生を示す値は、解析用データに使用することや、異常発生状況に応じて制御を切り替えるために用いることを想定して記憶することもある。しかしながら、「AA」を記憶しておかなくても本願発明の目的は達成できる。同様に、ズレ発生を示す値を記憶しておかなくても本願発明の目的は達成できる。   Note that “AA” or a value indicating the occurrence of deviation may be stored on the assumption that it is used for analysis data or used for switching control according to an abnormality occurrence state. However, the object of the present invention can be achieved without storing “AA”. Similarly, the object of the present invention can be achieved without storing a value indicating occurrence of deviation.

なお、ステップS30〜S33は、上述のメモリ配列比較処理S304に相当するものである。また、ステップS34は、上述のクランクカウンタDMA送信処理S305に相当するものである。   Steps S30 to S33 correspond to the above-described memory arrangement comparison process S304. Step S34 corresponds to the crank counter DMA transmission processing S305 described above.

このように、第2マイコン40は、第1メモリ配列63に記憶されたカウント値と、第2メモリ配列64に記憶されたカウント値とを比較する(監視手段)。クランク角信号は、各マイコン10,40に同時に入力される。しかしながら、第1マイコン10と第2マイコン40では、処理タイミングに時間差が生じる。そこで、カウント値をメモリ空間に一次記憶しておき、次回(以降)タイミングにて使用することで、通信完了までの無駄な待ち時間を作らないようにすることができる。   In this way, the second microcomputer 40 compares the count value stored in the first memory array 63 with the count value stored in the second memory array 64 (monitoring means). The crank angle signal is input to the microcomputers 10 and 40 simultaneously. However, there is a time difference in processing timing between the first microcomputer 10 and the second microcomputer 40. Therefore, by temporarily storing the count value in the memory space and using it at the next (or later) timing, it is possible to prevent a wasteful waiting time until the communication is completed.

また、本実施形態では、一例として、通信異常などによって比較ができない状態を回避するために、クランクカウンタ31,61のカウント値を記憶するメモリ領域をメモリ配列(過去、数回分のカウント値を記憶できる形式)としている。   In the present embodiment, as an example, in order to avoid a state where comparison cannot be performed due to communication abnormality or the like, a memory area for storing the count values of the crank counters 31 and 61 is arranged in a memory array (stores count values for several times in the past). Format).

ここで、図8,図9を用いて、第1マイコン10の処理動作に関して説明する。   Here, the processing operation of the first microcomputer 10 will be described with reference to FIGS.

第1マイコン10は、図8のフローチャートで示すように、クランク角度同期DMA受信トリガ処理を実行する。ステップS40では、受信した値が正常であるか否かを判定する。第1マイコン10は、第2マイコン40からの第2通信受信時に、受信した値(カウント値)が正常な値であるか否かを判定する。そして、正常であると判定した場合はステップS41へ進み、正常でないと判定した場合は図8のフローチャートで示す処理を終了する。なお、この判定は、例えば、DMA通信異常や通信データの合計値によって判定することができる。   As shown in the flowchart of FIG. 8, the first microcomputer 10 executes crank angle synchronization DMA reception trigger processing. In step S40, it is determined whether or not the received value is normal. When receiving the second communication from the second microcomputer 40, the first microcomputer 10 determines whether or not the received value (count value) is a normal value. If it is determined to be normal, the process proceeds to step S41. If it is determined not to be normal, the process shown in the flowchart of FIG. 8 is terminated. This determination can be made based on, for example, a DMA communication abnormality or a total value of communication data.

ステップS41では、「AA」を受信したか否かを判定する。そして、「AA」を受信したと判定した場合はステップS44へ進み、「AA」を受信したと判定してない場合はステップS42へ進む。   In step S41, it is determined whether or not “AA” has been received. If it is determined that “AA” has been received, the process proceeds to step S44. If it is not determined that “AA” has been received, the process proceeds to step S42.

ステップS44では、異常を記憶する。つまり、通信異常メモリ33に「AA」を記憶する。上述のように「AA」は、第2マイコン40でのメモリ配列比較処理が実施不可である異常発生を示すものである。よって、第1マイコン10は、第2マイコン40から「AA」を受信した場合には、自身においても異常発生を記憶しておく。なお、この処理は、上述のステップS37と同様であるため詳しい説明は省略する。   In step S44, the abnormality is stored. That is, “AA” is stored in the communication abnormality memory 33. As described above, “AA” indicates the occurrence of an abnormality in which the memory array comparison process in the second microcomputer 40 cannot be performed. Therefore, when the first microcomputer 10 receives “AA” from the second microcomputer 40, the first microcomputer 10 also stores the occurrence of abnormality in itself. Since this process is the same as step S37 described above, detailed description thereof is omitted.

一方、ステップS42では、受信した値を補正値メモリ32に格納する。上述のように、第2マイコン40は、「AA」又はクランクカウンタ61のカウント値(補正値)を第1マイコン10に対して送信する(送信手段)。よって、第1マイコン10は、第2マイコン40から「AA」以外を受信した場合は、カウントズレが発生したことによって第2マイコン40から送信されたクランクカウンタ61のカウント値を受信していることになる。このように、第1マイコン10は、第2マイコン40から送信された補正値を受信する(第1通信手段、受信手段)。よって、第1マイコン10は、受信した値を補正値として補正値メモリ32に格納する。なお、ステップS42は、上述のクランクカウンタ補正値メモリ格納処理S307に相当するものである。   On the other hand, in step S 42, the received value is stored in the correction value memory 32. As described above, the second microcomputer 40 transmits “AA” or the count value (correction value) of the crank counter 61 to the first microcomputer 10 (transmission means). Therefore, when the first microcomputer 10 receives anything other than “AA” from the second microcomputer 40, the first microcomputer 10 has received the count value of the crank counter 61 transmitted from the second microcomputer 40 due to the occurrence of the count shift. become. As described above, the first microcomputer 10 receives the correction value transmitted from the second microcomputer 40 (first communication means, receiving means). Therefore, the first microcomputer 10 stores the received value in the correction value memory 32 as a correction value. Step S42 corresponds to the above-described crank counter correction value memory storage process S307.

ステップS43では、ズレ発生を記憶する(第1ズレ記憶手段)。つまり、第1マイコン10は、カウントズレが発生した場合、ズレ発生を示す値をズレ発生メモリ34に記憶する(第1ズレ記憶手段)。なお、カウンタズレを補正する状況においても、クランクカウンタ31のカウント値は、他制御にも使用される重要な値であることがある。しかしながら、ステップS42の処理を行うことによって、クランクカウンタ31のカウント値が急変(例えば「1」→「3」になる)することになる。そこで、このように、ズレ発生を示す値をズレ発生メモリ34に記憶することによって制御によってはズレ発生が記憶されていた場合に、前回の制御値を用いるなど影響範囲を限定することができる。   In step S43, the occurrence of deviation is stored (first deviation storage means). That is, when the count deviation occurs, the first microcomputer 10 stores a value indicating the occurrence of deviation in the deviation generation memory 34 (first deviation storage means). Even in a situation where the counter deviation is corrected, the count value of the crank counter 31 may be an important value that is also used for other controls. However, by performing the process of step S42, the count value of the crank counter 31 changes suddenly (for example, “1” → “3”). Thus, by storing a value indicating the occurrence of deviation in the deviation occurrence memory 34 in this way, when the occurrence of deviation is stored depending on the control, it is possible to limit the influence range such as using the previous control value.

なお、「AA」やズレ発生を示す値は、解析用データに使用することや、異常発生状況に応じて制御を切り替えるために用いることを想定して記憶する。しかしながら、「AA」を記憶しておかなくても本願発明の目的は達成できる。同様に、ズレ発生を示す値を記憶しておかなくても本願発明の目的は達成できる。   Note that “AA” and a value indicating the occurrence of deviation are stored on the assumption that they are used for analysis data or used for switching control according to an abnormality occurrence state. However, the object of the present invention can be achieved without storing “AA”. Similarly, the object of the present invention can be achieved without storing a value indicating occurrence of deviation.

ところで、後ほど説明するように、第1マイコン10は、第2マイコン40から受信した補正値で、クランクカウンタ31のカウント値を補正するものである。ところが、本実施形態では、ステップS42に示すように、第2マイコン40から受信した補正値ですぐにクランクカウンタ31のカウント値を変更せずに、一旦補正値メモリ32に格納している。これは、クランクカウンタ31は噴射制御や点火制御以外の他の制御でも参照されるため、補正値を受信したタイミングでクランクカウンタ31のカウント値を変更した場合、制御間で同時性を保つ必要があるにも関わらず変更前後の異なるクランクカウンタ31の値を参照してしまう可能性や、補正値を受信するまでの待ち時間によってクランクカウンタ31の更新が遅れる可能性があるので、直後の30°CA処理におけるクランクカウンタ更新処理S209の実施前に補正処理を行うためである。   By the way, as will be described later, the first microcomputer 10 corrects the count value of the crank counter 31 with the correction value received from the second microcomputer 40. However, in this embodiment, as shown in step S42, the correction value received from the second microcomputer 40 is temporarily stored in the correction value memory 32 without immediately changing the count value of the crank counter 31. This is because the crank counter 31 is also referred to in other controls other than the injection control and the ignition control. Therefore, when the count value of the crank counter 31 is changed at the timing when the correction value is received, it is necessary to maintain simultaneity between the controls. In spite of the fact, the value of the crank counter 31 before and after the change may be referred to, and the update of the crank counter 31 may be delayed due to the waiting time until the correction value is received. This is because the correction process is performed before the crank counter update process S209 in the CA process.

また、第1マイコン10は、図9のフローチャートで示すように、30°CA処理を実行する。この30°CA処理は、クランク角が30°CA増大する毎に実行する処理である。つまり、第1マイコン10は、クランクセンサ入力信号が入力されるたびに、30°CA処理を実行する。   Moreover, the 1st microcomputer 10 performs a 30 degree CA process, as shown in the flowchart of FIG. This 30 ° CA process is executed every time the crank angle increases by 30 ° CA. That is, the first microcomputer 10 executes the 30 ° CA process each time a crank sensor input signal is input.

ステップS50では、補正値メモリ32に格納されている値が「FF」であるか否かを判定する。つまり、補正値メモリ32が「FF」から更新されているか否かを判定する。そして、「FF」であると判定した場合は更新されていないとみなしてステップS53へ進み、「FF」でないと判定した場合は更新されているとみなしてステップS51へ進む。このようにすることで、補正値メモリ32の初期値が更新されていることで、第2マイコン40から補正値を受信したと検出することも可能である。   In step S50, it is determined whether or not the value stored in the correction value memory 32 is “FF”. That is, it is determined whether or not the correction value memory 32 has been updated from “FF”. Then, if it is determined that it is “FF”, it is regarded that it is not updated, and the process proceeds to step S53. If it is determined that it is not “FF”, it is regarded that it is updated, and the process proceeds to step S51. By doing so, it is possible to detect that the correction value is received from the second microcomputer 40 by updating the initial value of the correction value memory 32.

補正値メモリ32に格納されている値が「FF」でない場合、上述のように第2マイコン40から送信された補正値が格納されていることになる。よって、ステップS51では、クランクカウンタ31のカウント値を補正値メモリ32に格納されている値である補正値(受信した補正値)に変更する(補正手段)。つまり、第1マイコン10は、補正値メモリ32に格納されている値が「FF」ではなく補正値であった場合、カウントズレが発生したとみなして、クランクカウンタ31の値を補正値に補正(修正)する。なお、このステップS51は、上述の補正処理S308に相当するものである。   When the value stored in the correction value memory 32 is not “FF”, the correction value transmitted from the second microcomputer 40 is stored as described above. Therefore, in step S51, the count value of the crank counter 31 is changed to a correction value (received correction value) that is a value stored in the correction value memory 32 (correction means). That is, when the value stored in the correction value memory 32 is not “FF” but a correction value, the first microcomputer 10 regards that the count deviation has occurred and corrects the value of the crank counter 31 to the correction value. (Correct). This step S51 corresponds to the above-described correction process S308.

このようにすることによって、カウントズレが発生していた場合であっても、クランクカウンタ31のカウント値と、クランクカウンタ61のカウント値とを一致させることができる。   By doing so, the count value of the crank counter 31 and the count value of the crank counter 61 can be matched even when the count deviation has occurred.

ステップS52では、クランクカウンタ31の値を変更後、補正値メモリを「FF」を格納することで初期化する。   In step S52, after changing the value of the crank counter 31, the correction value memory is initialized by storing "FF".

ステップS53では、通常のクランクカウンタ31の更新処理を行う。ここでは、クランクカウンタ31のカウント値をインクリメント(カウントアップ)する。このステップS53は、上述のクランクカウンタ更新処理S309に相当するものである。例えば、図4に示すように、クランクカウンタ31のカウント値が「2」である場合、直後の30°CAタイミングでは、クランクカウンタ31のカウント値を「3」にインクリメントする。   In step S53, the normal crank counter 31 is updated. Here, the count value of the crank counter 31 is incremented (counted up). This step S53 corresponds to the above-described crank counter update process S309. For example, as shown in FIG. 4, when the count value of the crank counter 31 is “2”, the count value of the crank counter 31 is incremented to “3” at the 30 ° CA timing immediately after.

このようにすることによって、カウントズレが発生していた場合であっても、第1マイコン10(クランクカウンタ31)と第2マイコン40(クランクカウンタ61)のカウント値を一致させることができる。また、このように補正することによって、第1マイコン10において、カウントズレによる異常燃焼など意図せぬ問題を解消できる。なお、カウントズレが発生した場合、一定期間(360°CA期間)、CPS制御をやめることも考えられる。   By doing in this way, even if the count deviation has occurred, the count values of the first microcomputer 10 (crank counter 31) and the second microcomputer 40 (crank counter 61) can be matched. Further, by correcting in this way, the first microcomputer 10 can solve unintended problems such as abnormal combustion due to count shift. When the count shift occurs, it may be considered that CPS control is stopped for a certain period (360 ° CA period).

その後、ステップS54では、クランクカウンタ31のカウント値を第1通信101で第2マイコン40に送信する。このように、クランクカウンタ31のカウント値を第2マイコン40に送信するのは、クランクカウンタ31のカウント値を第2マイコン40で監視するためである。このステップS54は、上述のクランクカウンタDMA送信処理S310に相当するものである。なお、ステップS55では、その他の30°CA処理を行う(上述のS311に相当する)。   Thereafter, in step S54, the count value of the crank counter 31 is transmitted to the second microcomputer 40 by the first communication 101. The reason why the count value of the crank counter 31 is transmitted to the second microcomputer 40 in this way is to monitor the count value of the crank counter 31 by the second microcomputer 40. This step S54 corresponds to the above-described crank counter DMA transmission process S310. In step S55, other 30 ° CA processing is performed (corresponding to S311 described above).

ここで、上述のようにフローチャートを用いて説明したカウント値の監視、カウントズレが発生した場合の処理に関して、図10〜図12を用いて説明する。   Here, the monitoring of the count value described with reference to the flowchart as described above, and the processing when the count deviation occurs will be described with reference to FIGS.

上述のように、第1マイコン10は、CPS制御における主機能を備えている。よって、第1マイコン10は、第2マイコン40よりも処理負荷が高い傾向がある。よって、第1マイコン10は、処理抜けや処理遅れの発生によりクランクカウンタ31が意図したタイミングでカウントアップしないことがある。   As described above, the first microcomputer 10 has a main function in CPS control. Therefore, the first microcomputer 10 tends to have a higher processing load than the second microcomputer 40. Accordingly, the first microcomputer 10 may not count up at the timing intended by the crank counter 31 due to processing omission or processing delay.

図10は、このように第1マイコン10での処理抜けによるズレ発生時の図面である。図10におけるタイミングt8で処理抜けが発生した場合、クランクカウンタ31は、カウントアップすべきタイミングであるにもかかわらずカウントアップしない。よって、クランクカウンタ61のカウント値は「2」から「3」にカウントアップされているのに対して、クランクカウンタ31のカウント値は「2」のままである。このようにして、カウントズレが発生する。   FIG. 10 is a drawing at the time of occurrence of a shift due to a process omission in the first microcomputer 10 as described above. When the processing omission occurs at timing t8 in FIG. 10, the crank counter 31 does not count up even though it is the timing to count up. Therefore, while the count value of the crank counter 61 is counted up from “2” to “3”, the count value of the crank counter 31 remains “2”. In this way, a count shift occurs.

なお、タイミングt8で処理抜けが発生した場合、図10におけるクランクカウンタ61のカウント値が「3」になる30°CA処理では、受信値メモリ62の値が「2」→「FF」に更新された後、「3」に更新されること無く「FF」のままになる。これは、第2マイコン40は、図5に示すように、受信した値を受信値メモリ62に格納すると共に、図6に示すように、第1メモリ配列63と第2メモリ配列64の各要素を更新した後に、受信値メモリ62を初期化するものである。そして、タイミングt8で処理抜けが発生すると、第1マイコン10は、クランクカウンタ31のカウントアップ、第2マイコン40へのカウント値の送信を行わないためである。   Note that, when a process omission occurs at timing t8, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 10 becomes “3”, the value of the received value memory 62 is updated from “2” to “FF”. After that, it remains “FF” without being updated to “3”. The second microcomputer 40 stores the received value in the received value memory 62 as shown in FIG. 5, and each element of the first memory array 63 and the second memory array 64 as shown in FIG. Is updated, the received value memory 62 is initialized. This is because when the process omission occurs at timing t8, the first microcomputer 10 does not count up the crank counter 31 and transmit the count value to the second microcomputer 40.

これに伴って、図10におけるクランクカウンタ61のカウント値が「4」になる30°CA処理では、第1要素641に「3」、第2要素642に「2」、第3要素643に「1」が格納される。しかしながら、第1メモリ配列63では、第1要素631に「FF」、第2要素632に「2」、第3要素633に「1」が格納される。   Accordingly, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 10 becomes “4”, “3” is set in the first element 641, “2” is set in the second element 642, and “3” is set in the third element 643. 1 "is stored. However, in the first memory array 63, “FF” is stored in the first element 631, “2” is stored in the second element 632, and “1” is stored in the third element 633.

同様に、図10におけるクランクカウンタ61のカウント値が「5」になる30°CA処理では、第1要素641に「4」、第2要素642に「3」、第3要素643に「2」が格納される。しかしながら、第1メモリ配列63では、第1要素631に「3」、第2要素632に「FF」、第3要素633に「2」が格納される。この図10からも明らかなように、処理抜けが発生すると、第1メモリ配列63の各要素と、第2メモリ配列64の各要素にズレが生じることになる。   Similarly, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 10 is “5”, the first element 641 is “4”, the second element 642 is “3”, and the third element 643 is “2”. Is stored. However, in the first memory array 63, “3” is stored in the first element 631, “FF” is stored in the second element 632, and “2” is stored in the third element 633. As apparent from FIG. 10, when a process omission occurs, a deviation occurs between each element of the first memory array 63 and each element of the second memory array 64.

その後、第2マイコン40は、TDCタイミングにおいて、図7のフローチャートで説明したメモリ配列比較処理を実行する。図10におけるTDCタイミングでは、第1メモリ配列63の第3要素633に「FF」が格納されている。よって、図7のS31でYES判定がなされることになる。つまり、第2マイコン40は、メモリ配列比較処理によって、カウントズレを検出することができる。   Thereafter, the second microcomputer 40 executes the memory array comparison process described in the flowchart of FIG. 7 at the TDC timing. At the TDC timing in FIG. 10, “FF” is stored in the third element 633 of the first memory array 63. Therefore, a YES determination is made in S31 of FIG. That is, the second microcomputer 40 can detect the count shift by the memory arrangement comparison process.

このように、第2マイコン40は、カウントズレを検出すると、タイミングt5で示すように、クランクカウンタ61のカウント値(補正値)を第2通信102で第1マイコン10に送信する(図7のS34)。一方、第1マイコン10は、第2マイコン40からカウント値を受信すると、タイミングt6で示すように補正値メモリ32に第2マイコン40から受信したカウント値を格納する。   As described above, when the second microcomputer 40 detects the count deviation, the second microcomputer 40 transmits the count value (correction value) of the crank counter 61 to the first microcomputer 10 through the second communication 102 (see FIG. 7). S34). On the other hand, when receiving the count value from the second microcomputer 40, the first microcomputer 10 stores the count value received from the second microcomputer 40 in the correction value memory 32 as indicated by the timing t6.

そして、第1マイコン10は、直後の30°CA処理にて、図9に示す処理を実行する。つまり、補正処理S308を行い、その後に通常のクランクカウンタ31の更新処理S309を行う。これによって、第1マイコン10のカウント値と第2マイコン40のカウント値とを一致させることができる。   Then, the first microcomputer 10 performs the process shown in FIG. 9 in the immediately subsequent 30 ° CA process. That is, correction processing S308 is performed, and then normal crank counter 31 update processing S309 is performed. As a result, the count value of the first microcomputer 10 and the count value of the second microcomputer 40 can be matched.

なお、このように、TDCタイミングの直後の30°CAタイミングにて補正するため、次の気筒の噴射制御や点火制御、失火検出の開始前に補正完了できる。従って、カウントズレによる意図せぬ問題の影響範囲を抑えることが可能である。   Since correction is performed at the 30 ° CA timing immediately after the TDC timing in this way, the correction can be completed before the start of injection control, ignition control, and misfire detection of the next cylinder. Therefore, it is possible to suppress the range of influence of an unintended problem due to the count shift.

また、ECU100は、ノイズを受けやすい環境に搭載されることもある。クランクカウンタ31,61は、ノイズを受けると意図しないタイミングでカウントアップしてしまうこともある。   Further, ECU 100 may be mounted in an environment that is susceptible to noise. The crank counters 31 and 61 may count up at an unintended timing when receiving noise.

図11は、クランクカウンタ31が意図しないタイミングでカウントアップした時の図面である。図11におけるタイミングt9でノイズを受けた場合、クランクカウンタ31は、カウントアップすべきタイミングでないにもかかわらずカウントアップする。より詳細には、第1マイコン10は、ノイズ信号が入力された場合、このノイズ信号をクランクセンサ220のクランクセンサ入力信号と誤検出して30°CA処理をスタートする。これによって、クランクカウンタ31は、クランクセンサ入力信号が入力されていないのにカウントアップすることになる。よって、図11に示すように、クランクカウンタ61のカウント値は「3」のままであるのに対して、クランクカウンタ31のカウント値は「3」から「4」にカウントアップしている。このようにして、カウントズレが発生する。   FIG. 11 is a diagram when the crank counter 31 counts up at an unintended timing. When the noise is received at timing t9 in FIG. 11, the crank counter 31 counts up although it is not the timing to count up. More specifically, when a noise signal is input, the first microcomputer 10 erroneously detects the noise signal as a crank sensor input signal of the crank sensor 220 and starts the 30 ° CA process. As a result, the crank counter 31 counts up even though no crank sensor input signal is input. Accordingly, as shown in FIG. 11, the count value of the crank counter 61 remains “3”, whereas the count value of the crank counter 31 is incremented from “3” to “4”. In this way, a count shift occurs.

なお、タイミングt9でクランクカウンタ31が意図しないタイミングでカウントアップをした場合、図11におけるクランクカウンタ61のカウント値が「3」になる30°CA処理では、受信値メモリ62の値が「2」→「FF」→「3」に更新された後、更に「4」に更新されることになる。これは、第2マイコン40は、図5に示すように、受信した値を受信値メモリ62に格納するものである。そして、第1マイコン10は、図9に示すように、30°CA処理でクランクカウンタ31がカウントアップし、カウントアップしたカウント値を第2マイコン40に送信するためである。   When the crank counter 31 counts up at an unintended timing at timing t9, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 11 is “3”, the value of the received value memory 62 is “2”. After being updated from “FF” to “3”, it is further updated to “4”. The second microcomputer 40 stores the received value in the received value memory 62 as shown in FIG. Then, as shown in FIG. 9, the first microcomputer 10 is for the crank counter 31 to count up by 30 ° CA processing and to transmit the counted value to the second microcomputer 40.

これに伴って、図11におけるクランクカウンタ61のカウント値が「4」になる30°CA処理では、第1要素641に「3」、第2要素642に「2」、第3要素643に「1」が格納される。しかしながら、第1メモリ配列63では、第1要素631に「4」、第2要素632に「2」、第3要素633に「1」が格納される。   Accordingly, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 11 becomes “4”, “3” is set for the first element 641, “2” is set for the second element 642, and “3” is set for the third element 643. 1 "is stored. However, in the first memory array 63, “4” is stored in the first element 631, “2” is stored in the second element 632, and “1” is stored in the third element 633.

同様に、図11におけるクランクカウンタ61のカウント値が「5」になる30°CA処理では、第1要素641に「4」、第2要素642に「3」、第3要素643に「2」が格納される。しかしながら、第1メモリ配列63では、第1要素631に「5」、第2要素632に「4」、第3要素633に「2」が格納される。この図11からも明らかなように、意図しないタイミングでカウントアップをした場合、第1メモリ配列63の各要素と、第2メモリ配列64の各要素にズレが生じることになる。   Similarly, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 11 is “5”, the first element 641 is “4”, the second element 642 is “3”, and the third element 643 is “2”. Is stored. However, in the first memory array 63, “5” is stored in the first element 631, “4” is stored in the second element 632, and “2” is stored in the third element 633. As can be seen from FIG. 11, when the count-up is performed at an unintended timing, a deviation occurs between each element of the first memory array 63 and each element of the second memory array 64.

その後、第2マイコン40は、TDCタイミングにおいて、図7のフローチャートで説明したメモリ配列比較処理を実行する。図11におけるTDCタイミングでは、第1要素641に「5」、第2要素642に「4」、第3要素643に「3」が格納されており、第1要素631に「6」、第2要素632に「5」、第3要素633に「4」が格納されている。この各要素同士を比較すると、図7のS33でNO判定がなされることになる。つまり、第2マイコン40は、メモリ配列比較処理によって、カウントズレを検出することができる。なお、第1マイコン10及び第2マイコン40におけるメモリ配列比較処理後の処理は、図10の例の場合と同様であるため説明を省略する。   Thereafter, the second microcomputer 40 executes the memory array comparison process described in the flowchart of FIG. 7 at the TDC timing. At the TDC timing in FIG. 11, “5” is stored in the first element 641, “4” is stored in the second element 642, “3” is stored in the third element 643, “6” is stored in the first element 631, “5” is stored in the element 632, and “4” is stored in the third element 633. When these elements are compared with each other, a NO determination is made in S33 of FIG. That is, the second microcomputer 40 can detect the count shift by the memory arrangement comparison process. The processing after the memory arrangement comparison processing in the first microcomputer 10 and the second microcomputer 40 is the same as that in the example of FIG.

図12は、クランクカウンタ61が意図しないタイミングでカウントアップした時の図面である。図12におけるタイミングt10でノイズを受けた場合、クランクカウンタ61は、カウントアップすべきタイミングでないにもかかわらずカウントアップする。より詳細には、第2マイコン40は、ノイズ信号が入力された場合、このノイズ信号をクランクセンサ220のクランクセンサ入力信号と誤検出して30°CA処理をスタートする。これによって、クランクカウンタ61は、クランクセンサ入力信号が入力されていないのにカウントアップすることになる。よって、図12に示すように、クランクカウンタ31のカウント値は「3」のままであるのに対して、クランクカウンタ61のカウント値は「3」から「4」にカウントアップしている。このようにして、カウントズレが発生する。   FIG. 12 is a drawing when the crank counter 61 counts up at an unintended timing. When noise is received at timing t10 in FIG. 12, the crank counter 61 counts up even though it is not the timing to count up. More specifically, when a noise signal is input, the second microcomputer 40 erroneously detects the noise signal as a crank sensor input signal of the crank sensor 220 and starts the 30 ° CA process. As a result, the crank counter 61 counts up even though no crank sensor input signal is input. Accordingly, as shown in FIG. 12, the count value of the crank counter 31 remains “3”, whereas the count value of the crank counter 61 is incremented from “3” to “4”. In this way, a count shift occurs.

なお、第2マイコン40は、ノイズ信号を誤検出した場合、タイミングt10でスタートする30°CA処理において、メモリ配列への格納処理S302、及びクランクカウンタ61の更新処理S303を行う。
また、クランクカウンタ61のカウント値が「4」になる30°CA処理中は、第1マイコン10は、30°CA処理をスタートせず、カウント値の送信も行わない。よって、図12におけるクランクカウンタ61のカウント値が「4」になる30°CA処理では、受信値メモリ62の値が「3」→「FF」に更新されることになる。
When the second microcomputer 40 erroneously detects a noise signal, the second microcomputer 40 performs storage processing S302 in the memory array and update processing S303 of the crank counter 61 in the 30 ° CA processing that starts at timing t10.
Further, during the 30 ° CA process in which the count value of the crank counter 61 is “4”, the first microcomputer 10 does not start the 30 ° CA process and does not transmit the count value. Therefore, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 12 is “4”, the value in the reception value memory 62 is updated from “3” to “FF”.

これに伴って、図12におけるクランクカウンタ61のカウント値が「5」になる30°CA処理では、第1要素641に「4」、第2要素642に「3」、第3要素643に「2」が格納される。しかしながら、第1メモリ配列63では、第1要素631に「FF」、第2要素632に「3」、第3要素633に「2」が格納される。この図12からも明らかなように、意図しないタイミングでカウントアップをした場合、第1メモリ配列63の各要素と、第2メモリ配列64の各要素にズレが生じることになる。   Accordingly, in the 30 ° CA process in which the count value of the crank counter 61 in FIG. 12 becomes “5”, “4” is assigned to the first element 641, “3” is assigned to the second element 642, and “3” is assigned to the third element 643. 2 "is stored. However, in the first memory array 63, “FF” is stored in the first element 631, “3” is stored in the second element 632, and “2” is stored in the third element 633. As is clear from FIG. 12, when the count-up is performed at an unintended timing, a deviation occurs between each element of the first memory array 63 and each element of the second memory array 64.

なお、第2マイコン40におけるTDCタイミングでのメモリ配列比較処理、及び第1マイコン10及び第2マイコン40におけるメモリ配列比較処理後の処理は、図10の例の場合と同様であるため説明を省略する。   The memory arrangement comparison process at the TDC timing in the second microcomputer 40 and the process after the memory arrangement comparison process in the first microcomputer 10 and the second microcomputer 40 are the same as those in the example of FIG. To do.

ところで、ECU100は、同一のクランクセンサ220の入力信号を使用しているため、第1マイコン10と第2マイコン40の同様にノイズ信号が入力されることも想定できる。しかしながら、本実施形態におけるECU100は、第1マイコン10と第2マイコン40のカウント値を一致させることが目的である。よって、第1マイコン10と第2マイコン40のカウント値が一致していれば、ズレ発生を検出する必要はない。   By the way, since the ECU 100 uses the same input signal of the crank sensor 220, it can be assumed that a noise signal is input similarly to the first microcomputer 10 and the second microcomputer 40. However, the purpose of the ECU 100 in the present embodiment is to match the count values of the first microcomputer 10 and the second microcomputer 40. Therefore, if the count values of the first microcomputer 10 and the second microcomputer 40 match, it is not necessary to detect the occurrence of deviation.

ここまで説明したように、第1マイコン10は、30°CA間隔(予め設定された360°CA間隔よりも短い間隔)でクランクカウンタ31のカウント値を送信する。そして、一方、第2マイコン40は、クランクカウンタ61のカウント値と、取得したクランクカウンタ31のカウント値とを比較することで、カウントズレが発生しているか否かを監視する。つまり、ECU100は、取得したクランクカウンタ31のカウント値を用いて、カウントズレが発生しているか否かを監視するので、従来技術のように欠歯部の個数に関係なく、360°CA間隔よりも短い間隔(細かい間隔)で監視することができる。   As described so far, the first microcomputer 10 transmits the count value of the crank counter 31 at 30 ° CA intervals (an interval shorter than a preset 360 ° CA interval). On the other hand, the second microcomputer 40 compares the count value of the crank counter 61 with the acquired count value of the crank counter 31 to monitor whether or not a count shift has occurred. That is, since the ECU 100 monitors whether or not the count deviation has occurred using the acquired count value of the crank counter 31, the ECU 100 starts from the 360 ° CA interval regardless of the number of missing teeth as in the prior art. Can be monitored at short intervals (fine intervals).

なお、上述のように、CPS制御においては、クランクカウンタ31,61によるタイミングによって制御されている。よって、カウントズレが発生した場合、第1マイコン10は、自身での点火補正演算や噴射補正演算までに、第2マイコン40における最新の筒内状態量の算出や筒内状態量の送信が間に合わず、本来使用すべき筒内状態量が取得できない可能性がある。また、第1マイコン10は、クランクカウンタ31のカウント値とクランクカウンタ61のカウント値とが大きくズレた場合、別気筒の筒内状態量を使用してしまうこともありうる。これにより、第1マイコン10は、結果的に最適な目標空燃比からはずれた噴射量や点火時期を算出しアクチュエータを駆動することとなり、異常燃焼など意図せぬ問題が生じる可能性がある。   As described above, the CPS control is controlled by the timings of the crank counters 31 and 61. Therefore, when the count deviation occurs, the first microcomputer 10 is in time for the latest calculation of the in-cylinder state quantity and the transmission of the in-cylinder state quantity in time by the ignition correction calculation and the injection correction calculation by itself. Therefore, there is a possibility that the in-cylinder state quantity to be originally used cannot be acquired. Further, when the count value of the crank counter 31 and the count value of the crank counter 61 greatly deviate, the first microcomputer 10 may use the in-cylinder state quantity of another cylinder. As a result, the first microcomputer 10 eventually calculates the injection amount and ignition timing deviating from the optimum target air-fuel ratio and drives the actuator, which may cause unintended problems such as abnormal combustion.

しかしながら、ECU100は、TDC毎のタイミングで各マイコンでのクランクカウンタ31,61のカウント値を比較し、カウントズレが発生していれば、カウントズレを補正するので、新たに高機能なマイコンや監視用のマイコンを用いることなく、カウントズレに伴う異常燃焼などの意図せぬ問題を早急に解消することができる。   However, the ECU 100 compares the count values of the crank counters 31 and 61 in each microcomputer at the timing of each TDC, and corrects the count deviation if a count deviation occurs. Unnecessary problems such as abnormal combustion due to count shift can be solved quickly without using a microcomputer for the purpose.

以上、本発明の好ましい実施形態について説明したが、本発明は上述した実施形態に何ら制限されることはなく、本発明の趣旨を逸脱しない範囲において、種々の変形が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not restrict | limited to the embodiment mentioned above at all, and various deformation | transformation are possible in the range which does not deviate from the meaning of this invention.

なお、本実施形態では、CPS制御を2マイコン10,40で協調制御するECU100を採用した。しかしながら、本発明はこれに限定されるものではない。本発明は、二つのマイコンで協調制御する構成であれば適用することができる。   In the present embodiment, the ECU 100 is employed in which the CPS control is cooperatively controlled by the two microcomputers 10 and 40. However, the present invention is not limited to this. The present invention can be applied to any configuration in which two microcomputers perform coordinated control.

10 第1マイコン、20 処理部、21 点火制御部、22 噴射制御部、23 失火検出部、30 メモリ空間、31 クランクカウンタ、32 クランクカウンタ補正値メモリ、33 通信異常メモリ、34 ズレ発生メモリ、40 第2マイコン、50 処理部、51 筒内状態量算出部、52 センサ異常判定部、60 メモリ空間、61 クランクカウンタ、62 クランクカウンタ受信値メモリ、63 第1メモリ配列、631 第1要素、632 第2要素、633 第3要素、64 第2メモリ配列、641 第1要素、642 第2要素、643 第3要素、65 通信異常メモリ、66 ズレ発生メモリ、100 ECU、210 気筒内圧センサ、220 クランクセンサ、310 イグナイタ、320 インジェクタ、330 異常警告部   10 first microcomputer, 20 processing unit, 21 ignition control unit, 22 injection control unit, 23 misfire detection unit, 30 memory space, 31 crank counter, 32 crank counter correction value memory, 33 communication abnormality memory, 34 deviation occurrence memory, 40 Second microcomputer, 50 processing section, 51 cylinder state quantity calculation section, 52 sensor abnormality determination section, 60 memory space, 61 crank counter, 62 crank counter received value memory, 63 first memory array, 631 first element, 632 first 2 elements, 633 3rd element, 64 2nd memory array, 641 1st element, 642 2nd element, 643 3rd element, 65 communication abnormality memory, 66 deviation occurrence memory, 100 ECU, 210 cylinder internal pressure sensor, 220 crank sensor , 310 Igniter, 320 Injector, 330 Abnormal warning

Claims (8)

協調制御を行う第1処理装置(10)と第2処理装置(40)とを備え、クランクセンサ(220)からクランクシャフトの回転に応じたクランク角信号が入力される電子制御装置であって、
前記第2処理装置は、
前記第1処理装置と通信を行う第2通信手段(S34,S305)と、
前記クランクセンサから出力されたクランク角信号をカウントする第2クランクカウンタ(61,S25,S303)と、
前記第2クランクカウンタのカウント値に同期して処理を実行するものであり、前記第1処理装置が実行する処理に必要な処理用信号を生成し、前記第2通信手段にて前記処理用信号を送信する第2処理部(50)と、を含み、
前記第1処理装置は、
前記第2処理装置と通信を行う第1通信手段(S54,S310)と、
前記クランクセンサから出力されたクランク角信号をカウントする第1クランクカウンタ(31,S53,S309)と、
前記第1クランクカウンタのカウント値に同期して処理を実行するものであり、前記第1通信手段を介して取得した前記処理用信号に基づいて処理を実行する第1処理部(20)と、を含み、
前記第1通信手段は、予め設定された360°CA間隔よりも短い間隔で前記第1クランクカウンタのカウント値を送信するものであり、
前記第2処理装置は、予め設定された360°CA間隔よりも短い間隔で、前記第2クランクカウンタのカウント値と、前記第2通信手段にて取得した前記第1クランクカウンタのカウント値とを比較することで、前記第2クランクカウンタのカウント値と前記第1クランクカウンタのカウント値とにズレが発生しているか否かを監視する監視手段(S304)と、を備えていることを特徴とする電子制御装置。
An electronic control device comprising a first processing device (10) and a second processing device (40) for performing cooperative control, wherein a crank angle signal corresponding to rotation of a crankshaft is input from a crank sensor (220),
The second processing device includes:
Second communication means (S34, S305) for communicating with the first processing device;
A second crank counter (61, S25, S303) for counting a crank angle signal output from the crank sensor;
Processing is executed in synchronization with the count value of the second crank counter, a processing signal necessary for processing executed by the first processing device is generated, and the processing signal is generated by the second communication means. A second processing unit (50) for transmitting
The first processing device includes:
First communication means (S54, S310) for communicating with the second processing device;
A first crank counter (31, S53, S309) for counting a crank angle signal output from the crank sensor;
A first processing unit (20) that performs processing in synchronization with a count value of the first crank counter, and that performs processing based on the processing signal acquired via the first communication means; Including
The first communication means transmits the count value of the first crank counter at an interval shorter than a preset 360 ° CA interval,
The second processing device calculates the count value of the second crank counter and the count value of the first crank counter acquired by the second communication means at an interval shorter than a preset 360 ° CA interval. And a monitoring unit (S304) for monitoring whether or not a deviation occurs between the count value of the second crank counter and the count value of the first crank counter by comparing. Electronic control device.
前記第2通信手段は、前記監視手段にてズレが発生していることが検出された場合、前記第2クランクカウンタのカウント値を補正値として送信する送信手段(S305,S34)を含み、
前記第1通信手段は、前記第2通信手段から送信された補正値を受信する受信手段(S307)を含むものであり、
前記第1処理装置は、前記第1クランクカウンタのカウント値を、前記受信手段にて受信した補正値で補正する補正手段(S308,S51)を備えていることを特徴とする請求項1に記載の電子制御装置。
The second communication means includes transmission means (S305, S34) for transmitting the count value of the second crank counter as a correction value when the monitoring means detects that a deviation has occurred,
The first communication means includes reception means (S307) for receiving the correction value transmitted from the second communication means,
The said 1st processing apparatus is provided with the correction | amendment means (S308, S51) which correct | amends the count value of a said 1st crank counter with the correction value received in the said receiving means. Electronic control unit.
前記第1通信手段は、前記第1クランクカウンタのカウント値に同期して通信を行なうものであり、
前記第2通信手段は、前記第2クランクカウンタのカウント値に同期して通信を行うことを特徴とする請求項1又は2に記載の電子制御装置。
The first communication means performs communication in synchronization with a count value of the first crank counter,
The electronic control device according to claim 1, wherein the second communication unit performs communication in synchronization with a count value of the second crank counter.
前記監視手段は、内燃機関の各気筒における上死点で比較を行うことを特徴とする請求項1乃至3のいずれか一項に記載の電子制御装置。   The electronic control device according to claim 1, wherein the monitoring unit performs comparison at a top dead center in each cylinder of the internal combustion engine. 前記第2処理装置は、
前記第2通信手段にて取得した前記第1クランクカウンタのカウント値を記憶する第1記憶手段(63)と、
前記第2クランクカウンタのカウント値を記憶する第2記憶手段(64)と、を備え、
前記監視手段は、前記第1記憶手段に記憶されたカウント値と、前記第2記憶手段に記憶されたカウント値とを比較することを特徴とする請求項1乃至4のいずれか一項に記載の電子制御装置。
The second processing device includes:
First storage means (63) for storing the count value of the first crank counter acquired by the second communication means;
Second storage means (64) for storing the count value of the second crank counter,
5. The monitoring unit according to claim 1, wherein the monitoring unit compares the count value stored in the first storage unit with the count value stored in the second storage unit. 6. Electronic control unit.
前記第2処理装置は、前記第1処理装置よりも協調制御における処理負荷が軽くなるように設定されていることを特徴とする請求項1乃至5のいずれか一項に記載の電子制御装置。   6. The electronic control device according to claim 1, wherein the second processing device is set so that a processing load in cooperative control is lighter than that of the first processing device. 7. 前記第1処理装置は、前記第2クランクカウンタのカウント値と前記第1クランクカウンタのカウント値とにズレが発生した場合、ズレが発生したことを記憶する第1ズレ記憶手段(34,S43)を備え、
第2処理装置は、前記第2クランクカウンタのカウント値と前記第1クランクカウンタのカウント値とにズレが発生した場合、ズレが発生したことを記憶する第2ズレ記憶手段(66,S35)を備えていることを特徴とする請求項1乃至請求項6のいずれか一項に記載の電子制御装置。
The first processing device stores first deviation storage means (34, S43) for storing the occurrence of deviation when deviation occurs between the count value of the second crank counter and the count value of the first crank counter. With
The second processing device includes second deviation storage means (66, S35) for storing the occurrence of deviation when a deviation occurs between the count value of the second crank counter and the count value of the first crank counter. The electronic control device according to claim 1, further comprising: an electronic control device according to claim 1.
前記第1処理装置と前記第2処理装置とは、内燃機関の各気筒における圧力を検出する気筒内圧センサからの検出信号に基づいて、前記内燃機関を協調制御することを特徴とする請求項1乃至請求項7のいずれか一項に記載の電子制御装置。   2. The first processing device and the second processing device perform coordinated control of the internal combustion engine based on a detection signal from a cylinder pressure sensor that detects pressure in each cylinder of the internal combustion engine. The electronic control device according to claim 1.
JP2012193247A 2012-09-03 2012-09-03 Electronic control unit Active JP5803853B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012193247A JP5803853B2 (en) 2012-09-03 2012-09-03 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012193247A JP5803853B2 (en) 2012-09-03 2012-09-03 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2014047752A JP2014047752A (en) 2014-03-17
JP5803853B2 true JP5803853B2 (en) 2015-11-04

Family

ID=50607677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012193247A Active JP5803853B2 (en) 2012-09-03 2012-09-03 Electronic control unit

Country Status (1)

Country Link
JP (1) JP5803853B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6565660B2 (en) * 2015-12-16 2019-08-28 株式会社デンソー Electronic control unit

Also Published As

Publication number Publication date
JP2014047752A (en) 2014-03-17

Similar Documents

Publication Publication Date Title
US7844390B2 (en) Method of operating an engine upon occurrence of abnormal combustion and operation control apparatus therefor
KR101566733B1 (en) Method and apparatus for misfire detection by rev count of vehicle engine
JP2016186309A (en) Control device
US10557426B2 (en) Engine control method and apparatus for determining whether injector malfunctions considering influence of air compressor
JP5803853B2 (en) Electronic control unit
US9153081B2 (en) Counter apparatus
US9771885B2 (en) Engine control apparatus
CN108223166B (en) Method for preventing catalyst from being damaged by ignition timing correction
US11268464B2 (en) Engine control unit (ECU) and method to adapt the ECU for trigger wheel irregularities
CN109751143B (en) Method for compensating for noise of crank sensor
US10513258B2 (en) Device for controlling hybrid vehicle and method for controlling hybrid vehicle
JP5783143B2 (en) Engine control device
JP5948230B2 (en) In-vehicle control device
JP6565660B2 (en) Electronic control unit
US9719480B2 (en) Method for controlling the triggering of ignition in an internal combustion engine
US9760163B2 (en) Sensor signal processor
KR102586926B1 (en) Advanced Engine Combustion Method and Engine Ignition Output System Thereof
US9518888B2 (en) Method for ascertaining an offset of an output signal of an evaluation circuit integrated in a sensor, preferably of a pressure sensor installed in a combustion chamber of an internal combustion engine, and sensor
JP5357849B2 (en) Internal combustion engine diagnostic device and internal combustion engine diagnostic method
JP5127898B2 (en) Internal combustion engine diagnostic device and internal combustion engine diagnostic method
KR101605640B1 (en) Apparatus and method for prevention worng-diagnosis of cam position sensor
KR102463466B1 (en) Method for Engine Start Control Based on Fail Safe Logic and Vehicle thereof
KR101489605B1 (en) Method for detecting error on assembling injector connector
JP6237387B2 (en) Electronic control system and electronic device
JP2014096042A (en) Electronic control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150716

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150817

R151 Written notification of patent or utility model registration

Ref document number: 5803853

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250