WO2016080417A1 - CAN(Controller Area Network)通信システム及びエラー情報記録装置 - Google Patents

CAN(Controller Area Network)通信システム及びエラー情報記録装置 Download PDF

Info

Publication number
WO2016080417A1
WO2016080417A1 PCT/JP2015/082341 JP2015082341W WO2016080417A1 WO 2016080417 A1 WO2016080417 A1 WO 2016080417A1 JP 2015082341 W JP2015082341 W JP 2015082341W WO 2016080417 A1 WO2016080417 A1 WO 2016080417A1
Authority
WO
WIPO (PCT)
Prior art keywords
error
message
information
processing
unit
Prior art date
Application number
PCT/JP2015/082341
Other languages
English (en)
French (fr)
Inventor
高田 広章
亮 倉地
直樹 足立
Original Assignee
国立大学法人名古屋大学
株式会社オートネットワーク技術研究所
住友電装株式会社
住友電気工業株式会社
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 国立大学法人名古屋大学, 株式会社オートネットワーク技術研究所, 住友電装株式会社, 住友電気工業株式会社 filed Critical 国立大学法人名古屋大学
Priority to CN201580061672.6A priority Critical patent/CN107005450A/zh
Priority to DE112015005253.4T priority patent/DE112015005253T5/de
Priority to US15/528,274 priority patent/US10484200B2/en
Publication of WO2016080417A1 publication Critical patent/WO2016080417A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • H04L12/40195Flexible bus arrangements involving redundancy by using a plurality of nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Definitions

  • the present invention relates to a communication system in which a plurality of communication devices communicate according to the CAN protocol, and an error information recording device that monitors communication by the communication device.
  • a CAN communication protocol has been widely used for communication between a plurality of ECUs (Electronic Control Units) mounted on a vehicle.
  • a communication system that employs a CAN communication protocol has a configuration in which a plurality of ECUs are connected to a common CAN bus, and transmission and reception of messages are performed when the receiving ECU acquires a signal output from the transmitting ECU to the CAN bus. Is done.
  • various proposals have been made on how to deal with an error in communication.
  • Patent Document 1 when the CAN bus state is monitored and an abnormal state of error warning, error passive or bus off is detected, the temporary failure determination flag is set and the continuous failure determination timer is activated. Thereafter, when a failure determination time has elapsed without continuously detecting an error active state twice, a communication failure diagnosis device has been proposed that sets a failure determination flag indicating failure determination and enters a limp home function.
  • the present invention has been made in view of such circumstances, and an object of the present invention is to provide a CAN communication system and an error that can be expected to easily identify the cause when an error occurs in communication.
  • An object is to provide an information recording apparatus.
  • a CAN communication system is a CAN communication system including a plurality of communication devices that are connected via a common communication line and perform communication according to a CAN (Controller Area Network) protocol.
  • An error determination unit that determines whether or not an error is included in the message transmitted by the communication device, and records information related to the error of the message when the error determination unit determines that the message includes an error
  • an error information recording device having an error information recording unit.
  • the CAN communication system is characterized in that the information recorded by the error information recording unit includes identification information attached to the message.
  • the information recorded by the error information recording unit includes time information related to error occurrence, message payload, payload size, error type, or error location in the message. Including at least one piece of information.
  • the error information recording device identifies the content of error processing performed when the error determination unit determines that an error is included in the message. It is characterized by having an error processing content storage unit stored every time and an error processing unit for performing error processing based on the content stored in the error processing content storage unit.
  • the error processing content storage unit stores conditions for performing error processing
  • the error processing unit includes the error determination unit including an error in a message. The error processing is performed when the determination and the condition stored in the error processing content storage unit are satisfied.
  • the error information recording device transmits and receives a message in accordance with a CAN protocol, and sends information to the CAN controller having the error determination unit and the error information recording unit.
  • a processor that performs a process of recording, and when the error determination unit determines that the message includes an error, the CAN controller notifies the processor of identification information attached to the message.
  • the processor is configured to record the information notified from the CAN controller in the error information recording unit.
  • the error information recording apparatus is connected to a common communication line to which a plurality of communication apparatuses that perform communication according to a CAN (Controller Area Network) protocol is connected, and an error is included in a message transmitted by the communication apparatus.
  • An error determination unit that determines whether or not a message is included, and an error information recording unit that records information relating to an error in the message when the error determination unit determines that the message includes an error.
  • an error information recording device when an error information recording device is connected to a common communication line through which a plurality of communication devices communicate, and the communication device transmits a message, it is determined whether or not this message contains an error.
  • the error information recording device records information related to the error of the message.
  • the error information recording apparatus can record information on error in message transmission for all communication apparatuses of the CAN communication system. Therefore, when a failure occurs in the CAN communication system, information that can identify the cause of the failure can be acquired by examining information recorded by the error information recording device.
  • the information recorded by the error information recording device includes identification information (so-called CAN-ID) attached to the message.
  • identification information so-called CAN-ID
  • the information recorded by the error information recording device includes at least one information of time information related to the occurrence of an error, message payload, payload size, error type, or error location. This facilitates specifying the cause of error occurrence in more detail.
  • the error information recording apparatus stores error processing contents for each message identification information, and performs error processing according to the identification information when an error occurs.
  • the error information recording device performs error processing such as warning message display or warning sound output in the vehicle, or system shutdown, notifying the occurrence of an error to a device outside the vehicle using wireless communication or the like. Can do.
  • appropriate processing content can be set for each piece of message identification information.
  • the error information recording apparatus stores conditions for performing error processing, and error processing is performed when an error occurs and the stored conditions are satisfied. Error processing conditions can be set for each piece of message identification information. As a result, the error information recording apparatus can perform error processing according to the frequency of occurrence or the status of occurrence of errors rather than simply performing error processing when an error occurs.
  • the error information recording apparatus includes a CAN controller that performs communication in accordance with the CAN protocol, and a processor that performs various types of information processing.
  • the CAN controller can determine whether or not an error is included in the message transmission. If the error is included, the CAN controller notifies the processor of the identification information attached to the message. When notified of the occurrence of an error from the CAN controller, the processor performs processing for recording error information including the notified identification information.
  • the conventional CAN controller does not have a function of notifying the processor of information such as identification information when an error occurs, and the processor can obtain only information related to the error that has occurred in the message transmitted by itself.
  • the CAN controller By configuring the CAN controller to notify the processor of the identification information of the message in which an error has occurred as in the present invention, it becomes possible for the processor to obtain information about the error that has occurred in the message transmitted by another device, It is possible to record error information regarding all communication devices in the system.
  • the error information recording device connected to a common communication line through which a plurality of communication devices perform communication records information related to the message transmission error of each communication device, so that CAN
  • information that can identify the cause of the failure can be acquired by examining information recorded by the error information recording device. Therefore, the present invention can be expected to facilitate identification of the cause when an error occurs in communication.
  • FIG. 1 is a schematic diagram showing a configuration of a communication system according to the present embodiment.
  • the communication system according to the present embodiment includes a plurality of ECUs 3 mounted on the vehicle 1 and a single monitoring device 5.
  • the ECU 3 and the monitoring device 5 are connected via a common communication line laid on the vehicle 1 and can send and receive messages to and from each other.
  • this communication line is a CAN bus, and the ECU 3 and the monitoring device 5 perform communication according to the CAN protocol.
  • the ECU 3 controls, for example, an engine ECU that controls the engine of the vehicle 1, a body ECU that controls electrical components of the vehicle body, an ABS-ECU that performs control related to ABS (Antilock Brake System), or an airbag of the vehicle 1.
  • ABS Antilock Brake System
  • the monitoring device 5 is a device that monitors errors that occur during transmission and reception of messages in the in-vehicle network.
  • the monitoring device 5 may be provided as a device dedicated to monitoring.
  • the monitoring device 5 may have a configuration in which a monitoring function is added to a device such as a gateway. It may be.
  • FIG. 2 is a block diagram showing the configuration of the monitoring device 5.
  • the monitoring device 5 includes a processor 51, a CAN controller 52, a ROM (Read Only Memory) 53, a recording unit 54, an outside communication unit 55, and the like.
  • the processor 51 is an arithmetic processing device such as a so-called CPU (Central Processing Unit) or MPU (Micro-Processing Unit), and reads out and executes a program stored in the ROM 53 or the recording unit 54 to perform communication in the in-vehicle network. Process to monitor errors.
  • the processor 51 is provided with software functional blocks such as an error analysis unit 61, an error information recording processing unit 62, and an error processing unit 63 by executing the program. Details of processing performed by these functional blocks will be described later.
  • the CAN controller 52 communicates with the ECU 3 via the CAN bus according to the CAN communication protocol.
  • the CAN controller 52 converts the information for transmission given from the processor 51 into a signal in accordance with the CAN communication protocol, and outputs the converted signal to the CAN bus to transmit information to the ECU 3.
  • the CAN controller 52 acquires the signal output by the ECU 3 by sampling the potential of the CAN bus, converts the signal into binary information according to the CAN communication protocol, and receives the information. Is sent to the processor 51.
  • the functions related to message transmission / reception of the CAN controller 52 are the same as the functions of the existing CAN controller.
  • the CAN controller 52 of the monitoring device 5 includes an error determination unit 71, an error notification unit 72, an error processing command transmission unit 73, and the like.
  • the error determination unit 71 determines whether or not an error is included in the message transmitted by the ECU 3 on the CAN bus.
  • the error notification unit 72 notifies the processor 51 of information related to the message determined to contain an error by the error determination unit 71.
  • the error processing instruction transmission unit 73 transmits an instruction to perform an error processing operation to an appropriate ECU 2 according to the content of the error processing.
  • the ROM 53 is configured using a non-volatile memory element such as a mask ROM or EEPROM (Electrically Erasable Programmable Read Only Memory).
  • the ROM 53 stores, as monitoring information 53a, information such as details of error processing performed by the processor 51 when an error occurs in communication.
  • FIG. 3 is a schematic diagram illustrating an example of the monitoring information 53a.
  • the monitoring information 53a stores the contents of error processing performed when an error occurs for each CAN-ID attached to the message.
  • the monitoring information 53 a is determined at the design stage of the CAN communication system or the monitoring device 5 and stored in the ROM 53 in advance.
  • the information may be stored in the ROM 53 after being encrypted.
  • the monitoring information 53a stores information on error frequency, error processing, related messages, and related error processing in association with the CAN-ID of the message.
  • the error frequency of the monitoring information 53a is a condition for performing error processing when an error occurs continuously for this CAN-ID message. For example, if the error frequency is set to 2 and the CAN-ID is 1, the error processing is performed when an error occurs twice in succession, but the normal message transmission is performed after the error occurs once. In some cases, error handling is not performed.
  • the error processing of the monitoring information 53a stores the content of error processing performed when the conditions for performing error processing are satisfied. In this example, external notification, internal notification, and none are set, but in addition to these, processing such as system shutdown, specific ECU operation stop, or message discard in which an error has occurred may be performed.
  • notification to an external server device or the like is performed by the external communication unit 55.
  • an operation command is given to an appropriate ECU 3 to turn on a warning lamp, display a warning message or output a warning sound, and notify the user in the vehicle 1 of the occurrence of the error.
  • the related message of the monitoring information 53a is a condition for performing error processing when an error occurs in a plurality of messages having different CAN-IDs.
  • a message with a CAN-ID of 1 is associated with a message with a CAN-ID of 2, and an error occurs in a message with a CAN-ID of 1, and the CAN-ID is continuously added to this error.
  • Error processing is performed when an error occurs in the message 2.
  • the related error processing of the monitoring information 53a stores the contents of error processing performed when the conditions of the related message are satisfied.
  • the recording unit 54 of the monitoring device 5 is configured by using a rewritable and nonvolatile storage device such as a flash memory or a hard disk.
  • the recording unit 54 records information on an error in message transmission that has occurred in the in-vehicle network as error information 54a.
  • FIG. 4 is a schematic diagram showing an example of the error information 54a.
  • the error information 54a information on time, CAN-ID, DLC (Data Length Code), payload, error presence / absence, error type, and error position is recorded.
  • the time of the error information 54a is a time such as a transmission start time, an error determination time, or a transmission completion time of a message determined to include an error.
  • the processor 51 or the CAN controller 52 of the monitoring device 5 has a timer or clock function, and can acquire the time when an error occurs. Note that the time information does not need to be a time acquired as an absolute time from a clock function or the like. For example, it may be the time after the monitoring device 5 is activated. Further, for example, when the monitoring device 5 is configured to periodically transmit information, it may be an elapsed time since information transmission. It may be time or time information other than these.
  • the CAN-ID of the error information 54a is a CAN-ID attached to a message determined to contain an error.
  • the DLC of the error information 54a is the data length of the payload included in the message, and is specifically 4-bit information included in the CAN control field. The payload is valid information excluding the header included in the message, and is specifically the data field information itself of
  • the error presence / absence in the error information 54a is information indicating the presence / absence of an error in this message, and is set to either yes or no.
  • the monitoring device 5 is configured to record only information about a message in which an error has occurred, and therefore the error information 54a does not necessarily have an error presence / absence item.
  • an error presence or absence item may be provided.
  • the error type of the error information 54a is a factor that determines an error.
  • a bit error, an ACK error, a CRC error, and a form error are recorded as error types.
  • error types these are examples, and other error types may be set.
  • the error position of the error information 54a is information indicating the position of the bit determined by the CAN controller 52 that an error is included in the message.
  • the CAN-ID, DLC, payload, error presence / absence, error type, and error position included in the error information 54a are determined by the CAN controller 52, notified from the CAN controller 52 to the processor 51, and recorded by the processor 51 in the recording unit 54. Is done.
  • the time included in the error information 54a may be determined by either the processor 51 or the CAN controller 52. In the present embodiment, the CAN controller 52 determines.
  • the outside communication unit 55 of the monitoring device 5 communicates with a device such as a server device installed outside the vehicle 1 via, for example, a mobile phone communication network or a wireless LAN (Local Area Network).
  • a device such as a server device installed outside the vehicle 1 via, for example, a mobile phone communication network or a wireless LAN (Local Area Network).
  • the monitoring device 5 does not necessarily need to include the external communication unit 55.
  • another ECU 3 mounted on the vehicle 1 may include an outside vehicle communication unit, and the monitoring device 5 may communicate with a server device outside the vehicle via the ECU 3.
  • the CAN controller 52 of the monitoring device 5 samples and acquires a signal output from the ECU 3 with respect to the CAN bus, and continuously monitors a message transmitted from the ECU 3.
  • the error determination unit 71 of the CAN controller 52 determines whether or not there is an error with respect to a message transmitted on the CAN bus.
  • the error determination unit 71 determines the presence or absence of errors such as bit errors, stuff errors, CRC errors, form errors, and ACK errors. Since these errors are defined by the existing CAN protocol, detailed description is omitted.
  • the error determined by the error determination unit 71 is not limited to the above.
  • the error determination unit 71 detects an authentication error that occurs in the authentication process. It can be set as the structure which determines the presence or absence.
  • the error notification unit 72 of the CAN controller 52 performs a process of notifying the processor 51 of information relating to the message determined to have an error by the error determination unit 71. At this time, the error notification unit 72 notifies the processor 51 by outputting a signal such as an interrupt. In addition, the error notification unit 72 determines that there is an error and acquires information about the time when the error determination was made, CAN-ID, DLC, payload, error type, and error position, and notifies the processor 51 of the information.
  • the processor 51 of the monitoring device 5 knows the occurrence of an error from the notification from the CAN controller 52 and acquires information about the error from the CAN controller 52.
  • the error information recording processing unit 62 of the processor 51 adds the information acquired from the CAN controller 52 to the error information 54a of the recording unit 54 and records it. At this time, the error information recording processing unit 62 may record information so that it is difficult to decode or modify the error information 54a by using a technique such as encryption or electronic signature.
  • FIG. 5 is a schematic diagram for explaining a determination example of whether or not to perform error processing, and is a determination example based on the error frequency.
  • the illustrated example is for a message with CAN-ID of 1 shown in FIG. 3. This message has an error frequency set to 2 in the monitoring information 53a, and an external notification is set as error processing.
  • the error frequency of the monitoring information 53a is a setting relating to how many times an error occurs continuously to perform error processing.
  • the error analysis unit 61 has a counter for counting the frequency of error occurrence for each CAN-ID.
  • the error analysis unit 61 acquires the CAN-ID of the message in which the error has occurred based on this notification, and sets the counter value corresponding to this CAN-ID to 1 to add. Further, the error analysis unit 61 refers to the monitoring information 53a in the ROM 53, and acquires the numerical value of the error frequency set for the CAN-ID of the message in which the error has occurred. If the counter value reaches the set error frequency, the error analysis unit 61 determines to perform error processing. When it is determined that error processing is to be performed, the error processing unit 63 of the processor 51 performs error processing set as error processing in the monitoring information 53a.
  • the error analysis unit 61 needs to initialize the counter value to 0 when no error occurs in the message transmitted at time t2.
  • the ECU 3 transmits a message with a CAN-ID of 1 in a cycle T, and the error analysis unit 61 increases a counter value and then performs a predetermined period (for example, a period T or a period longer than the period T). If the error is not notified after elapse of (), the counter value is initialized. If the CAN controller 52 is configured to notify the processor 51 of a message for which no error has occurred, the error analysis unit 61 initializes the counter value in response to this notification. Also good.
  • FIG. 6 is a schematic diagram for explaining a determination example of whether or not to perform error processing, and is a determination example based on a related message.
  • the illustrated example is for a message with a CAN-ID of 1 shown in FIG. 3, and this message has a message with a CAN-ID of 2 set as a related message in the monitoring information 53a.
  • the error analysis unit 61 has a counter for counting the number of consecutive error occurrences with related messages for each CAN-ID (a counter different from the counter shown in FIG. 5). When an error notification is given from the CAN controller 52, the error analysis unit 61 adds 1 to the value of the counter corresponding to the CAN-ID of the message in which the error has occurred.
  • the error analysis unit 61 does not change the counter value. Hold. If an error occurs in the message with CAN-ID 2 set as the related message until the transmission cycle T elapses, the error analysis unit 61 adds 1 to the counter value. If no error occurs in the message with CAN-ID 1 or 2 until the transmission period T elapses, the error analysis unit 61 initializes the counter value to 0.
  • the error analysis unit 61 determines that error processing is performed when the counter value reaches 2. For example, when two CAN-IDs are set as related messages, the error analysis unit 61 determines to perform error processing when the counter value reaches 3. That is, the error analysis unit 61 determines to perform error processing when the counter value reaches the value obtained by adding 1 to the set number of related messages. Since the related error process with CAN-ID 1 is set as the external notification in the monitoring information 53a, the error processing unit 63 performs a process of notifying the occurrence of an error to an external server device or the like in the outside communication unit 55. .
  • the error processing unit 63 When internal notification is set as error processing, the error processing unit 63 gives an operation command to an appropriate ECU 3 or the like in the vehicle 1 by the error processing command transmission unit 73 of the CAN controller 52. For example, when displaying a warning message as an internal notification, the error processing unit 63 transmits a warning message display command to the ECU 3 or the car navigation device that controls the display provided in the vehicle 1. Further, for example, when a warning sound is output as an internal notification, the error processing unit 63 transmits a warning sound output command to the ECU 3 or the audio device that controls a speaker provided in the vehicle 1. In addition, processing such as system shutdown may be set as error processing. In this case, the error processing unit 63 transmits an operation stop command to the ECU 3 whose operation should be stopped.
  • FIG. 7 is a flowchart showing a procedure of processing performed by the CAN controller 52.
  • the CAN controller 52 determines whether or not a message has been transmitted by the ECU 3 by sampling the potential of the CAN bus (step S1). If no message is sent (S1: NO), the CAN controller 52 waits until a message is sent. When the message is transmitted by the ECU 3 (S1: YES), the CAN controller 52 starts receiving the transmitted message (step S2).
  • the error determination unit 71 of the CAN controller 52 determines whether or not an error is included in the message transmitted by the ECU 3 on the CAN bus (step S3).
  • the error notification unit 72 of the CAN controller 52 notifies the error by outputting a signal such as an interrupt to the processor 51.
  • Step S4 the process proceeds to step S5. If it is determined that no error is included (S3: NO), the CAN controller 52 advances the process to step S5 without notifying the error.
  • the CAN controller 52 determines whether or not the transmission of the message by the ECU 3 has ended (step S5). If the message transmission has not ended (S5: NO), the CAN controller 52 returns the process to step S3. When the message transmission is completed (S5: YES), the CAN controller 52 ends the process.
  • FIG. 8 is a flowchart showing a procedure of processing performed by the processor 51.
  • the processor 51 determines whether or not an error notification is given from the CAN controller 52 by a signal such as an interrupt (step S11). When the error notification is not given (S11: NO), the processor 51 stands by until the error notification is given. When an error notification is given (S11: YES), the processor 51 acquires information on the error that has occurred, for example, information such as the CAN-ID of the message in which the error has occurred and the type of error from the CAN controller 52 (step S1). S12).
  • the error information recording processing unit 62 of the processor 51 records the information acquired in step S12 as error information 54a in the recording unit 54 (step S13).
  • the error analysis unit 61 of the processor 51 performs error processing determination for determining whether or not to perform error processing based on whether the error frequency set in the monitoring information 53a of the ROM 53 and conditions such as related messages are satisfied. Perform (step S14).
  • the error analysis unit 61 determines whether or not the condition set in the monitoring information 53a is satisfied (Step S15). If the condition is not satisfied (S15: NO), the error analysis unit 61 performs processing without performing error processing. Exit.
  • the error processing unit 63 of the processor 51 performs the error processing set in the monitoring information 53a (step S16) and ends the processing.
  • ⁇ Summary> In the CAN communication system according to the present embodiment, when the monitoring device 5 is connected to a common CAN bus with which a plurality of ECUs 3 communicate, and the ECU 3 transmits a message, whether or not an error is included in this message. Is determined by the monitoring device 5. When an error is included in the transmission message, the monitoring device 5 records information related to the error of the message in the recording unit 54 as error information 54a. As a result, the monitoring device 5 can record information related to message transmission errors for all ECUs 3 connected to the CAN bus. Therefore, when a failure occurs in the CAN communication system, the error information 54a recorded in the recording unit 54 of the monitoring device 5 can be checked to obtain information that can identify the cause of the failure. Further, even when the CAN bus is attacked by an attacker, the cause can be specified.
  • the information recorded by the monitoring device 5 as the error information 54a includes a CAN-ID attached to the message.
  • the error information 54a includes at least one information of time information, DLC, payload, error presence / absence, error type, error position, and the like. This facilitates specifying the cause of error occurrence in more detail.
  • the monitoring device 5 stores the details of error processing for each CAN-ID in the monitoring information 53a of the ROM 53, and performs error processing according to the CAN-ID when an error occurs. For example, the monitoring device 5 notifies the occurrence of an error to the server device outside the vehicle 1 by the external communication unit 55 using wireless communication or the like, displays a warning message or outputs a warning sound in the vehicle 1, or a system or Error processing such as shutdown of the corresponding network can be performed. In addition to these error processing, appropriate processing contents can be set for each CAN-ID of the message.
  • the monitoring device 5 stores conditions for performing error processing in the monitoring information 53a, and performs error processing when an error occurs and the stored conditions are satisfied.
  • the error processing conditions for example, conditions such as the frequency of occurrence of errors and the occurrence of errors in related messages can be set. Error processing conditions can be set for each CAN-ID of a message. As a result, the monitoring device 5 can perform error processing according to the frequency of occurrence or the state of occurrence of errors rather than simply performing error processing when an error occurs.
  • the monitoring device 5 includes a CAN controller 52 that performs communication in accordance with the CAN protocol, and a processor 51 that performs various information processing.
  • the CAN controller 52 can determine whether or not an error is included in the message transmission by the error determination unit 71. If it is determined that the error is included, the error notification unit 72 generates a message. The attached CAN-ID is notified to the processor 51. When the occurrence of an error is notified from the CAN controller 52, the processor 51 performs processing for recording the error information 54a including the notified CAN-ID in the recording unit 54 in the error information recording processing unit 62.
  • the conventional CAN controller does not have a function of notifying the processor of information such as CAN-ID when an error occurs, and the processor can only obtain information about the error that has occurred in the message transmitted by itself.
  • the CAN controller 52 notifies the processor 51 of the CAN-ID of the message in which the error has occurred, so that the processor 51 has the error that has occurred in the message transmitted by the ECU 3. It becomes possible to obtain the information regarding the error information regarding all the ECUs 3 in the system.
  • the processor 51 of the monitoring device 5 is provided with the error analysis unit 61, the error information recording processing unit 62, and the error processing unit 63, but the present invention is not limited to this.
  • a part or all of the error analysis unit 61, the error information recording processing unit 62, and the error processing unit 63 may be provided in the CAN controller 52.
  • the notification from the CAN controller 52 to the processor 51 is performed using the interrupt signal.
  • the present invention is not limited to this, and the notification may be performed by a method other than the interrupt signal.
  • the monitoring information 53a shown in FIG. 3 is an example, and the present invention is not limited to this.
  • Two conditions of error frequency and related message are shown as conditions for performing error processing, but other conditions may be adopted.
  • As the error processing and related error processing external notification processing and internal notification processing have been shown, but various other processing such as system shutdown, operation stop of a specific ECU 3, or discard of a message in which an error has occurred is adopted. May be.
  • the error information 54a shown in FIG. 4 is an example, and the present invention is not limited to this. Various other information not shown in FIG. 4 may be recorded in the error information 54a.
  • the monitoring device 5 is configured to record information about a message in which an error has occurred.
  • the present invention is not limited to this, and information about a message in which no error has occurred may be stored as necessary. It is good also as a structure to record.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

 通信にエラーが発生した場合に、その原因の特定を容易化することが期待できるCAN通信システム及びエラー情報記録装置を提供する。 CANバスに監視装置5を接続し、ECUが送信したメッセージにエラーが含まれているか否かを監視装置5が判定する。送信メッセージにエラーが含まれる場合、監視装置5は、このメッセージのエラーに係る情報を記録部54にエラー情報54aとして記録する。また監視装置5は、CANプロトコルに従った通信を行うCANコントローラ52と、種々の情報処理を行うプロセッサ51とを備える。CANコントローラ52は、メッセージ送信にエラーが含まれているか否かの判定を行い、エラーが含まれていると判定した場合にはメッセージに付されたCAN-IDを割り込みによりプロセッサ51へ通知する。

