JP2004348274A - Diagnostic device for communication failure - Google Patents

Diagnostic device for communication failure Download PDF

Info

Publication number
JP2004348274A
JP2004348274A JP2003142500A JP2003142500A JP2004348274A JP 2004348274 A JP2004348274 A JP 2004348274A JP 2003142500 A JP2003142500 A JP 2003142500A JP 2003142500 A JP2003142500 A JP 2003142500A JP 2004348274 A JP2004348274 A JP 2004348274A
Authority
JP
Japan
Prior art keywords
error
failure
communication
state
bus
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.)
Pending
Application number
JP2003142500A
Other languages
Japanese (ja)
Inventor
Takayuki Shimizu
貴之 清水
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.)
Subaru Corp
Original Assignee
Fuji Heavy Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Heavy Industries Ltd filed Critical Fuji Heavy Industries Ltd
Priority to JP2003142500A priority Critical patent/JP2004348274A/en
Publication of JP2004348274A publication Critical patent/JP2004348274A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To enhance the reliability of a diagnosis by appropriately determining continuing errors for reliable detection of failure without being affected by a recovery function which tries to recover to a normal state when an error status in which sending and receiving is inhibited is started. <P>SOLUTION: The state of a CAN communication bus is monitored to see if either of the error states, error warning, error passive, or bus off, has been detected (S2). If any of the error states has been detected, a temporary failure determining flag is set to actuate a continued failure determining timer (S3). After a failure determining time has elapsed without an error-active state being detected twice in succession, a failure confirming flag showing the confirmation of failure is set (S4-S7) and a "limp-home" function is started. This avoids the influence of the recovery function of a CAN while preventing diagnostic errors due to short periods of communication errors caused by disturbance or the like, and enhancing the reliability of a diagnosis. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、送受信が禁止されるエラーステータスに遷移したときに正常状態への復帰を試みるリカバリー機能を有する通信装置における通信故障の診断装置に関する。
【0002】
【従来の技術】
近年、自動車等の車両においては、複数の電子制御ユニットを搭載してエンジン、トランスミッション、サスペンション、エアコン等の様々な制御を各ユニットで分担するようになり、これら複数のユニットを多重通信バスで接続して車内ネットワークを構成し、制御データや制御指令等のやり取りを行なうことでトータルな制御性の向上を図るようにしている。
【0003】
このような車内ネットワークは、一般に、エラーマネージメント機能に優れたCAN(Controller Area Network;コントローラ・エリア・ネットワーク)を用いて構成する場合が多く、このCANのプロトコルでは、送受信時のエラーをカウントするエラーカウンタの値により、基本的に、通信が正常である状態(エラーアクティブ状態)、通信が困難な状態(エラーパッシブ状態)、通信が不能の状態(バスオフ状態)の3つのエラーステータス(エラー状態)が規定されており、エラーカウンタ値の増減に応じてエラーアクティブ状態とエラーパッシブ状態とが可逆的に遷移し、バスオフ状態に遷移した場合には、通信バス上の送受信が禁止される。
【0004】
従って、バスオフ状態を監視することで、通信系システムの故障を判断することができるが、通信線の断線等の故障では、エラーカウンタ値が増加せずにエラーパッシブ状態が維持されるため、バスオフ状態のみの監視では故障検知が不十分となる。このため、特開2001−78535号公報には、農作業機に搭載した複数のCANコントローラ間で相互に制御データを転送する際、エラーパッシブ状態も故障と判断してCAN通信データを用いた関連制御を停止させ、エラーアクティブ状態に復帰した際には、停止させた関連制御を再開する技術が開示されている。
【0005】
【特許文献1】
特開2001−78535号公報
【0006】
【発明が解決しようとする課題】
しかしながら、診断の信頼性を高めるためには、外乱等による短時間の通信エラーを車両の故障と判定しないよう、通信異常が継続する時間を判定する必要があり、特許文献1に記載の技術のように、エラーアクティブ状態に復帰した時点で「通信異常無し」と判断して制御を再開してしまうと、継続して異常が発生している場合に、対処することができない。
【0007】
更に、CAN通信のプロトコルでは、バスオフ状態になった後、連続する規定のビットを設定回数カウントしたとき、エラーカウンタ値を一度“0”にクリアしてエラーアクティブ状態に復帰するリカバリー機能が備えられており、一度バスオフ状態になっても、短い周期でリカバリー機能が訪れ、再度通信を試みるようになっている。
【0008】
このため、図5のタイムチャートに示すように、異常が継続する時間を判定するための時間(故障判定時間)を設定し、CAN通信バスのバスオフ状態を検知したとき、異常継続時間を計時して故障を判定するためのタイマ(継続故障判定タイマ)のカウントをスタートさせても、リカバリー機能により、設定した故障判定時間よりも短い周期でエラーアクティブ状態に復帰してしまい、このリカバリー機能によるエラーアクティブ状態を検知すると、継続故障判定タイマがクリアされてしまう。従って、実際に異常が継続して発生しており、設定した故障判定時間を過ぎても、故障確定を示すフラグ(故障確定フラグ)等をセットすることができない。すなわち、異常発生のタイミングによっては、実際に故障と確定するまでの時間がばらつき、診断の信頼性が低下する。
【0009】
本発明は上記事情に鑑みてなされたもので、送受信が禁止されるエラーステータスに遷移したときに正常状態への復帰を試みるリカバリー機能に影響されることなく、継続する異常を適正に判定して確実に故障を検知し、診断の信頼性を向上することのできる通信故障の診断装置を提供することを目的としている。
【0010】
【課題を解決するための手段】
上記目的を達成するため、本発明による第1の通信故障の診断装置は、通信バスを介した送受信時のエラー発生状況に応じてエラーステータスが遷移し、送受信が禁止されるエラーステータスに遷移したとき、正常状態への復帰を試みるリカバリー機能を有する通信装置の故障診断を行う通信故障の診断装置であって、上記エラーステータスが正常状態から異常状態に遷移したとき、仮故障と判定すると共に、この仮故障の継続時間を計時する手段と、上記仮故障の継続時間が設定時間に達する前に、上記エラーステータスが正常状態へ遷移したことを連続して設定回数検出できないとき、通信故障と確定する手段とを備えたことを特徴とする。
【0011】
本発明による第2の通信故障の診断装置は、CAN通信バスを介した送受信時のエラー発生状況に応じてエラーステータスが遷移し、送受信が禁止されるバスオフ状態に上記エラーステータスが遷移したとき、エラーアクティブ状態への復帰を試みるリカバリー機能を有するCAN通信装置の故障診断を行う通信故障の診断装置であって、上記エラーステータスがエラーアクティブ状態以外に遷移したとき、仮故障と判定すると共に、この仮故障の継続時間を計時する手段と、上記仮故障の継続時間が設定時間に達する前に、上記エラーステータスがエラーアクティブ状態へ遷移したことを連続して設定回数検出できないとき、通信故障と確定する手段とを備えたことを特徴とする。
【0012】
第2の通信故障の診断装置を、複数のCAN通信装置をCAN通信バスを介して接続した車両内のネットワークに適用する場合には、ネットワーク上の何れかのノードで通信故障発生と確定したとき、リンプホーム制御の実行を指示することが望ましい。
【0013】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態を説明する。図1〜図4は本発明の実施の一形態に係わり、図1は車内LANの構成例を示す説明図、図2は車内LANに接続される各ユニット内の要部構成を示すブロック図、図3はCAN通信診断処理のフローチャート、図4はCAN通信診断のタイムチャートである。
【0014】
図1は、自動車等の車両において、車両に搭載される複数の電子制御ユニットやインテリジェント型のセンサ・アクチュエータ類等の各ノードを多重通信バスを介して互いに接続した車内LANの構成例を示す。この車内LANは、多重通信バスとして2線式のシリアル通信バスであるCAN通信バスを採用しており、高速の走行系通信網NHと低速のボディ系通信網NLとがボディ統合ユニットC1を介して接続されている。
【0015】
走行系通信網NHは、エンジン、トランスミッション、ブレーキ、サスペンション等に対する制御機能や走行状態のセンシング機能を分担する複数のユニット、すなわち、エンジンユニットC2、ATユニットC3、走行系ユニットC4,C6、走行系センサユニットC5等がCAN通信バス1Hを介して接続されて構成される。また、ボディ系通信網NLは、エアコン、パワーウィンドウ、パワーステアリング、各種メータ類やダッシュボード、キーレスエントリ等のボディ装備機器に対する制御機能を分担する車体ユニットC7〜C11がCAN通信バス1Lを介して接続されて構成されている。
【0016】
そして、通信速度の異なる走行系通信網NHとボディ系通信網NLとがゲートウェイをなすボディ統合ユニットC1を介して相互接続され、全てのノード間でのデータの送受信が可能となっている。尚、図1においては、車体ユニットC7及び車体ユニットC9には、それぞれ、専用通信バス2,3を介して車体ユニットC12,C13が接続されている。
【0017】
以上の車内LANに接続される各ユニットCn(n=1,2,…)は、マイクロコンピュータを用いて構成され、それぞれが、制御対象に対するコントローラとしての機能を有すると共にCAN通信に対するコントローラとしての機能を有している。図2に示すように、各ユニットは、各種演算処理や制御を実行するCPU100に対し、ROM101、RAM102、クロック発生器103、タイマ104、A/D変換器105、D/A変換器106等を有する一般的なマイクロコンピュータの構成に加え、CANコントローラ部107、CANドライバ108を備えている。
【0018】
ROM101には、制御プログラムや故障診断プログラム、制御用定数やマップ等の固定データが記憶されており、RAM102には、各種入力データやワークデータ等のデータが一時的に記憶される、更に、RAM102には、通常の処理領域に加え、CAN通信のための複数の受信スロット102a及び送信スロット102bを備えている。送信スロット102bは、自己のユニットからのメッセージを所定のタイミングで送信するとき、予めこれを書き込んで格納しておき、他方、受信スロット102aには、他のユニットから返送されたメッセージを格納する。
【0019】
CANコントローラ部107は、CAN通信プロトコルによる通信制御を司る部分であり、割込マスクや送受信設定のためのコントロールレジスタ、各種エラー条件やシステム状態を表すステータスレジスタ、エラー状態を管理するためのエラーカウンタ(送信エラーカウンタTEC及び受信エラーカウンタREC)等を有している。また、CANドライバ108は、CAN_HighとCAN_Lowとの2つの系統の回線からなるCAN通信バス1H(1L)を介してメッセージを送受信するためのものである。
【0020】
周知のように、CAN通信のメッセージは、メッセージの優先順位を決定すると共にメッセージの宛先・内容を識別するためのアイデンティファイアを含むデータ送信用のデータフレーム、送信要求のリモートフレーム、通信エラー検出時のエラーフレーム、受信側が受信準備未了時に出力するオーバーロードフレームの4種類であり、各フレーム毎にエラーがチェックされる。
【0021】
このエラーチェックは、送信時と受信時とで独立して実行され、エラーの検出毎に、エラーカウンタ(送信エラーカウンタTEC、受信エラーカウンタREC)のカウンタ値がインクリメントされ、正常に送受信したときには、カウンタ値がデクリメントされる。エラーカウンタの値は、ステータスレジスタに反映され、以下に示すように、CAN通信のエラーステータスが変化する。
【0022】
(1)エラーアクティブ状態
送信エラーカウンタTEC及び受信エラーカウンタの値が共に0〜127であり、正常に通信を行える状態である。
【0023】
(2)エラーパッシブ状態(エラーワーニング状態)
送信エラーカウンタTEC或いは受信エラーカウンタRECの値が128〜255であり、エラー頻度の高い状態である。尚、CANプロトコルによっては、エラーパッシブ状態に代えて、送信エラーカウンタTEC或いは受信エラーカウンタRECの値が96〜255の状態をエラーワーニング状態として採用する場合もある。
【0024】
(3)バスオフ状態
送信エラーカウンタTECの値が256〜となった状態であり、バス上の送受信が禁止される。
【0025】
この場合、エラーアクティブ状態とエラーパッシブ状態とは、エラーカウンタ値の上下変動に応じて相互に遷移することができるが、CAN_HighとCAN_Lowとの短絡等のように、バスオフ状態に至るような故障の場合には、通信不能となる。しかしながら、CANプロトコルでは、CAN通信バス上に連続した規定のビットを設定回数(例えば、11ビットのレセッシブビットを128回)検出すると、エラーカウンタを一度“0”にクリアし、エラーアクティブ状態に復帰するリカバリー機能を有している。
【0026】
このため、各ユニットのCPU100では、CAN通信のエラーステータスの遷移を監視し、正常状態(エラーアクティブ)から異常状態(エラーワーニング、エラーパッシブ、バスオフ)に遷移したときには、仮故障と判定してフラグをセットし、この仮故障のフラグがセットされている継続時間を計時する。そして、仮故障の継続時間が設定した故障判定時間に達する前に、エラーアクティブ状態に遷移したことを連続して設定回数検出できないときに、通信故障と確定することで、誤診断を回避して確実に故障を検知し、診断の信頼性を向上する。
【0027】
以下、各ユニットのCPU100によって実行されるCAN通信診断処理について、図3に示すフローチャートを用いて説明する。
【0028】
このCAN通信診断処理では、CANコントローラ部107がCAN通信を開始すると、先ず、ステップS1で、車両の状態に応じた診断実行条件が成立するか否かを調べ、診断実行条件成立後にCAN通信の診断を開始する。診断実行条件としては、例えば、システムの初期化が完了して起動状態にあり、各機器の電源電圧が動作保証電圧範囲内にある条件等である。
【0029】
次に、ステップS2へ進み、CANコントローラ部107のステータスレジスタ(或いはエラーカウンタ)を参照してCAN通信バスの状態を監視し、その監視結果、エラーワーニング、エラーパッシブ、バスオフの何れかの異常状態を検出したか否かを調べる。そして、バス状態の監視結果、エラーワーニング状態、エラーパッシブ状態、バスオフ状態の何れも検出せず、通信が正常に行われている状態(エラーアクティブ状態)であるときには、ステップS2でのバス状態の監視ループを、設定サンプリング時間毎に繰返す。このサンプリング時間は、CANのリカバリー機能によるバスオフ状態からエラーアクティブ状態への復帰時間に対して十分短い時間に設定され、例えば、リカバリー機能によるエラーアクティブ状態への復帰時間を4msとすると、サンプリング時間は1msに設定される。
【0030】
また、ステップS2でのバス状態の監視結果、エラーワーニング状態、エラーパッシブ状態、バスオフ状態の何れかを検出したときには、ステップS2からステップS3へ進んで、仮故障判定フラグFLGRをセットし(FLGR←1)、継続故障判定タイマTMによる計時をスタートする。仮故障判定フラグFLGRは、CANコントローラ部107が検出したエラーを受けてセットされるものであり、エラーが一時的なものではなく継続し、車両として必要な措置を講じなければならない故障と確定する前の仮判定状態を示す。そして、この仮故障判定フラグFLGRがセットされた状態の継続時間を、継続故障判定タイマTMで計時する。
【0031】
次いで、ステップS4へ進み、バス状態の監視結果、設定回数連続してエラーアクティブ状態を検出したか否かを調べる。この設定回数は、CANのリカバリー機能によるバスオフ状態からエラーアクティブ状態への復帰時間と、バス状態の監視周期のサンプリング時間との関係に基づいて設定され、異常が継続していないと判断することのできる回数、例えば、リカバリー機能によるエラーアクティブ状態への復帰時間を4ms、サンプリング時間を1msとした場合、2回に設定される。
【0032】
そして、エラーアクティブ状態を2回連続して検出したときには、バス状態がCANのリカバリー機能による一時的な正常状態への復帰ではなく完全に正常状態に復帰したものと判断し、ステップS4からステップS5へ進んで仮故障判定フラグFLGR及び継続故障判定タイマTMを共にクリア(FLGR←0、TM←0)した後、ステップS2へ戻ってバス状態の監視を続ける。
【0033】
また、ステップS4において、エラーアクティブ状態を2回連続して検出していないときには、ステップS4からステップS6へ進み、継続故障判定タイマTMの値が予め設定した故障判定時間を経過したか否かを調べる。そして、故障判定時間が経過していないときには、ステップS6からステップS4へ戻り、再度、バス状態の監視結果がエラーアクティブ状態を連続して2回検出したか否かを調べる。そして、ステップS4でエラーアクティブ状態を連続して2回検出することなく。ステップS6で故障判定時間が経過したときには、一時的な異常ではなく異常が継続している故障状態と判定してステップS6からステップS7へ進む。
【0034】
ステップS7では、故障確定を示す故障確定フラグFLGEをセットし(FLGE←1)、リンプホーム機能に入る。このリンプホーム機能では、例えば、燃料噴射量及び点火時期を所定のフェイルセーフ値に設定する等して必要最低限の走行性能を確保する。
【0035】
すなわち、図4のタイムチャートに示すように、CANのリカバリー機能を考慮してバス状態の監視周期を短くし、バスオフ状態に至るような異常を検知したとき、仮故障判定フラグFLGRをセットして継続時間を計時する。仮故障判定フラグFLGRがセットされた後は、設定回数連続して正常判定(エラーアクティブ検出)がなされない限りクリアされず(システムリセット時を除く)、仮故障判定フラグFLGRがセットされた状態で設定した故障判定時間が経過したとき、故障と確定して故障確定フラグFLGEをセットし、この故障確定フラグFLGEのセットにより、リンプホーム制御の実行を指示する。
【0036】
これにより、設定した故障判定時間で確実に故障を検知することができ、CANのリカバリー機能による影響を回避すると共に、外乱等による短時間の通信エラーによる誤診断を防止し、診断の信頼性を向上することができる。
【0037】
【発明の効果】
以上説明したように本発明によれば、送受信が禁止されるエラーステータスに遷移したときに正常状態への復帰を試みるリカバリー機能に影響されることなく、継続する異常を適正に判定して確実に故障を検知し、診断の信頼性を向上することができる。
【図面の簡単な説明】
【図1】車内LANの構成例を示す説明図
【図2】車内LANに接続される各ユニット内の要部構成を示すブロック図
【図3】CAN通信診断処理のフローチャート
【図4】CAN通信診断のタイムチャート
【図5】従来のCAN通信診断のタイムチャート
【符号の説明】
1H,1L CAN通信バス
107 CANコントローラ部
FLGE 故障確定フラグ
FLGR 仮故障判定フラグ
REC 受信エラーカウンタ
TEC 送信エラーカウンタ
TM 継続故障判定タイマ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a communication failure diagnosing device in a communication device having a recovery function that attempts to return to a normal state when transiting to an error status in which transmission / reception is prohibited.
[0002]
[Prior art]
In recent years, in vehicles such as automobiles, a plurality of electronic control units are mounted, and various controls such as an engine, a transmission, a suspension, and an air conditioner are shared by each unit, and the plurality of units are connected by a multiplex communication bus. Thus, an in-vehicle network is configured to exchange control data, control commands, and the like, thereby improving the total controllability.
[0003]
In general, such an in-vehicle network is often configured using a CAN (Controller Area Network) having an excellent error management function. According to this CAN protocol, an error for counting errors during transmission and reception is often used. According to the value of the counter, basically, there are three error statuses (error status): a status in which communication is normal (error active status), a status in which communication is difficult (error passive status), and a status in which communication is disabled (bus off status). Is defined, and the error active state and the error passive state reversibly transition according to the increase and decrease of the error counter value, and when the state transits to the bus off state, transmission / reception on the communication bus is prohibited.
[0004]
Therefore, the failure of the communication system can be determined by monitoring the bus off state. However, in the case of a failure such as disconnection of the communication line, the error passive value is maintained without increasing the error counter value. Failure monitoring is not sufficient if only the status is monitored. For this reason, Japanese Patent Application Laid-Open No. 2001-78535 discloses a related control using CAN communication data when an error passive state is determined to be a failure when control data is mutually transferred between a plurality of CAN controllers mounted on an agricultural work machine. Is stopped, and when returning to the error active state, a technique for restarting the stopped related control is disclosed.
[0005]
[Patent Document 1]
JP 2001-78535 A
[Problems to be solved by the invention]
However, in order to improve the reliability of diagnosis, it is necessary to determine the time during which a communication error continues so that a short-time communication error due to disturbance or the like is not determined to be a vehicle failure. As described above, if it is determined that there is no communication abnormality at the time of returning to the error active state and the control is restarted, it is not possible to cope with the case where the abnormality continues.
[0007]
Further, the CAN communication protocol has a recovery function of clearing the error counter value to "0" once and returning to the error active state when a predetermined number of consecutive bits are counted a set number of times after the bus is turned off. Therefore, even if the bus is turned off once, the recovery function comes in a short cycle and attempts to communicate again.
[0008]
Therefore, as shown in the time chart of FIG. 5, a time (failure determination time) for determining the time during which the abnormality continues is set, and when the bus off state of the CAN communication bus is detected, the abnormality continuation time is measured. Even if the timer for judging the failure (continuous failure judgment timer) is started, the recovery function returns to the error active state in a cycle shorter than the set failure judgment time. When the active state is detected, the continuous failure determination timer is cleared. Therefore, the abnormality is actually continuously occurring, and a flag (failure confirmation flag) indicating failure confirmation cannot be set even after the set failure determination time. In other words, depending on the timing of the occurrence of the abnormality, the time until the failure is actually determined varies, and the reliability of the diagnosis is reduced.
[0009]
The present invention has been made in view of the above circumstances, without being affected by a recovery function that attempts to return to a normal state when transiting to an error status in which transmission and reception are prohibited, appropriately determining a continuing abnormality. It is an object of the present invention to provide a communication failure diagnosis device capable of reliably detecting a failure and improving the reliability of diagnosis.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, in the first communication failure diagnosis device according to the present invention, an error status transits according to an error occurrence state during transmission / reception via a communication bus, and transits to an error status where transmission / reception is prohibited. When a communication failure diagnostic device that performs a failure diagnosis of a communication device having a recovery function that attempts to return to a normal state, when the error status has transitioned from a normal state to an abnormal state, it is determined that a temporary failure, Means for counting the duration of the temporary failure; and determining that the communication status has transitioned to the normal state before the duration of the temporary failure reaches the set time, and determining that the communication failure has not been detected continuously. And means for performing the operation.
[0011]
The second communication failure diagnosis device according to the present invention is configured such that when an error status changes according to an error occurrence situation during transmission / reception via a CAN communication bus and the error status changes to a bus off state in which transmission / reception is prohibited, A communication failure diagnostic device for performing failure diagnosis of a CAN communication device having a recovery function that attempts to return to an error active state. When the error status changes to a state other than the error active state, it is determined that a temporary failure has occurred. Means for measuring the duration of the temporary failure, and determining that the communication status has transitioned to the error active state before the duration of the temporary failure reaches the set time, when the set number of times cannot be detected continuously, a communication failure is determined. And means for performing the operation.
[0012]
When the second communication failure diagnosis device is applied to a network in a vehicle in which a plurality of CAN communication devices are connected via a CAN communication bus, when it is determined that a communication failure has occurred at any node on the network. It is desirable to instruct execution of limp home control.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. 1 to 4 relate to an embodiment of the present invention, FIG. 1 is an explanatory diagram showing a configuration example of an in-vehicle LAN, FIG. 2 is a block diagram showing a main part configuration in each unit connected to the in-vehicle LAN, FIG. 3 is a flowchart of the CAN communication diagnosis process, and FIG. 4 is a time chart of the CAN communication diagnosis.
[0014]
FIG. 1 shows a configuration example of an in-vehicle LAN in which a plurality of nodes such as a plurality of electronic control units and intelligent sensors and actuators mounted on the vehicle are connected to each other via a multiplex communication bus in a vehicle such as an automobile. This in-vehicle LAN employs a CAN communication bus, which is a two-wire serial communication bus, as a multiplex communication bus. A high-speed traveling communication network NH and a low-speed body communication network NL are connected via a body integration unit C1. Connected.
[0015]
The traveling system communication network NH includes a plurality of units that share a control function for an engine, a transmission, a brake, a suspension, and the like and a traveling state sensing function, that is, the engine unit C2, the AT unit C3, the traveling system units C4 and C6, and the traveling system. The sensor unit C5 and the like are connected via a CAN communication bus 1H. The body communication network NL is configured such that body units C7 to C11 that share control functions for body equipment such as an air conditioner, a power window, a power steering, various meters, a dashboard, and a keyless entry are connected via a CAN communication bus 1L. Connected and configured.
[0016]
The traveling communication network NH and the body communication network NL having different communication speeds are interconnected via a body integration unit C1 serving as a gateway, and data can be transmitted and received between all nodes. In FIG. 1, the vehicle units C12 and C13 are connected to the vehicle units C7 and C9 via dedicated communication buses 2 and 3, respectively.
[0017]
Each of the units Cn (n = 1, 2,...) Connected to the in-vehicle LAN is configured using a microcomputer, and each has a function as a controller for a control target and a function as a controller for CAN communication. have. As shown in FIG. 2, each unit includes a ROM 101, a RAM 102, a clock generator 103, a timer 104, an A / D converter 105, a D / A converter 106, and the like, for a CPU 100 that executes various arithmetic processes and controls. A CAN controller 107 and a CAN driver 108 are provided in addition to the configuration of a general microcomputer provided.
[0018]
The ROM 101 stores a control program, a failure diagnosis program, fixed data such as control constants and maps, and the RAM 102 temporarily stores data such as various input data and work data. Has a plurality of reception slots 102a and transmission slots 102b for CAN communication in addition to a normal processing area. When transmitting a message from its own unit at a predetermined timing, the transmission slot 102b writes and stores the message in advance, and the reception slot 102a stores a message returned from another unit.
[0019]
The CAN controller 107 is a part that controls communication according to a CAN communication protocol, and includes a control register for setting an interrupt mask and transmission / reception, a status register indicating various error conditions and a system state, and an error counter for managing an error state. (A transmission error counter TEC and a reception error counter REC). The CAN driver 108 is for transmitting and receiving messages via a CAN communication bus 1H (1L) composed of two lines of CAN_High and CAN_Low.
[0020]
As is well known, a CAN communication message includes a data frame for data transmission including an identifier for determining the priority of the message and identifying the destination and content of the message, a remote frame of a transmission request, and a communication error detection. There are four types of error frames at the time of reception, and overload frames that are output when the reception side is not ready for reception, and errors are checked for each frame.
[0021]
This error check is executed independently at the time of transmission and at the time of reception. Each time an error is detected, the counter value of an error counter (transmission error counter TEC, reception error counter REC) is incremented. The counter value is decremented. The value of the error counter is reflected in the status register, and the error status of CAN communication changes as described below.
[0022]
(1) Error Active State The values of the transmission error counter TEC and the reception error counter are both 0 to 127, indicating that communication can be performed normally.
[0023]
(2) Error passive state (error warning state)
The value of the transmission error counter TEC or the reception error counter REC is 128 to 255, indicating that the error frequency is high. Note that, depending on the CAN protocol, a state in which the value of the transmission error counter TEC or the reception error counter REC is 96 to 255 may be adopted as the error warning state instead of the error passive state.
[0024]
(3) Bus Off State This is a state where the value of the transmission error counter TEC has become 256 or more, and transmission / reception on the bus is prohibited.
[0025]
In this case, the error active state and the error passive state can transition with each other in accordance with the vertical fluctuation of the error counter value. However, a failure such as a short circuit between CAN_High and CAN_Low, which leads to a bus-off state, occurs. In this case, communication becomes impossible. However, in the CAN protocol, when a predetermined number of consecutive bits are detected on the CAN communication bus for a set number of times (for example, 11 recessive bits are 128 times), the error counter is once cleared to “0” and the state returns to the error active state. Has a recovery function.
[0026]
For this reason, the CPU 100 of each unit monitors the transition of the error status of the CAN communication, and when transitioning from a normal state (error active) to an abnormal state (error warning, error passive, bus off), it is determined that a temporary failure has occurred and a flag is determined. Is set, and the continuation time in which the temporary failure flag is set is counted. Then, before the duration of the temporary failure reaches the set failure determination time, when it is not possible to continuously detect that the transition to the error active state has been performed the set number of times, it is determined that the communication has failed, thereby avoiding erroneous diagnosis. Failures are reliably detected, and diagnostic reliability is improved.
[0027]
Hereinafter, the CAN communication diagnosis processing executed by the CPU 100 of each unit will be described with reference to the flowchart shown in FIG.
[0028]
In the CAN communication diagnosis process, when the CAN controller 107 starts CAN communication, first, in step S1, it is checked whether or not a diagnosis execution condition according to the vehicle state is satisfied. Start diagnosis. The diagnosis execution condition includes, for example, a condition in which the system has been initialized and is in an activated state, and the power supply voltage of each device is within an operation guarantee voltage range.
[0029]
Next, the process proceeds to step S2, in which the status of the CAN communication bus is monitored with reference to the status register (or error counter) of the CAN controller unit 107, and the monitoring result indicates any one of the abnormal statuses of error warning, error passive, and bus off. Check whether or not is detected. If any of the monitoring results of the bus state, the error warning state, the error passive state, and the bus off state is not detected, and the communication is normally performed (error active state), the state of the bus in step S2 is determined. The monitoring loop is repeated every set sampling time. This sampling time is set to a time short enough to return from the bus off state to the error active state by the CAN recovery function. For example, if the recovery time to the error active state by the recovery function is 4 ms, the sampling time is It is set to 1 ms.
[0030]
Also, when any of the error monitoring state, the error passive state, and the bus off state is detected as a result of monitoring the bus state in step S2, the process proceeds from step S2 to step S3, in which a temporary failure determination flag FLGR is set (FLGR ← FLGR). 1), the counting by the continuous failure determination timer TM is started. The temporary failure determination flag FLGR is set in response to an error detected by the CAN controller unit 107, and is determined to be a failure in which the error is not a temporary one but continues and a necessary measure must be taken as a vehicle. This shows the previous temporary determination state. Then, the duration of the state in which the temporary failure determination flag FLGR is set is counted by the continuous failure determination timer TM.
[0031]
Then, the process proceeds to step S4, and it is checked whether or not the error active state is detected continuously for the set number of times as a result of monitoring the bus state. The set number of times is set based on the relationship between the recovery time from the bus off state to the error active state by the CAN recovery function and the sampling time of the bus state monitoring cycle, and it is determined that the abnormality is not continued. The number of possible times, for example, if the recovery time to the error active state by the recovery function is 4 ms and the sampling time is 1 ms, the number is set to two times.
[0032]
When the error active state is detected twice consecutively, it is determined that the bus state has not completely returned to the normal state due to the recovery function of the CAN but has completely returned to the normal state. Then, the temporary failure determination flag FLGR and the continuous failure determination timer TM are both cleared (FLGR ← 0, TM ← 0), and the process returns to step S2 to continue monitoring the bus state.
[0033]
If the error active state has not been detected twice consecutively in step S4, the process proceeds from step S4 to step S6 to determine whether or not the value of the continuous failure determination timer TM has exceeded a preset failure determination time. Find out. If the failure determination time has not elapsed, the process returns from step S6 to step S4, and checks again whether the monitoring result of the bus state has detected the error active state twice consecutively. Then, the error active state is not detected twice consecutively in step S4. When the failure determination time has elapsed in step S6, it is determined that the failure state is not a temporary abnormality but a failure state in which the failure continues, and the process proceeds from step S6 to step S7.
[0034]
In step S7, a failure determination flag FLGE indicating failure determination is set (FLGE ← 1), and the limp home function is started. In the limp home function, for example, the required minimum traveling performance is ensured by setting the fuel injection amount and the ignition timing to predetermined fail-safe values.
[0035]
That is, as shown in the time chart of FIG. 4, the monitoring period of the bus state is shortened in consideration of the recovery function of the CAN, and when an abnormality that leads to the bus off state is detected, the temporary failure determination flag FLGR is set. Time the duration. After the provisional failure determination flag FLGR is set, it is not cleared unless a normal determination (error active detection) is performed continuously for a set number of times (except at the time of system reset), and the temporary failure determination flag FLGR is set. When the set failure determination time has elapsed, the failure is determined and the failure determination flag FLGE is set, and the setting of the failure determination flag FLGE instructs the execution of the limp home control.
[0036]
This makes it possible to reliably detect a failure within the set failure determination time, avoid the influence of the recovery function of the CAN, prevent erroneous diagnosis due to short-time communication errors due to disturbances, etc., and improve the reliability of diagnosis. Can be improved.
[0037]
【The invention's effect】
As described above, according to the present invention, without being affected by the recovery function that attempts to return to the normal state when transiting to the error status in which transmission and reception are prohibited, it is possible to appropriately determine the continued abnormality and reliably Failure can be detected, and the reliability of diagnosis can be improved.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing a configuration example of an in-vehicle LAN; FIG. 2 is a block diagram showing a main part configuration in each unit connected to the in-vehicle LAN; FIG. 3 is a flowchart of a CAN communication diagnosis process; FIG. Diagnosis time chart [Fig. 5] Conventional CAN communication diagnosis time chart [Description of symbols]
1H, 1L CAN communication bus 107 CAN controller FLGE failure determination flag FLGR provisional failure determination flag REC reception error counter TEC transmission error counter TM continuous failure determination timer