Description

CAN(Controller Area Network)通信システム及びエラー情報記録装置
 本発明は、複数の通信装置がCANプロトコルに従った通信を行う通信システム、及び通信装置による通信を監視するエラー情報記録装置に関する。
 従来、車両に搭載された複数のECU(Electronic Control Unit)間の通信には、CANの通信プロトコルが広く採用されている。CANの通信プロトコルを採用した通信システムは、複数のECUが共通のCANバスに接続された構成となり、送信側のECUがCANバスへ出力した信号を受信側のECUが取得することによってメッセージの送受信が行われる。このような通信システムにおいて、通信に何らかのエラーが発生した場合にどのように対処するかについて、様々な提案がなされている。
 例えば特許文献1においては、CANバスの状態を監視してエラーワーニング、エラーパッシブ又はバスオフのいずれかの異常状態を検出した場合に、仮故障判定フラグをセットして継続故障判定タイマを作動させ、その後にエラーアクティブ状態を連続して2回検出することなく故障判定時間が経過した場合に、故障確定を示す故障確定フラグをセットしてリンプホーム機能に入る通信故障診断装置が提案されている。
特開2004-348274号公報
 CANの通信プロトコルを採用した既存の通信システムでは、通信にエラーが発生した場合に、いずれのメッセージ送信中にエラーが発生したのかを知ることができるのはこのメッセージの送信元の通信装置のみである。このため、通信システムに不具合などが発生した場合、いずれのメッセージ送受信においてエラーが発生したかを調査するためには、通信システムに含まれる全ての通信装置の不具合を調べる必要があり、不具合の原因特定が困難であった。特許文献1に記載の通信故障診断装置についても、この問題を解決し得るものではない。
 本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、通信にエラーが発生した場合に、その原因の特定を容易化することが期待できるCAN通信システム及びエラー情報記録装置を提供することにある。
 本発明に係るCAN通信システムは、共通の通信線を介して接続され、CAN(Controller Area Network)プロトコルに従って通信を行う複数の通信装置を備えるCAN通信システムにおいて、前記通信線に接続されて、前記通信装置が送信したメッセージにエラーが含まれるか否かを判定するエラー判定部と、該エラー判定部がメッセージにエラーが含まれていると判定した場合に、該メッセージのエラーに係る情報を記録するエラー情報記録部とを有するエラー情報記録装置を備えることを特徴とする。
 また、本発明に係るCAN通信システムは、前記エラー情報記録部が記録する情報には、メッセージに付された識別情報を含むことを特徴とする。
 また、本発明に係るCAN通信システムは、前記エラー情報記録部が記録する情報には、エラー発生に係る時刻情報、メッセージのペイロード、該ペイロードのサイズ、エラー種別、又は、メッセージにおけるエラー箇所のうちの少なくとも1つの情報を含むことを特徴とする。
 また、本発明に係るCAN通信システムは、前記エラー情報記録装置が、前記エラー判定部がメッセージにエラーが含まれていると判定した場合に行うエラー処理の内容を、メッセージに付される識別情報毎に記憶したエラー処理内容記憶部と、該エラー処理内容記憶部が記憶した内容に基づいてエラー処理を行うエラー処理部とを有することを特徴とする。
 また、本発明に係るCAN通信システムは、前記エラー処理内容記憶部が、エラー処理を行う条件を記憶しており、前記エラー処理部は、前記エラー判定部がメッセージにエラーが含まれていると判定し、且つ、前記エラー処理内容記憶部が記憶した条件が満たされた場合に、エラー処理を行うようにしてあることを特徴とする。
 また、本発明に係るCAN通信システムは、前記エラー情報記録装置が、CANプロトコルに従ったメッセージの送受信を行うと共に、前記エラー判定部を有するCANコントローラと、前記エラー情報記録部に対して情報を記録する処理を行うプロセッサとを有し、前記CANコントローラは、前記エラー判定部がメッセージにエラーが含まれていると判定した場合に、該メッセージに付された識別情報を前記プロセッサへ通知するようにしてあり、前記プロセッサは、前記CANコントローラから通知された情報を前記エラー情報記録部に対して記録するようにしてあることを特徴とする。
 また、本発明に係るエラー情報記録装置は、CAN(Controller Area Network)プロトコルに従って通信を行う複数の通信装置が接続された共通の通信線に接続され、前記通信装置が送信したメッセージにエラーが含まれるか否かを判定するエラー判定部と、該エラー判定部がメッセージにエラーが含まれていると判定した場合に、該メッセージのエラーに係る情報を記録するエラー情報記録部とを備えることを特徴とする。
 本発明においては、複数の通信装置が通信を行う共通の通信線にエラー情報記録装置を接続し、通信装置がメッセージを送信した場合に、このメッセージにエラーが含まれるか否かを判定する。送信されたメッセージにエラーが含まれる場合、エラー情報記録装置は、このメッセージのエラーに係る情報を記録する。これによりエラー情報記録装置は、CAN通信システムの全ての通信装置について、メッセージ送信のエラーに関する情報を記録しておくことができる。よってCAN通信システムに不具合が発生した場合などには、エラー情報記録装置が記録した情報を調べることによって、不具合の原因を特定し得る情報を取得することができる。
 また本発明においては、エラー情報記録装置が記録しておく情報には、メッセージに付される識別情報(いわゆるCAN-ID)を含む。これによりエラーが発生したメッセージの送信元の通信装置の特定を容易化することができる。
 また本発明においては、エラー情報記録装置が記録しておく情報には、エラー発生に係る時刻情報、メッセージのペイロード、ペイロードのサイズ、エラー種別又はエラー箇所のうちの少なくとも1つの情報を含む。これにより、エラー発生の原因などをより詳しく特定することが容易化される。
 また本発明においては、エラー情報記録装置がメッセージの識別情報毎にエラー処理内容を記憶しておき、エラーが発生した場合には識別情報に応じたエラー処理を行う。例えばエラー情報記録装置は、無線通信などを利用して車両の外部の装置へエラー発生を通知する、車両内での警告メッセージ表示若しくは警告音声出力、又は、システムのシャットダウン等のエラー処理を行うことができる。エラー処理は、メッセージの識別情報毎に適切な処理内容を設定しておくことができる。
 また本発明においては、エラー情報記録装置がエラー処理を行う条件を記憶しておき、エラーが発生し且つ記憶した条件が満たされた場合にエラー処理を行う。エラー処理の条件は、メッセージの識別情報毎に設定しておくことができる。これによりエラー情報記録装置は、単にエラーが発生した場合にエラー処理を行うのではなく、エラーの発生頻度又は発生状況等に応じてエラー処理を行うことが可能となる。
 また本発明においては、CANプロトコルに従う通信を行うCANコントローラと、種々の情報処理を行うプロセッサとをエラー情報記録装置が備える。CANコントローラは、メッセージ送信にエラーが含まれているか否かの判定を行うことができ、エラーが含まれている場合にはメッセージに付された識別情報をプロセッサへ通知する。プロセッサは、CANコントローラからエラーの発生を通知された場合に、通知された識別情報を含むエラー情報を記録する処理を行う。
 従来のCANコントローラは、エラー発生時にプロセッサへ識別情報などの情報を通知する機能を有しておらず、プロセッサは自装置が送信したメッセージに発生したエラーに関する情報しか得ることができなかった。本発明のように、エラーが発生したメッセージの識別情報をCANコントローラがプロセッサへ通知する構成とすることによって、プロセッサは他の装置が送信したメッセージに発生したエラーに関する情報を得ることが可能となり、システム中の全ての通信装置に関するエラー情報を記録しておくことが可能となる。
 本発明による場合は、複数の通信装置が通信を行う共通の通信線に接続されたエラー情報記録装置が、各通信装置のメッセージ送信のエラーに関する情報を記録しておく構成とすることにより、CAN通信システムに不具合が発生した場合などには、エラー情報記録装置が記録した情報を調べることによって、不具合の原因を特定し得る情報を取得することができる。よって本発明は、通信にエラーが発生した場合に、その原因の特定を容易化することが期待できる。
本実施の形態に係る通信システムの構成を示す模式図である。 監視装置の構成を示すブロック図である。 監視情報の一例を示す模式図である。 エラー情報の一例を示す模式図である。 エラー処理を行うか否かの判定例を説明するための模式図である。 エラー処理を行うか否かの判定例を説明するための模式図である。 CANコントローラが行う処理の手順を示すフローチャートである。 プロセッサが行う処理の手順を示すフローチャートである。
<システム構成>
 図1は、本実施の形態に係る通信システムの構成を示す模式図である。本実施の形態に係る通信システムは、車両1に搭載された複数のECU3と、1つの監視装置5とを備えて構成されている。ECU3及び監視装置5は、車両1に敷設された共通の通信線を介して接続され、相互にメッセージを送受信することができる。本実施の形態においては、この通信線をCANバスとし、ECU3及び監視装置5は、CANプロトコルに従った通信を行う。ECU3は、例えば車両1のエンジンの制御を行うエンジンECU、車体の電装品の制御を行うボディECU、ABS(Antilock Brake System)に関する制御を行うABS-ECU、又は、車両1のエアバッグの制御を行うエアバッグECU等のように、種々の電子制御装置であってよい。監視装置5は、車内ネットワークにおけるメッセージの送受信にて発生するエラーを監視する装置である。監視装置5は、監視専用の装置として設けられてもよく、例えばゲートウェイなどの装置に監視の機能を付加した構成であってもよく、また例えばいずれか1つのECU3に監視の機能を付加した構成であってもよい。
 図2は、監視装置5の構成を示すブロック図である。監視装置5は、プロセッサ51、CANコントローラ52、ROM(Read Only Memory)53、記録部54及び車外通信部55等を備えて構成されている。プロセッサ51は、いわゆるCPU(Central Processing Unit)又はMPU(Micro-Processing Unit)等の演算処理装置であり、ROM53又は記録部54等に記憶されたプログラムを読み出して実行することにより、車内ネットワークにおける通信のエラーを監視する処理を行う。またプロセッサ51には、プログラムの実行によって、エラー解析部61、エラー情報記録処理部62及びエラー処理部63等のソフトウェア的な機能ブロックが設けられる。これらの機能ブロックが行う処理の詳細は、後述する。
 CANコントローラ52は、CANの通信プロトコルに従って、CANバスを介したECU3との通信を行う。CANコントローラ52は、プロセッサ51から与えられた送信用の情報を、CANの通信プロトコルに従った信号に変換し、変換した信号をCANバスへ出力することでECU3への情報送信を行う。CANコントローラ52は、CANバスの電位をサンプリングすることによって、ECU3が出力した信号を取得し、この信号をCANの通信プロトコルに従って2値の情報に変換することで情報の受信を行い、受信した情報をプロセッサ51へ与える。これらCANコントローラ52のメッセージ送受信に関する機能は、既存のCANコントローラの機能と同様のものである。
 本実施の形態に係る監視装置5のCANコントローラ52は、エラー判定部71、エラー通知部72及びエラー処理命令送信部73等を有している。エラー判定部71は、CANバス上にECU3が送信したメッセージにエラーが含まれているか否かを判定する。エラー通知部72は、エラー判定部71によりエラーが含まれていると判定されたメッセージに関する情報をプロセッサ51へ通知する。エラー処理命令送信部73は、プロセッサ51からエラー処理を行う命令が与えられた場合に、エラー処理の内容に応じて適宜のECU2に対してエラー処理の動作を行う旨の命令を送信する。
 ROM53は、マスクROM又はEEPROM(Electrically Erasable Programmable Read Only Memory)等の不揮発性のメモリ素子を用いて構成されている。実施の形態においてROM53は、通信にエラーが発生した場合にプロセッサ51が行うエラー処理の内容などの情報を、監視情報53aとして記憶している。図3は、監視情報53aの一例を示す模式図である。監視情報53aは、メッセージに付されるCAN-ID毎に、エラー発生時に行うエラー処理の内容を記憶したものである。監視情報53aは、CAN通信システム又は監視装置5の設計段階などにおいて決定され、ROM53に予め記憶される。なお、これらの情報は暗号化したうえでROM53に記憶する構成としてもよい。
 監視情報53aには、メッセージのCAN-IDに対応付けてエラー頻度、エラー処理、関連メッセージ及び関連エラー処理の情報が記憶されている。監視情報53aのエラー頻度は、このCAN-IDのメッセージについて連続で何回のエラーが発生した場合にエラー処理を行うかの条件である。例えばエラー頻度が2に設定されているCAN-IDが1のメッセージは、2回連続でエラーが発生した場合にエラー処理が行われるが、1回のエラー発生後に正常なメッセージ送信が行われた場合にはエラー処理は行われない。監視情報53aのエラー処理は、エラー処理を行う条件が満たされた場合に行うエラー処理の内容を記憶したものである。本例では、外部通知、内部通知及びなしが設定されているが、これら以外に例えばシステムシャットダウン、特定のECU動作停止又はエラーが発生したメッセージ破棄等の処理を行ってもよい。外部通知のエラー処理では、車外通信部55による外部のサーバ装置などへの通知が行われる。内部通知のエラー処理では、適宜のECU3へ動作命令を与えることにより、警告ランプの点灯、警告メッセージの表示又は警告音声の出力等を行い、車両1内のユーザへエラー発生を通知する。
 監視情報53aの関連メッセージは、CAN-IDが異なる複数のメッセージにエラーが発生した場合にエラー処理を行う条件である。図示の例では、CAN-IDが1のメッセージにはCAN-IDが2のメッセージが関連付けられており、CAN-IDが1のメッセージにエラーが発生し、このエラーと連続的にCAN-IDが2のメッセージにエラーが発生した場合に、エラー処理が行われる。監視情報53aの関連エラー処理は、関連メッセージの条件が満たされた場合に行うエラー処理の内容を記憶したものである。
 監視装置5の記録部54は、例えばフラッシュメモリ又はハードディスク等のデータ書換可能且つ不揮発性の記憶装置を用いて構成されている。本実施の形態において記録部54は、車内ネットワークにおいて発生したメッセージ送信のエラーに関する情報を、エラー情報54aとして記録している。図4は、エラー情報54aの一例を示す模式図である。エラー情報54aは、時刻、CAN-ID、DLC(Data Length Code)、ペイロード、エラー有無、エラー種別及びエラー位置の情報が記録される。
 エラー情報54aの時刻は、エラーが含まれると判定されたメッセージの送信開始時刻、エラー判定時刻又は送信完了時刻等の時刻である。監視装置5のプロセッサ51又はCANコントローラ52は、タイマ又は時計の機能を有しており、エラーが発生した際の時刻を取得することができる。なおこれらの時刻情報は、時計機能などから絶対的な時刻として取得される時刻である必要はない。例えば、監視装置5が起動してからの時間であってもよい。また例えば、監視装置5が周期的な情報送信を行う構成である場合に、情報送信を行ってからの経過時間であってもよい。これら以外の時刻又は時間の情報であってよい。エラー情報54aのCAN-IDは、エラーが含まれていると判定されたメッセージに付されたCAN-IDである。エラー情報54aのDLCは、メッセージに含まれるペイロードのデータ長であり、具体的にはCANのコントロールフィールドに含まれる4ビットの情報である。ペイロードは、メッセージに含まれるヘッダなどを除外した有効な情報であり、具体的にはCANのデータフィールドの情報そのものである。
 エラー情報54aのエラー有無は、このメッセージにおけるエラーの発生の有無を示す情報であり、有又は無のいずれかが設定される。ただし本実施の形態において監視装置5はエラーが発生したメッセージについての情報のみを記録しておく構成であるため、エラー情報54aに必ずしもエラー有無の項目がなくてもよい。例えば監視装置5がエラー発生の有無に関わりなく通信履歴を記憶しておく構成とした場合などに、エラー有無の項目を設ければよい。
 エラー情報54aのエラー種別は、エラーと判定した要因である。本例では、ビットエラー、ACKエラー、CRCエラー及びフォームエラーがエラー種別として記録されているが、これらは一例であって、これら以外のエラー種別が設定されてもよい。エラー情報54aのエラー位置は、CANコントローラ52によりメッセージにエラーが含まれていると判定されたビットの位置を示す情報である。
 なおエラー情報54aに含まれるCAN-ID、DLC、ペイロード、エラー有無、エラー種別及びエラー位置は、CANコントローラ52により判断され、CANコントローラ52からプロセッサ51へ通知され、プロセッサ51により記録部54へ記録される。またエラー情報54aに含まれる時刻は、プロセッサ51又はCANコントローラ52のいずれが判断してもよいが、本実施の形態においてはCANコントローラ52が判断するものとする。
 監視装置5の車外通信部55は、例えば携帯電話通信網又は無線LAN(Local Area Network)等を介して、車両1の外部に設置されたサーバ装置などの装置との通信を行う。なお監視装置5は、必ずしも車外通信部55を備えている必要はない。例えば車両1に搭載された他のECU3が車外通信部を備え、監視装置5がこのECU3を介して車外のサーバ装置などとの通信を行う構成としてもよい。