Claims (3)

通信バスを介した送受信時のエラー発生状況に応じてエラーステータスが遷移し、送受信が禁止されるエラーステータスに遷移したとき、正常状態への復帰を試みるリカバリー機能を有する通信装置の故障診断を行う通信故障の診断装置であって、
上記エラーステータスが正常状態から異常状態に遷移したとき、仮故障と判定すると共に、この仮故障の継続時間を計時する手段と、
上記仮故障の継続時間が設定時間に達する前に、上記エラーステータスが正常状態へ遷移したことを連続して設定回数検出できないとき、通信故障と確定する手段とを備えたことを特徴とする通信故障の診断装置。
When an error status changes according to an error occurrence state during transmission / reception via the communication bus, and when the error status changes to an error status where transmission / reception is prohibited, a failure diagnosis of a communication device having a recovery function that attempts to return to a normal state is performed. A communication failure diagnostic device,
Means for determining, when the error status has transitioned from the normal state to the abnormal state, a provisional failure, and counting the duration of the provisional failure;
Means for determining that a communication failure has occurred when the transition of the error status to the normal state cannot be detected continuously for a set number of times before the duration of the temporary failure reaches a set time. Failure diagnosis device.
CAN通信バスを介した送受信時のエラー発生状況に応じてエラーステータスが遷移し、送受信が禁止されるバスオフ状態に上記エラーステータスが遷移したとき、エラーアクティブ状態への復帰を試みるリカバリー機能を有するCAN通信装置の故障診断を行う通信故障の診断装置であって、
上記エラーステータスがエラーアクティブ状態以外に遷移したとき、仮故障と判定すると共に、この仮故障の継続時間を計時する手段と、
上記仮故障の継続時間が設定時間に達する前に、上記エラーステータスがエラーアクティブ状態へ遷移したことを連続して設定回数検出できないとき、通信故障と確定する手段とを備えたことを特徴とする通信故障の診断装置。
A CAN having a recovery function that attempts to return to an error active state when the error status transitions according to an error occurrence situation during transmission / reception via a CAN communication bus and the error status transitions to a bus off state where transmission / reception is prohibited. A communication failure diagnostic device for performing failure diagnosis of a communication device,
Means for determining a temporary failure when the error status has transitioned to a state other than the error active state, and for measuring the duration of the temporary failure;
Means for determining that a communication failure has occurred when the set number of times that the error status has transitioned to the error active state cannot be detected continuously before the duration of the temporary failure reaches the set time. Diagnosis device for communication failure.
複数の上記CAN通信装置を上記CAN通信バスを介して接続した車両内のネットワークに対し、
上記ネットワーク上の何れかのノードで通信故障発生と確定したとき、リンプホーム制御の実行を指示する手段を備えたことを特徴とする請求項2記載の通信故障の診断装置。
For a network in a vehicle that connects a plurality of the CAN communication devices via the CAN communication bus,
3. The communication failure diagnosis apparatus according to claim 2, further comprising means for instructing execution of limp home control when it is determined that a communication failure has occurred in any of the nodes on the network.
JP2003142500A 2003-05-20 2003-05-20 Diagnostic device for communication failure Pending JP2004348274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003142500A JP2004348274A (en) 2003-05-20 2003-05-20 Diagnostic device for communication failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003142500A JP2004348274A (en) 2003-05-20 2003-05-20 Diagnostic device for communication failure