<エラー監視処理>
 監視装置5のCANコントローラ52は、CANバスに対してECU3が出力する信号をサンプリングして取得し、ECU3が送信するメッセージの監視を継続的に行っている。CANコントローラ52のエラー判定部71は、CANバス上に送信されているメッセージに対するエラーの有無を判定する。エラー判定部71は、例えばビットエラー、スタッフエラー、CRCエラー、フォームエラー及びACKエラー等のエラーの有無を判定する。なおこれらのエラーは、既存のCANのプロトコルにて規定されているものであるため、詳細な説明は省略する。またエラー判定部71が判定するエラーは上記のものに限らない。例えばメッセージにMAC(Message Authentication Code、メッセージ認証子)、電子署名又は暗号化等の技術を用いた認証機能を付加したCANの拡張システムにおいて、エラー判定部71は、認証処理において発生する認証エラーの有無を判定する構成とすることができる。
 CANコントローラ52のエラー通知部72は、エラー判定部71によりエラー有りと判定されたメッセージに関する情報をプロセッサ51へ通知する処理を行う。このときのエラー通知部72は、プロセッサ51に対する割り込みなどの信号を出力することによって通知を行う。またエラー通知部72は、エラー有りと判定されてメッセージについて、エラー判定を行った時刻、CAN-ID、DLC、ペイロード、エラー種別及びエラー位置の情報を取得してプロセッサ51へ通知する。
 監視装置5のプロセッサ51は、CANコントローラ52からの通知によりエラーの発生を知ると共に、CANコントローラ52からエラーに関する情報を取得する。プロセッサ51のエラー情報記録処理部62は、CANコントローラ52から取得した情報を、記録部54のエラー情報54aに追加して記録する。なおこのときにエラー情報記録処理部62は、暗号化又は電子署名等の技術を用いることにより、エラー情報54aの解読又は改変が困難化するように情報の記録を行ってもよい。
 プロセッサ51のエラー解析部61は、ROM53に記憶された監視情報53aに基づき、エラーが発生したメッセージについて定められたエラー処理を実行するか否かを判定する。図5は、エラー処理を行うか否かの判定例を説明するための模式図であり、エラー頻度に基づく判定例である。図示の例は、図3に示したCAN-IDが1のメッセージについてのものであり、このメッセージは監視情報53aにおいてエラー頻度が2に設定され、エラー処理として外部通知が設定されている。監視情報53aのエラー頻度は、エラーが何回連続で発生した場合にエラー処理を行うかに関する設定である。
 エラー解析部61は、CAN-ID毎にエラー発生の頻度を計数するためのカウンタを有している。エラー解析部61は、CANコントローラ52からエラーの通知が与えられた場合、この通知に基づいてエラーが発生したメッセージのCAN-IDを取得し、このCAN-IDに対応するカウンタの値に1を加算する。またエラー解析部61は、ROM53の監視情報53aを参照し、エラーが発生したメッセージのCAN-IDに対して設定されたエラー頻度の数値を取得する。カウンタの値が設定されたエラー頻度に達した場合、エラー解析部61はエラー処理を行うと判断する。エラー処理を行うと判断された場合、プロセッサ51のエラー処理部63は、監視情報53aにエラー処理として設定されたエラー処理を行う。
 図5に示す例では、時刻t0において送信されたCAN-IDが1のメッセージにはエラーが発生していない。時刻t1において送信されたメッセージにエラーが発生し、これに応じてエラー解析部61は、カウンタの値を0から1へ変化させている。次いで時刻t2において送信されたメッセージにもエラーが発生し、これに応じてエラー解析部61は、カウンタの値を1から2へ変化させている。CAN-IDが1のメッセージは、監視情報53aにおいてエラー頻度が2に設定されているため、エラー解析部61は、カウンタの値が2に達した時点で、エラー処理を行うと判定する。図3に示した監視情報53aにおいてCAN-IDが1のメッセージのエラー処理は外部通知と設定されている。このためエラー処理部63は、車外通信部55にて外部のサーバ装置などへエラーの発生を通知する処理を行う。
 なおエラー解析部61は、時刻t2において送信されたメッセージにエラーが発生しなかった場合、カウンタの値を0に初期化する必要がある。本実施の形態において、ECU3はCAN-IDが1のメッセージを周期Tで送信するものとし、エラー解析部61は、カウンタの値を増加させた後、所定期間(例えば周期T又はそれ以上の期間)が経過してもエラーが通知されなかった場合に、カウンタの値を初期化する。なおCANコントローラ52がエラーが発生していないメッセージについてもメッセージの受信通知などをプロセッサ51に対して行う構成である場合には、この通知に応じてエラー解析部61がカウンタの値を初期化してもよい。
 図6は、エラー処理を行うか否かの判定例を説明するための模式図であり、関連メッセージに基づく判定例である。図示の例は、図3に示したCAN-IDが1のメッセージについてのものであり、このメッセージは監視情報53aにおいて関連メッセージとしてCAN-IDが2のメッセージが設定されている。エラー解析部61は、CAN-ID毎に関連メッセージとの連続的なエラー発生数を計数するためのカウンタを有している(図5に示したカウンタとは別のカウンタである)。エラー解析部61は、CANコントローラ52からエラーの通知が与えられた場合、エラーが発生したメッセージのCAN-IDに対応するカウンタの値に1を加算する。
 その後、エラー解析部61は、CAN-IDが1のメッセージの送信周期Tが経過するまでの間に、CAN-IDが1のメッセージに再びエラーが発生した場合、カウンタの値を変化させずに保持する。送信周期Tが経過するまでの間に、関連メッセージとして設定されたCAN-IDが2のメッセージにエラーが発生した場合、エラー解析部61は、カウンタの値に1を加算する。送信周期Tが経過するまでの間に、CAN-IDが1又は2のメッセージにエラーが発生しない場合、エラー解析部61は、カウンタの値を0に初期化する。
 本例では、関連メッセージとして1つのCAN-IDが設定されているため、エラー解析部61は、カウンタの値が2に達した場合に、エラー処理を行うと判定する。例えば関連メッセージとして2つのCAN-IDが設定されている場合、エラー解析部61は、カウンタの値が3に達した場合に、エラー処理を行うと判定する。即ちエラー解析部61は、関連メッセージの設定数に1を加えた値にカウンタの値が達した場合に、エラー処理を行うと判定する。監視情報53aにおいてCAN-IDが1の関連エラー処理が外部通知と設定されているため、エラー処理部63は、車外通信部55にて外部のサーバ装置などへエラーの発生を通知する処理を行う。
 なお、エラー処理として内部通知が設定されている場合には、エラー処理部63は、CANコントローラ52のエラー処理命令送信部73にて車両1内の適宜のECU3などに対して動作命令を与える。例えば、内部通知として警告メッセージの表示を行う場合、エラー処理部63は、車両1内に設けられたディスプレイを制御するECU3又はカーナビゲーション装置等に対して、警告メッセージの表示命令を送信する。また例えば、内部通知として警告音声出力を行う場合、エラー処理部63は、車両1内に設けられたスピーカを制御するECU3又はオーディオ装置等に対して、警告音声出力の命令を送信する。またエラー処理として、システムのシャットダウンなどの処理が設定されてもよい。この場合、エラー処理部63は、動作を停止すべきECU3に対して動作停止命令を送信する。
<フローチャート>
 図7は、CANコントローラ52が行う処理の手順を示すフローチャートである。CANコントローラ52は、CANバスの電位をサンプリングすることによってECU3によるメッセージ送信がなされたか否かを判定する(ステップS1)。メッセージ送信がなされていない場合(S1:NO)、CANコントローラ52は、メッセージ送信がなされるまで待機する。ECU3によるメッセージ送信がなされた場合(S1:YES)、CANコントローラ52は、送信されたメッセージの受信を開始する(ステップS2)。
 次いでCANコントローラ52のエラー判定部71は、CANバス上にECU3が送信しているメッセージにエラーが含まれているか否かの判定を行う(ステップS3)。エラー判定部71がメッセージにエラーが含まれていると判定した場合(S3:YES)、CANコントローラ52のエラー通知部72は、プロセッサ51に対する割り込みなどの信号を出力することによってエラーの通知を行い(ステップS4)、ステップS5へ処理を進める。エラーが含まれていないと判定した場合(S3:NO)、CANコントローラ52は、エラー通知を行わずにステップS5へ処理を進める。
 CANコントローラ52は、ECU3によるメッセージの送信が終了したか否かを判定する(ステップS5)。メッセージの送信が終了していない場合(S5:NO)、CANコントローラ52は、ステップS3へ処理を戻す。メッセージの送信が終了した場合(S5:YES)、CANコントローラ52は、処理を終了する。
 図8は、プロセッサ51が行う処理の手順を示すフローチャートである。プロセッサ51は、割り込みなどの信号によるCANコントローラ52からのエラー通知が与えられたか否かを判定する(ステップS11)。エラー通知が与えられていない場合(S11:NO)、プロセッサ51は、エラー通知が与えられるまで待機する。エラー通知が与えられた場合(S11:YES)、プロセッサ51は、発生したエラーに関する情報、例えばエラーが発生したメッセージのCAN-ID及びエラーの種別等の情報を、CANコントローラ52から取得する(ステップS12)。プロセッサ51のエラー情報記録処理部62は、ステップS12にて取得した情報を、記録部54にエラー情報54aとして記録する(ステップS13)。
 次いでプロセッサ51のエラー解析部61は、ROM53の監視情報53aに設定されたエラー頻度及び関連メッセージ等の条件が満たされたか否かに基づき、エラー処理を行うか否かを判定するエラー処理判定を行う(ステップS14)。エラー解析部61は、監視情報53aに設定された条件が満たされたか否かを判定し(ステップS15)、条件が満たされていない場合には(S15:NO)、エラー処理を行うことなく処理を終了する。条件が満たされた場合(S15:YES)、プロセッサ51のエラー処理部63は、監視情報53aに設定されたエラー処理を行って(ステップS16)、処理を終了する。