Publications (1)

Publication Number Publication Date
JP2004348274A true JP2004348274A (en) 2004-12-09

Family

ID=33530569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003142500A Pending JP2004348274A (en) 2003-05-20 2003-05-20 Diagnostic device for communication failure

Country Status (1)

Country Link
JP (1) JP2004348274A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010184687A (en) * 2009-02-13 2010-08-26 Nsk Ltd Vehicular control device
US20120035805A1 (en) * 2007-10-31 2012-02-09 Spx Corporation Error Message Details for Debug Available to End User
KR101198724B1 (en) 2007-06-05 2012-11-12 현대자동차주식회사 Error Detection Method for robust CAN communication in Vehicles
JP2013011192A (en) * 2011-06-28 2013-01-17 Toyota Motor Corp Control device, control system, control method, program and medium
WO2013053978A1 (en) * 2011-10-11 2013-04-18 Sandvik Mining And Construction Oy A method, system and a device for controlling a work machine
KR20140004954A (en) * 2012-07-03 2014-01-14 콘티넨탈 오토모티브 시스템 주식회사 Method for diagnosing error of can communication
WO2015170453A1 (en) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ On-vehicle network system, fraud-detection electronic control unit, and method for tackling fraud
JP2016020185A (en) * 2014-07-15 2016-02-04 株式会社デンソー Transmission line abnormality detector
JP2016100725A (en) * 2014-11-20 2016-05-30 国立大学法人名古屋大学 Can (controller area network) communication system and error information storage device
JP2017105308A (en) * 2015-12-09 2017-06-15 日立オートモティブシステムズ株式会社 Vehicle control device
JP2019064529A (en) * 2017-10-04 2019-04-25 トヨタ自動車株式会社 Vehicular control apparatus
CN110088735A (en) * 2016-12-21 2019-08-02 三菱电机株式会社 The processing method when failure of control device and control device
CN111130935A (en) * 2019-12-24 2020-05-08 深圳南方德尔汽车电子有限公司 Method, device and equipment for testing fast and slow recovery time of CAN Bus off and storage medium
CN112333007A (en) * 2020-10-20 2021-02-05 中国第一汽车股份有限公司 Control method and test method for CAN network diagnosis
CN113973025A (en) * 2021-09-30 2022-01-25 北京轩宇空间科技有限公司 CAN bus-based satellite-borne computer communication reliability and fault tolerance design method

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101198724B1 (en) 2007-06-05 2012-11-12 현대자동차주식회사 Error Detection Method for robust CAN communication in Vehicles
US20120035805A1 (en) * 2007-10-31 2012-02-09 Spx Corporation Error Message Details for Debug Available to End User
JP2010184687A (en) * 2009-02-13 2010-08-26 Nsk Ltd Vehicular control device
JP2013011192A (en) * 2011-06-28 2013-01-17 Toyota Motor Corp Control device, control system, control method, program and medium
WO2013053978A1 (en) * 2011-10-11 2013-04-18 Sandvik Mining And Construction Oy A method, system and a device for controlling a work machine
KR20140004954A (en) * 2012-07-03 2014-01-14 콘티넨탈 오토모티브 시스템 주식회사 Method for diagnosing error of can communication
WO2015170453A1 (en) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ On-vehicle network system, fraud-detection electronic control unit, and method for tackling fraud
JPWO2015170453A1 (en) * 2014-05-08 2017-04-20 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America In-vehicle network system, electronic control unit, and fraud countermeasure method
US9725073B2 (en) 2014-05-08 2017-08-08 Panasonic Intellectual Property Corporation Of America Method for handling transmission of fraudulent frames within in-vehicle network
US9902370B2 (en) 2014-05-08 2018-02-27 Panasonic Intellectual Property Corporation Of America Method for handling transmission of fraudulent frames within in-vehicle network
US10137862B2 (en) 2014-05-08 2018-11-27 Panasonic Intellectual Property Corporation Of America Method for handling transmission of fraudulent frames within in-vehicle network
JP2016020185A (en) * 2014-07-15 2016-02-04 株式会社デンソー Transmission line abnormality detector
JP2016100725A (en) * 2014-11-20 2016-05-30 国立大学法人名古屋大学 Can (controller area network) communication system and error information storage device
US10484200B2 (en) 2014-11-20 2019-11-19 National University Corporation Nagoya University Controller area network (CAN) communication system and error information recording device
JP2017105308A (en) * 2015-12-09 2017-06-15 日立オートモティブシステムズ株式会社 Vehicle control device
CN110088735A (en) * 2016-12-21 2019-08-02 三菱电机株式会社 The processing method when failure of control device and control device
CN110088735B (en) * 2016-12-21 2023-04-21 三菱电机株式会社 Control device and failure processing method for control device
JP2019064529A (en) * 2017-10-04 2019-04-25 トヨタ自動車株式会社 Vehicular control apparatus
CN111130935A (en) * 2019-12-24 2020-05-08 深圳南方德尔汽车电子有限公司 Method, device and equipment for testing fast and slow recovery time of CAN Bus off and storage medium
CN112333007A (en) * 2020-10-20 2021-02-05 中国第一汽车股份有限公司 Control method and test method for CAN network diagnosis
CN112333007B (en) * 2020-10-20 2022-08-19 中国第一汽车股份有限公司 Control method and test method for CAN network diagnosis
CN113973025A (en) * 2021-09-30 2022-01-25 北京轩宇空间科技有限公司 CAN bus-based satellite-borne computer communication reliability and fault tolerance design method