<まとめ>
 本実施の形態に係るCAN通信システムは、複数のECU3が通信を行う共通のCANバスに監視装置5を接続し、ECU3がメッセージを送信した場合に、このメッセージにエラーが含まれているか否かを監視装置5が判定する。送信メッセージにエラーが含まれる場合、監視装置5は、このメッセージのエラーに係る情報を記録部54にエラー情報54aとして記録する。これにより監視装置5は、CANバスに接続された全てのECU3について、メッセージ送信のエラーに関する情報を記録しておくことができる。よってCAN通信システムに不具合が発生した場合などには、監視装置5の記録部54に記録されたエラー情報54aを調べることによって、不具合の原因を特定し得る情報を取得することができる。またCANバスが攻撃者により攻撃されている場合にも、その原因を特定することを可能とすることができる。
 また監視装置5がエラー情報54aとして記録しておく情報には、メッセージに付されるCAN-IDを含む。これによりエラーが発生したメッセージの送信元のECU3の特定を容易化することができる。またエラー情報54aには、時刻情報、DLC、ペイロード、エラー有無、エラー種別及びエラー位置等のうちの少なくとも1つの情報を含む。これにより、エラー発生の原因などをより詳しく特定することが容易化される。
 また監視装置5は、ROM53の監視情報53aに、エラー処理の内容をCAN-ID毎に記憶しておき、エラーが発生した場合にはCAN-IDに応じたエラー処理を行う。例えば監視装置5は、無線通信などを利用して車外通信部55により車両1の外部のサーバ装置などへエラー発生を通知する、車両1内での警告メッセージ表示若しくは警告音声出力、又は、システム若しくは該当するネットワークのシャットダウン等のエラー処理を行うことができる。エラー処理は、これら以外にも、メッセージのCAN-ID毎に適切な処理内容を設定しておくことができる。
 また監視装置5は、監視情報53aにエラー処理を行う条件を記憶しておき、エラーが発生し且つ記憶した条件が満たされた場合にエラー処理を行う。エラー処理の条件は、例えばエラーの発生頻度及び関連するメッセージでのエラー発生等の条件を設定しておくことができる。またエラー処理の条件は、メッセージのCAN-ID毎に設定しておくことができる。これにより監視装置5は、単にエラーが発生した場合にエラー処理を行うのではなく、エラーの発生頻度又は発生状況等に応じてエラー処理を行うことが可能となる。
 また監視装置5は、CANプロトコルに従った通信を行うCANコントローラ52と、種々の情報処理を行うプロセッサ51とを備える。CANコントローラ52は、メッセージ送信にエラーが含まれているか否かの判定をエラー判定部71にて行うことができ、エラーが含まれていると判定した場合にはエラー通知部72にてメッセージに付されたCAN-IDをプロセッサ51へ通知する。プロセッサ51は、CANコントローラ52からエラーの発生を通知された場合に、通知されたCAN-IDを含むエラー情報54aを記録部54に記録する処理をエラー情報記録処理部62にて行う。
 従来のCANコントローラは、エラー発生時にプロセッサへCAN-IDなどの情報を通知する機能を有しておらず、プロセッサは自装置が送信したメッセージに発生したエラーに関する情報しか得ることができなかった。本実施の形態に係る監視装置5のように、エラーが発生したメッセージのCAN-IDをCANコントローラ52がプロセッサ51へ通知する構成とすることによって、プロセッサ51はECU3が送信したメッセージに発生したエラーに関する情報を得ることが可能となり、システム中の全てのECU3に関するエラー情報を記録しておくことが可能となる。
 なお本実施の形態においては、監視装置5のプロセッサ51にエラー解析部61、エラー情報記録処理部62及びエラー処理部63を設ける構成としたが、これに限るものではない。エラー解析部61、エラー情報記録処理部62及びエラー処理部63の一部又は全部をCANコントローラ52に設ける構成としてもよい。また、CANコントローラ52からプロセッサ51への通知を割り込み信号を用いて行う構成としたが、これに限るものではなく、割り込み信号以外の方法で通知を行う構成としてもよい。
 また図3に示した監視情報53aは一例であって、これに限るものではない。エラー処理を行う条件として、エラー頻度及び関連メッセージの2つの条件を示したが、これら以外の条件を採用してもよい。エラー処理及び関連エラー処理として、外部通知及び内部通知の処理を示したが、例えばシステムのシャットダウン、特定のECU3の動作停止、又は、エラーが発生したメッセージの破棄等のその他の種々の処理を採用してもよい。
 また図4に示したエラー情報54aは一例であって、これに限るものではない。エラー情報54aには、図4に示していないその他の種々の情報を記録しておいてよい。また本実施の形態において監視装置5は、エラーが発生したメッセージについて情報を記録しておく構成としたが、これに限るものではなく、エラーが発生していないメッセージについても必要に応じて情報を記録しておく構成としてよい。
 1 車両
 3 ECU(通信装置)
 5 監視装置(エラー情報記録装置)
 51 プロセッサ
 52 CANコントローラ
 53 ROM(エラー処理内容記憶部)
 53a 監視情報
 54 記録部(エラー情報記録部)
 54a エラー情報
 55 車外通信部
 61 エラー解析部
 62 エラー情報記録処理部
 63 エラー処理部
 71 エラー判定部
 72 エラー通知部
 73 エラー処理命令送信部