Similar Documents

Publication Publication Date Title
US20110035180A1 (en) Diagnostic apparatus and system adapted to diagnose occurrence of communication error
JP2004348274A (en) Diagnostic device for communication failure
JP2002158668A (en) Abnormality detector of network system for vehicle
US20110013522A1 (en) Communication system
JP2002041141A (en) Abnormality detecting system
JP2004017676A (en) Communication system for vehicle, initialization device, and control device for vehicle
US8024625B2 (en) Network system for diagnosing operational abnormality of nodes
JP2003191804A (en) Communication system for vehicle
JP2013106200A (en) Communication repeater for vehicle and sleep control method
JP5867605B2 (en) Failure diagnosis system, failure diagnosis apparatus and failure diagnosis method
JP5071340B2 (en) Gateway device, vehicle network, one-side disconnection detection method
US5504737A (en) Monitoring multiplex transmission system having a respective controller for each of a number of transmission devices in the system
JP5954102B2 (en) Communication monitoring device and communication monitoring method
JP3770053B2 (en) Method for determining communication return in vehicle network
JP2009302783A (en) Failure detecting method and failure detection system of communication network
JP2002359625A (en) Control area network
JP3901987B2 (en) Electronic control device for vehicle
JP2006135375A (en) Can network system
JP2006222800A (en) Multiplex communication system
US11050648B2 (en) Communication system
WO2020012822A1 (en) Computation system and computation device
JP4349276B2 (en) Abnormality judgment system
JP5617826B2 (en) Vehicle control device
JP2010018168A (en) System and method for analyzing abnormality for vehicle, and vehicular trouble analyzer
JP2904304B2 (en) Multiplex transmission equipment