Claims (7)

  1.  共通の通信線を介して接続され、CAN(Controller Area Network)プロトコルに従って通信を行う複数の通信装置を備えるCAN通信システムにおいて、
     前記通信線に接続されて、前記通信装置が送信したメッセージにエラーが含まれるか否かを判定するエラー判定部と、該エラー判定部がメッセージにエラーが含まれていると判定した場合に、該メッセージのエラーに係る情報を記録するエラー情報記録部とを有するエラー情報記録装置を備えること
     を特徴とするCAN通信システム。
  2.  前記エラー情報記録部が記録する情報には、メッセージに付された識別情報を含むこと
     を特徴とする請求項1に記載のCAN通信システム。
  3.  前記エラー情報記録部が記録する情報には、エラー発生に係る時刻情報、メッセージのペイロード、該ペイロードのサイズ、エラー種別、又は、メッセージにおけるエラー箇所のうちの少なくとも1つの情報を含むこと
     を特徴とする請求項2に記載のCAN通信システム。
  4.  前記エラー情報記録装置は、
     前記エラー判定部がメッセージにエラーが含まれていると判定した場合に行うエラー処理の内容を、メッセージに付される識別情報毎に記憶したエラー処理内容記憶部と、
     該エラー処理内容記憶部が記憶した内容に基づいてエラー処理を行うエラー処理部と
     を有すること
     を特徴とする請求項1乃至請求項3のいずれか1つに記載のCAN通信システム。
  5.  前記エラー処理内容記憶部は、エラー処理を行う条件を記憶しており、
     前記エラー処理部は、前記エラー判定部がメッセージにエラーが含まれていると判定し、且つ、前記エラー処理内容記憶部が記憶した条件が満たされた場合に、エラー処理を行うようにしてあること
     を特徴とする請求項4に記載のCAN通信システム。
  6.  前記エラー情報記録装置は、
     CANプロトコルに従ったメッセージの送受信を行うと共に、前記エラー判定部を有するCANコントローラと、
     前記エラー情報記録部に対して情報を記録する処理を行うプロセッサと
     を有し、
     前記CANコントローラは、前記エラー判定部がメッセージにエラーが含まれていると判定した場合に、該メッセージに付された識別情報を前記プロセッサへ通知するようにしてあり、
     前記プロセッサは、前記CANコントローラから通知された情報を前記エラー情報記録部に対して記録するようにしてあること
     を特徴とする請求項1乃至請求項5のいずれか1つに記載のCAN通信システム。
  7.  CAN(Controller Area Network)プロトコルに従って通信を行う複数の通信装置が接続された共通の通信線に接続され、
     前記通信装置が送信したメッセージにエラーが含まれるか否かを判定するエラー判定部と、
     該エラー判定部がメッセージにエラーが含まれていると判定した場合に、該メッセージのエラーに係る情報を記録するエラー情報記録部と
     を備えること
     を特徴とするエラー情報記録装置。
PCT/JP2015/082341 2014-11-20 2015-11-18 CAN(Controller Area Network)通信システム及びエラー情報記録装置 WO2016080417A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201580061672.6A CN107005450A (zh) 2014-11-20 2015-11-18 CAN(Controller Area Network:控制器局域网络)通信系统及错误信息记录装置
DE112015005253.4T DE112015005253T5 (de) 2014-11-20 2015-11-18 Controller Area Network (CAN)-Kommunikationssystem und Aufzeichnungsvorrichtung für Fehlerinformationen
US15/528,274 US10484200B2 (en) 2014-11-20 2015-11-18 Controller area network (CAN) communication system and error information recording device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2014-235781 2014-11-20
JP2014235781A JP6342311B2 (ja) 2014-11-20 2014-11-20 CAN(Controller Area Network)通信システム及びエラー情報記録装置

Publications (1)

Publication Number Publication Date
WO2016080417A1 true WO2016080417A1 (ja) 2016-05-26

Family

ID=56013952

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/082341 WO2016080417A1 (ja) 2014-11-20 2015-11-18 CAN(Controller Area Network)通信システム及びエラー情報記録装置

Country Status (5)

Country Link
US (1) US10484200B2 (ja)
JP (1) JP6342311B2 (ja)
CN (1) CN107005450A (ja)
DE (1) DE112015005253T5 (ja)
WO (1) WO2016080417A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102016216700B4 (de) * 2016-09-05 2020-03-19 Audi Ag Verfahren zum Identifizieren einer defekten Fahrzeugkomponente in einem Kraftfahrzeug sowie Kraftfahrzeug mit über ein Kommunikationsnetzwerk gekoppelten Fahrzeugkomponenten

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102646295B1 (ko) * 2016-12-06 2024-03-14 동국대학교 산학협력단 자동차 통신 네트워크 분석 방법 및 장치
JP6969266B2 (ja) * 2017-10-04 2021-11-24 トヨタ自動車株式会社 車両用制御装置
US10958470B2 (en) * 2018-11-06 2021-03-23 Lear Corporation Attributing bus-off attacks based on error frames
CN113625681B (zh) * 2021-07-19 2022-12-13 湖南大学 Can总线异常检测方法、系统及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01293450A (ja) * 1988-05-23 1989-11-27 Nec Corp 障害装置特定システム
JP2009202720A (ja) * 2008-02-27 2009-09-10 Toyota Motor Corp 通信システム、その異常推定方法、及び情報読出装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004348274A (ja) * 2003-05-20 2004-12-09 Fuji Heavy Ind Ltd 通信故障の診断装置
US20060277444A1 (en) * 2005-06-03 2006-12-07 Nicholas Holian Recordation of error information
US8595312B2 (en) * 2010-06-30 2013-11-26 Microsafe Sa De Cv Master device detecting or host computer detecting new device attempting to connect to controller area network (CAN)
JP5614143B2 (ja) * 2010-07-21 2014-10-29 セイコーエプソン株式会社 情報処理システム、印刷装置及び情報処理方法
JP5652333B2 (ja) 2011-05-31 2015-01-14 富士通株式会社 記憶装置、ストレージシステム及び記憶装置制御方法
JP5518810B2 (ja) * 2011-08-18 2014-06-11 日立オートモティブシステムズ株式会社 車両制御装置、車両制御システム
CN102929178A (zh) * 2012-11-10 2013-02-13 大连东方电器制造有限公司 一种故障记录分析装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01293450A (ja) * 1988-05-23 1989-11-27 Nec Corp 障害装置特定システム
JP2009202720A (ja) * 2008-02-27 2009-09-10 Toyota Motor Corp 通信システム、その異常推定方法、及び情報読出装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102016216700B4 (de) * 2016-09-05 2020-03-19 Audi Ag Verfahren zum Identifizieren einer defekten Fahrzeugkomponente in einem Kraftfahrzeug sowie Kraftfahrzeug mit über ein Kommunikationsnetzwerk gekoppelten Fahrzeugkomponenten

Also Published As

Publication number Publication date
US20170373878A1 (en) 2017-12-28
JP6342311B2 (ja) 2018-06-13
US10484200B2 (en) 2019-11-19
CN107005450A (zh) 2017-08-01
JP2016100725A (ja) 2016-05-30
DE112015005253T5 (de) 2017-08-10

Similar Documents

Publication Publication Date Title
WO2016080417A1 (ja) CAN(Controller Area Network)通信システム及びエラー情報記録装置
US10462226B2 (en) Method for detecting fraudulent frame sent over an in-vehicle network system
US11356475B2 (en) Frame transmission prevention apparatus, frame transmission prevention method, and in-vehicle network system
JP6353134B2 (ja) 電子制御ユニット、車載ネットワークシステム及び車両用通信方法
JP6487406B2 (ja) ネットワーク通信システム
JP6477281B2 (ja) 車載中継装置、車載通信システム及び中継プログラム
WO2017038500A1 (ja) 中継装置
JP7286327B2 (ja) 情報処理装置及び情報処理方法
CN111066001A (zh) 日志输出方法、日志输出装置以及程序
WO2018105319A1 (ja) 情報処理装置及び情報処理方法
JP6490879B2 (ja) 情報処理装置及び情報処理方法
US10223319B2 (en) Communication load determining apparatus
WO2018105321A1 (ja) 情報処理装置及び情報処理方法
CN108632242B (zh) 通信装置及接收装置
JP6674854B2 (ja) 演算装置
WO2020105657A1 (ja) 車載中継装置及び中継方法
CN114051710B (zh) 信息处理装置及正规通信判定方法
JP2007156858A (ja) 監視装置および監視システム
CN114450679A (zh) 异常检测系统及异常检测方法
JP2017022613A (ja) 通信装置、通信システムおよびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15862016

Country of ref document: EP

Kind code of ref document: A1

DPE1 Request for preliminary examination filed after expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 15528274

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 112015005253

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15862016

Country of ref document: EP

Kind code of ref document: A1