CN113946147A - CAN message diagnosis method - Google Patents

CAN message diagnosis method Download PDF

Info

Publication number
CN113946147A
CN113946147A CN202111129716.8A CN202111129716A CN113946147A CN 113946147 A CN113946147 A CN 113946147A CN 202111129716 A CN202111129716 A CN 202111129716A CN 113946147 A CN113946147 A CN 113946147A
Authority
CN
China
Prior art keywords
message
messages
sent
diagnosis
received
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
CN202111129716.8A
Other languages
Chinese (zh)
Inventor
郭雪敬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Commercial Vehicle Co Ltd
Original Assignee
Dongfeng Commercial Vehicle Co 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 Dongfeng Commercial Vehicle Co Ltd filed Critical Dongfeng Commercial Vehicle Co Ltd
Priority to CN202111129716.8A priority Critical patent/CN113946147A/en
Publication of CN113946147A publication Critical patent/CN113946147A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The technical scheme adopted by the invention is as follows: a CAN message diagnosis method is characterized in that: the method comprises the following steps: step S1, reading the CAN message and confirming the validity of the message; step S2, counting the CAN messages which are received in the diagnosis period and confirmed to be valid in the step S1; step S3, comparing the counting result of the effective CAN message obtained in step S2 with the number of the CAN messages expected to be sent; and step S4, generating a diagnosis conclusion that the CAN message is transmitted too fast or too slow according to the comparison result generated in the step S3. The invention effectively realizes the diagnosis whether the CAN message transmission meets the expected requirements.

Description

CAN message diagnosis method
Technical Field
The invention belongs to the technical field of engine electric control, and particularly relates to a CAN message diagnosis method.
Background
Can (controller Area network) is a serial communication protocol that is ISO international standardized. In the automobile industry, various electronic control systems have been developed for the purpose of safety, comfort, convenience, low power consumption, and low cost, and information communication between controllers is required, and information transmission is performed through a CAN network in order to reduce the number of harnesses.
The accurate transmission of the CAN messages is a precondition that each controller CAN correctly execute the functions, so that the safe operation of the automobile CAN be ensured. In order to ensure the correctness and real-time performance of information transmission, the messages sent on the CAN bus need to be monitored.
The general functional layer message monitoring is judged by message overtime, checksum and counter.
In the prior art, the fault diagnosis only can be performed on overtime faults of the message, but the fault diagnosis cannot be performed on the faults of too fast sending or too slow sending of the message.
The load rate of the bus is affected when the message is sent too fast, which means that more data needs to be sent, which may cause that the message with low priority is not sent all the time or communication delay occurs, and the probability of the communication delay occurring in the node with low priority is relatively higher.
The slow sending of the message may cause the data transmission to be untimely, for example, a frame loss occurs, which may cause the sent data to be wrong, thereby affecting the calculation real-time performance of the control function.
Disclosure of Invention
The invention aims to solve the defects in the background technology, and provides a CAN message diagnosis method, which CAN effectively realize the diagnosis of whether the CAN message transmission meets the expected requirements.
The technical scheme adopted by the invention is as follows: a CAN message diagnosis method is characterized in that: the method comprises the following steps:
step S1, reading the CAN message and confirming the validity of the message;
step S2, counting the CAN messages which are received in the diagnosis period and confirmed to be valid in the step S1;
step S3, comparing the counting result of the effective CAN message obtained in step S2 with the number of the CAN messages expected to be sent;
and step S4, generating a diagnosis conclusion that the CAN message is transmitted too fast or too slow according to the comparison result generated in the step S3.
In the above technical solution, in the step S1, the judgment condition for the received CAN packet includes: the source address of the received CAN message is not equal to the target address of the EECU; the PDU value range of the received CAN message is within the threshold value range of the maximum allowed PDU value; the target address of the received CAN message is the target address of the EECU; if the three judgment conditions are met, judging that the received CAN message is effective; and if any one of the three judgment conditions is not met, judging that the received CAN message is invalid.
In the above technical solution, in the step S1, the data packet of the CAN packet is unpacked according to different PDU values of different CAN packets.
In the above technical solution, in the step S2, the diagnosis period is set according to a task scheduling period of the CAN packet.
In the above technical solution, in the step S2, the method for counting valid CAN packets includes the following steps: and counting once when the target controller sent by the CAN message receives the CAN message sent once, wherein the number of the CAN messages received in each task scheduling is the difference value between the counting value of the target controller aiming at the CAN message in the task scheduling and the counting value of the target controller aiming at the CAN message in the last task scheduling, and the counting value of the messages received in the diagnosis period is the accumulation of the number of the messages received in all task scheduling periods in the diagnosis period.
In the above technical solution, in the step S3, the counting result of the valid CAN message obtained in the step S2 is compared with the number of the messages of the number of the CAN messages expected to be sent, and it is determined whether the difference between the counting result of the valid CAN message and the number of the CAN messages expected to be sent exceeds the limit value.
In the above technical solution, in the step S4, if the counting result of the valid CAN messages obtained in the step S2 is greater than the number of messages of the number of the CAN messages expected to be sent, and the difference between the counting result of the valid CAN messages and the number of the CAN messages expected to be sent exceeds the maximum limit, it is determined that the CAN messages are sent too fast.
In the above technical solution, in the step S4, if the counting result of the valid CAN messages obtained in the step S2 is less than the number of messages of the number of the CAN messages expected to be sent, and the difference between the counting result of the valid CAN messages and the number of the CAN messages expected to be sent exceeds the minimum limit, it is determined that the CAN messages are sent too slowly.
In the above technical solution, in step S4, after it is determined that the CAN message is sent too fast or the CAN message is sent too slow, the fault anti-jitter processing is performed, and when it is determined that the number of times that the CAN message is sent too fast or the number of times that the CAN message is sent too slow exceeds the anti-jitter number, a diagnosis result of the fault that the CAN message is sent too fast or the CAN message is sent too slow is generated and output.
The invention provides a CAN message diagnosis system, which specifically comprises a CAN message validity confirmation module, a CAN message counting result comparison module and a diagnosis result output module, wherein the input end of the CAN message validity confirmation module is connected with a CAN message, the output end of the CAN message validity confirmation module is electrically connected with the input end of the CAN message counting module, the output end of the CAN message counting module is electrically connected with the input end of the CAN message counting result comparison module, and the output end of the CAN message counting result comparison module is electrically connected with the input end of the diagnosis result output module.
The CAN message validity confirming module is used for reading the CAN message, confirming the message validity and sending the valid CAN message to the CAN message counting module.
The CAN message validity confirmation module is used for setting judgment conditions for the received CAN message, wherein the judgment conditions comprise: the source address of the received CAN message is not equal to the target address of the EECU; the PDU value range of the received CAN message is within the threshold value range of the maximum allowed PDU value; and the target address of the received CAN message is the target address of the EECU. The CAN message validity confirmation module judges the validity of the received CAN based on the three judgment conditions: if the three judgment conditions are met, judging that the received CAN message is effective; and if any one of the three judgment conditions is not met, judging that the received CAN message is invalid.
And the CAN message validity confirmation module unpacks the data packet of the CAN message according to different PDU values of different CAN messages.
The CAN message counting module is used for receiving the CAN messages confirmed to be valid, counting the CAN messages confirmed to be valid and received in the diagnosis period, and sending counting results to the CAN message counting result comparing module.
The CAN message counting module is internally provided with a diagnosis period which is set according to the task scheduling period of the CAN message.
The method for counting the effective CAN messages by the CAN message counting module comprises the following steps: the CAN message counting module is arranged in a target controller for CAN message transmission; the target controller sent by the CAN message counts once when receiving the CAN message sent once, the number of the CAN messages received in each task scheduling is the difference value between the counting value of the target controller aiming at the CAN message in the task scheduling and the counting value of the target controller aiming at the CAN message in the last task scheduling, and the counting value of the messages received in the diagnosis period of the CAN message counting module is the accumulation of the number of the messages received in all task scheduling periods in the diagnosis period.
And the CAN message counting result comparison module is used for comparing the counting result of the received effective CAN message with the number of the CAN messages expected to be sent. And the CAN message counting result comparison module acquires and sets the number of CAN messages expected to be sent. The CAN message counting result comparison module compares the counting result of the received effective CAN message with the message quantity of the CAN message quantity expected to be sent, and judges whether the difference value between the counting result of the effective CAN message and the CAN message quantity expected to be sent exceeds a limit value or not. And the CAN message counting result comparison module sends the comparison result of the process to the diagnosis result output module.
And the diagnosis result output module is used for generating a diagnosis result that the CAN message is transmitted too fast or too slow according to the received comparison result and outputting the diagnosis result.
And if the diagnosis result output module judges that the counting result of the received effective CAN message is more than the message quantity of the CAN message quantity expected to be sent, and the difference value between the counting result of the effective CAN message and the CAN message quantity expected to be sent exceeds the maximum limit value, the CAN message is judged to be sent too fast.
And if the diagnosis result output module judges that the counting result of the received effective CAN message is less than the message quantity of the CAN message quantity expected to be sent, and the difference value between the counting result of the effective CAN message and the CAN message quantity expected to be sent exceeds the minimum limit value, the CAN message is judged to be sent too slowly.
And when the CAN message is judged to be transmitted too fast or too slow, the diagnosis result of the fault of the CAN message transmission too fast or the CAN message transmission too slow is generated and output.
The present invention provides a computer-readable storage medium characterized by: the computer-readable storage medium stores a program of the CAN message diagnosis method, and the program of the CAN message diagnosis method is executed by the vehicle controller to realize the steps of the CAN message diagnosis method in the above technical scheme.
The invention has the beneficial effects that: the invention aims to design a CAN message diagnosis method aiming at the technical problems, and the method is used for monitoring the fault of too fast or too slow message transmission. The method provided by the invention is a supplement to a general CAN message monitoring method, and in order to improve the accuracy of CAN message diagnosis, redundancy diagnosis is carried out on the accuracy of the message by using a CAN message diagnosis method different from the general CAN message diagnosis method. The method provided by the invention can not only monitor the fault of overtime message transmission, but also monitor the fault of inconsistent with the expected transmission period, such as too fast or too slow message transmission; the invention CAN be combined with a general CAN message diagnosis method, is used in the monitoring design of the CAN message, and ensures the accuracy and the real-time property of CAN message transmission.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
FIG. 2 is a schematic circuit diagram of an embodiment of the present invention
Detailed Description
The invention will be further described in detail with reference to the following drawings and specific examples, which are not intended to limit the invention, but are for clear understanding.
As shown in fig. 1, the present invention provides a CAN message diagnosis method, which is characterized in that: the method comprises the following steps:
and step S1, reading the CAN message and confirming the validity of the message.
In the above technical solution, in the step S1, the judgment condition for the received CAN packet includes: the source address of the received CAN message is not equal to the target address of the EECU; the PDU value range of the received CAN message is within the threshold value range of the maximum allowed PDU value; the target address of the received CAN message is the target address of the EECU; if the three judgment conditions are met, judging that the received CAN message is effective; and if any one of the three judgment conditions is not met, judging that the received CAN message is invalid.
In the above technical solution, in the step S1, the data packet of the CAN packet is unpacked according to different PDU values of different CAN packets. PDU (protocol Data Unit), which is a protocol Data unit, is a composition of SDU and PCI. The layering of the PDUs according to ISO is also known by a definite name, the PDUs transmitted at the data link layer are L-PDUs, the PDUs transmitted at the network layer are N-PDUs, and the PDUs transmitted at the interaction layer are I-PDUs.
Step S2, counting the CAN messages received in the diagnosis period and confirmed to be valid in step S1.
In the above technical solution, in the step S2, the diagnosis period is set according to a task scheduling period of the CAN packet. The diagnosis period of the CAN message is a standard quantity, and is generally marked as 5 times of the sending period of the CAN message according to design experience.
In the above technical solution, in the step S2, the method for counting valid CAN packets includes the following steps: and counting once when the target controller sent by the CAN message receives the CAN message sent once, wherein the number of the CAN messages received in each task scheduling is the difference value between the counting value of the target controller aiming at the CAN message in the task scheduling and the counting value of the target controller aiming at the CAN message in the last task scheduling, and the counting value of the messages received in the diagnosis period is the accumulation of the number of the messages received in all task scheduling periods in the diagnosis period.
And step S3, comparing the counting result of the effective CAN messages obtained in the step S2 with the number of the CAN messages expected to be sent.
In the above technical solution, in the step S3, the counting result of the valid CAN message obtained in the step S2 is compared with the number of the messages of the number of the CAN messages expected to be sent, and it is determined whether the difference between the counting result of the valid CAN message and the number of the CAN messages expected to be sent exceeds the limit value.
And step S4, generating a diagnosis conclusion that the CAN message is transmitted too fast or too slow according to the comparison result generated in the step S3.
In the above technical solution, in the step S4, if the counting result of the valid CAN messages obtained in the step S2 is greater than the number of messages of the number of the CAN messages expected to be sent, and the difference between the counting result of the valid CAN messages and the number of the CAN messages expected to be sent exceeds the maximum limit, it is determined that the CAN messages are sent too fast.
In the above technical solution, in the step S4, if the counting result of the valid CAN messages obtained in the step S2 is less than the number of messages of the number of the CAN messages expected to be sent, and the difference between the counting result of the valid CAN messages and the number of the CAN messages expected to be sent exceeds the minimum limit, it is determined that the CAN messages are sent too slowly.
In the above technical solution, in step S4, after it is determined that the CAN message is sent too fast or the CAN message is sent too slow, the fault anti-jitter processing is performed, and when it is determined that the number of times that the CAN message is sent too fast or the number of times that the CAN message is sent too slow exceeds the anti-jitter number, a diagnosis result of the fault that the CAN message is sent too fast or the CAN message is sent too slow is generated and output.
The invention provides a CAN message diagnosis system, which specifically comprises a CAN message validity confirmation module, a CAN message counting result comparison module and a diagnosis result output module, wherein the input end of the CAN message validity confirmation module is connected with a CAN message, the output end of the CAN message validity confirmation module is electrically connected with the input end of the CAN message counting module, the output end of the CAN message counting module is electrically connected with the input end of the CAN message counting result comparison module, and the output end of the CAN message counting result comparison module is electrically connected with the input end of the diagnosis result output module.
The CAN message validity confirming module is used for reading the CAN message, confirming the message validity and sending the valid CAN message to the CAN message counting module.
The CAN message validity confirmation module is used for setting judgment conditions for the received CAN message, wherein the judgment conditions comprise: the source address of the received CAN message is not equal to the target address of the EECU; the PDU value range of the received CAN message is within the threshold value range of the maximum allowed PDU value; and the target address of the received CAN message is the target address of the EECU. The CAN message validity confirmation module judges the validity of the received CAN based on the three judgment conditions: if the three judgment conditions are met, judging that the received CAN message is effective; and if any one of the three judgment conditions is not met, judging that the received CAN message is invalid.
And the CAN message validity confirmation module unpacks the data packet of the CAN message according to different PDU values of different CAN messages.
The CAN message counting module is used for receiving the CAN messages confirmed to be valid, counting the CAN messages confirmed to be valid and received in the diagnosis period, and sending counting results to the CAN message counting result comparing module.
The CAN message counting module is internally provided with a diagnosis period which is set according to the task scheduling period of the CAN message.
The method for counting the effective CAN messages by the CAN message counting module comprises the following steps: the CAN message counting module is arranged in a target controller for CAN message transmission; the target controller sent by the CAN message counts once when receiving the CAN message sent once, the number of the CAN messages received in each task scheduling is the difference value between the counting value of the target controller aiming at the CAN message in the task scheduling and the counting value of the target controller aiming at the CAN message in the last task scheduling, and the counting value of the messages received in the diagnosis period of the CAN message counting module is the accumulation of the number of the messages received in all task scheduling periods in the diagnosis period.
And the CAN message counting result comparison module is used for comparing the counting result of the received effective CAN message with the number of the CAN messages expected to be sent. And the CAN message counting result comparison module acquires and sets the number of CAN messages expected to be sent. The CAN message counting result comparison module compares the counting result of the received effective CAN message with the message quantity of the CAN message quantity expected to be sent, and judges whether the difference value between the counting result of the effective CAN message and the CAN message quantity expected to be sent exceeds a limit value or not. And the CAN message counting result comparison module sends the comparison result of the process to the diagnosis result output module.
And the diagnosis result output module is used for generating a diagnosis result that the CAN message is transmitted too fast or too slow according to the received comparison result and outputting the diagnosis result.
And if the diagnosis result output module judges that the counting result of the received effective CAN message is more than the message quantity of the CAN message quantity expected to be sent, and the difference value between the counting result of the effective CAN message and the CAN message quantity expected to be sent exceeds the maximum limit value, the CAN message is judged to be sent too fast.
And if the diagnosis result output module judges that the counting result of the received effective CAN message is less than the message quantity of the CAN message quantity expected to be sent, and the difference value between the counting result of the effective CAN message and the CAN message quantity expected to be sent exceeds the minimum limit value, the CAN message is judged to be sent too slowly.
And when the CAN message is judged to be transmitted too fast or too slow, the diagnosis result of the fault of the CAN message transmission too fast or the CAN message transmission too slow is generated and output.
The present invention provides a computer-readable storage medium characterized by: the computer-readable storage medium stores a program of the CAN message diagnosis method, and the program of the CAN message diagnosis method is executed by the vehicle controller to realize the steps of the CAN message diagnosis method in the above technical scheme.
The embodiment adopted by the invention is shown in fig. 2 and comprises a power assembly CAN bus (PowerTrain CAN) and a diagnostic control bus (diagnosecan), wherein the power assembly CAN bus (PowerTrain CAN) and the diagnostic control bus (diagnosecan) are respectively and electrically connected with a vehicle control unit VECU and an engine control assembly EECU, and an auxiliary control module ACM is electrically connected with the diagnostic control bus. Also electrically connected to the diagnostic control bus (diagnosecan) are an original equipment manufacturer service tool (OEM service tool) and an EATS support tool. The engine control unit EECU is electrically connected with a variable-section turbocharger VGT and smart PBS. The engine control assembly EECU and the auxiliary control module ACM are electrically connected with an automobile exhaust treatment device, a supply chain management module SCM and an oil Tank information module Tank. And the vehicle control unit VECU and the engine control assembly EECU are electrically connected with other controllers and an automobile instrument panel dashboard.
Taking the SPN91 sent by the vehicle controller VECU to the engine control assembly EECU as an example, the vehicle controller VECU sends an accelerator opening signal to the engine control assembly EECU through the sent SPN91 message every 20ms, the internal required torque calculation module of the engine control assembly EECU calculates the required torque of the driver every 20ms (task scheduling period), the engine control assembly EECU has a count every time the engine control assembly EECU receives the SPN91 message sent by the vehicle controller VECU, the required torque calculation module receives the message sent by the vehicle controller VECU 1 time every time the vehicle controller VECU is scheduled, and then the counter accumulates the number of the received messages.
The specific embodiment provided by the invention comprises the following application steps:
step 1: reading the CAN message: and judging the effectiveness of the CAN message by using the source address, the PDU value and the target address of the CAN message and reading data contained in the CAN message.
Firstly, the validity of a received CAN message is confirmed, and the judgment conditions are as follows: 1) the source address of the received CAN message is not equal to the target address of the EECU; 2) the PDU value range of the received CAN message is within the threshold value range of the maximum allowed PDU value; 3) the target address of the received CAN message is the target address of the EECU; if the three conditions are all met, the received CAN message is valid;
and then, unpacking the data packet of the CAN message according to different PDU values. Taking the SPN91 sent by the vehicle control unit VECU to the engine control unit EECU as an example, the determination conditions are: the source address of the SPN91 message received by the engine control assembly EECU is not equal to the target address of the engine control assembly EECU; the SPN91 message is sent to an engine control assembly EECU by a vehicle control unit VECU, the address of the vehicle control unit VECU is a source address 31, and the address of the engine control assembly EECU is a target address 0F;
step 2: counting the number of received CAN messages in the diagnosis period: the target controller for CAN message transmission counts once when receiving a CAN message transmitted once, the number of the CAN messages received in each task scheduling is the difference value of the CAN messages received in two task scheduling, the diagnosis period CAN be designed to be several times of the task scheduling period, and the counting value of the CAN messages received in the diagnosis period is the accumulation of the number of the CAN messages received in the task scheduling period.
And setting a CAN message monitoring period based on the period of CAN message transmission, and counting the number of the received CAN messages in the CAN message diagnosis period.
The method for calculating the number of the received CAN messages in the diagnosis period comprises the following steps: and accumulating the difference value between the number of the received CAN messages recorded at the time and the last time in the EECU hardware CAN module counter. Specifically, the method for counting the valid CAN messages comprises the following steps: and counting once when the target controller sent by the CAN message receives the CAN message sent once, wherein the number of the CAN messages received in each task scheduling is the difference value between the counting value of the target controller aiming at the CAN message in the task scheduling and the counting value of the target controller aiming at the CAN message in the last task scheduling, and the counting value of the messages received in the diagnosis period is the accumulation of the number of the messages received in all task scheduling periods in the diagnosis period.
Determination of the diagnosis period (J1939_ rx _ diagnostic _ period): the CAN message diagnosis period is a standard quantity, and is generally 5 times of the CAN message sending period according to design experience. The diagnostic period for this SPN91 message can be designed to be 5 times the message transmission period, i.e., 20ms × 5 to 100 ms. When the CAN message is not received in the diagnosis period, the CAN message transmission overtime CAN be judged
Maximum limit (J1939_ rx _ max _ messages) calculation method: diagnostic period/sending period of CAN message. The maximum limit for this message SPN91 may be set to 10 and the minimum limit may be set to 0.
The number of the CAN messages received in the CAN message diagnosis period is the accumulated value of the number of the CAN messages received in each task scheduling.
And step 3: and (3) diagnosing whether the CAN message is started too fast or too slow: when the CAN message is not detected to be not timed out by a general diagnosis method, the CAN message is transmitted faster or slower fault diagnosis is carried out based on whether the CAN message is transmitted too fast or too slow in a preset time period (including the EECU monitoring layer, the CAN message transmitting layer and the fault monitoring window period).
Identifying the number of effective CAN messages in a diagnosis time interval based on a set monitoring period, and if the number of the identified effective CAN messages is more than the number of the CAN messages expected to be sent and exceeds the maximum limit value, judging that the CAN messages are too fast; and if the number of the identified effective CAN messages is less than the expected number of the CAN messages and exceeds the minimum limit value, judging that the CAN messages are too slow. The number, the maximum limit value and the minimum limit value of CAN messages to be sent CAN be set according to the requirements of actual application scenes.
And 4, step 4: failure reporting
And when the CAN message is diagnosed to be sent too fast or too slow, carrying out fault anti-jitter processing, and when the CAN message is sent too fast or too slow, reporting that the CAN message is sent too fast or too slow, wherein the times of the CAN message is over the anti-jitter times.
The invention designs a CAN message diagnosis method, which monitors faults of too fast or too slow message transmission. The method provided by the invention is a supplement to a general CAN message monitoring method, and in order to improve the accuracy of CAN message diagnosis, redundancy diagnosis is carried out on the accuracy of the message by using a CAN message diagnosis method different from the general CAN message diagnosis method. The method provided by the invention can not only monitor the fault of overtime message transmission, but also monitor the fault of inconsistent with the expected transmission period, such as too fast or too slow message transmission; the invention CAN be combined with a general CAN message diagnosis method, is used in the monitoring design of the CAN message, and ensures the accuracy and the real-time property of CAN message transmission.
Finally, it should be noted that the above embodiments are merely representative examples of the present invention. It is obvious that the invention is not limited to the above-described embodiments, but that many variations are possible. Any simple modification, equivalent change and modification made to the above embodiments in accordance with the technical spirit of the present invention should be considered to be within the scope of the present invention.
Here, it should be noted that the description of the above technical solutions is exemplary, the present specification may be embodied in different forms, and should not be construed as being limited to the technical solutions set forth herein. Rather, these descriptions are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Furthermore, the technical solution of the present invention is limited only by the scope of the claims.
The shapes, sizes, ratios, angles, and numbers disclosed to describe aspects of the specification and claims are examples only, and thus, the specification and claims are not limited to the details shown. In the following description, when a detailed description of related known functions or configurations is determined to unnecessarily obscure the focus of the present specification and claims, the detailed description will be omitted.
Where the terms "comprising", "having" and "including" are used in this specification, there may be another part or parts unless otherwise stated, and the terms used may generally be in the singular but may also be in the plural.
It should be noted that although the terms "first," "second," "top," "bottom," "side," "other," "end," "other end," and the like may be used and used in this specification to describe various components, these components and parts should not be limited by these terms. These terms are only used to distinguish one element or section from another element or section. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, with the top and bottom elements being interchangeable or switchable with one another, where appropriate, without departing from the scope of the present description; the components at one end and the other end may be of the same or different properties to each other.
Further, in constituting the component, although it is not explicitly described, it is understood that a certain error region is necessarily included.
In describing positional relationships, for example, when positional sequences are described as being "on.. above", "over.. below", "below", and "next", unless such words or terms are used as "exactly" or "directly", they may include cases where there is no contact or contact therebetween. If a first element is referred to as being "on" a second element, that does not mean that the first element must be above the second element in the figures. The upper and lower portions of the member will change depending on the angle of view and the change in orientation. Thus, in the drawings or in actual construction, if a first element is referred to as being "on" a second element, it can be said that the first element is "under" the second element and the first element is "over" the second element. In describing temporal relationships, unless "exactly" or "directly" is used, the description of "after", "subsequently", and "before" may include instances where there is no discontinuity between steps. The features of the various embodiments of the present invention may be partially or fully combined or spliced with each other and performed in a variety of different configurations as would be well understood by those skilled in the art. Embodiments of the invention may be performed independently of each other or may be performed together in an interdependent relationship
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present invention and not for limiting the protection scope thereof, and although the present invention has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that after reading the present invention, they can make various changes, modifications or equivalents to the specific embodiments of the present invention, but these changes, modifications or equivalents are within the protection scope of the appended claims.
Those not described in detail in this specification are within the skill of the art.

Claims (10)

1. A CAN message diagnosis method is characterized in that: the method comprises the following steps:
step S1, reading the CAN message and confirming the validity of the message;
step S2, counting the CAN messages which are received in the diagnosis period and confirmed to be valid in the step S1;
step S3, comparing the counting result of the effective CAN message obtained in step S2 with the number of the CAN messages expected to be sent;
and step S4, generating a diagnosis conclusion that the CAN message is transmitted too fast or too slow according to the comparison result generated in the step S3.
2. The CAN message diagnostic method according to claim 1, wherein: in step S1, the judgment condition for the received CAN packet includes: the source address of the received CAN message is not equal to the target address of the EECU; the PDU value range of the received CAN message is within the threshold value range of the maximum allowed PDU value; the target address of the received CAN message is the target address of the EECU; if the three judgment conditions are met, judging that the received CAN message is effective; and if any one of the three judgment conditions is not met, judging that the received CAN message is invalid.
3. The CAN message diagnostic method according to claim 1, wherein: in step S1, the data packet of the CAN packet is unpacked according to different PDU values of different CAN packets.
4. The CAN message diagnostic method according to claim 1, wherein: in step S2, the diagnosis period is set according to a task scheduling period of the CAN message.
5. The CAN message diagnostic method according to claim 1, wherein: in step S2, the method for counting valid CAN packets includes the following steps: and counting once when the target controller sent by the CAN message receives the CAN message sent once, wherein the number of the CAN messages received in each task scheduling is the difference value between the counting value of the target controller aiming at the CAN message in the task scheduling and the counting value of the target controller aiming at the CAN message in the last task scheduling, and the counting value of the messages received in the diagnosis period is the accumulation of the number of the messages received in all task scheduling periods in the diagnosis period.
6. The CAN message diagnostic method according to claim 1, wherein: in step S3, the counting result of the valid CAN message obtained in step S2 is compared with the number of messages of the number of the CAN messages expected to be sent, and it is determined whether the difference between the counting result of the valid CAN message and the number of the CAN messages expected to be sent exceeds the limit value.
7. The CAN message diagnosis method according to claim 6, wherein: in step S4, if the counting result of the valid CAN messages obtained in step S2 is greater than the number of messages of the number of the CAN messages expected to be sent, and the difference between the counting result of the valid CAN messages and the number of the CAN messages expected to be sent exceeds the maximum limit value, it is determined that the CAN messages are sent too fast.
8. The CAN message diagnosis method according to claim 6, wherein: in step S4, if the counting result of the valid CAN messages obtained in step S2 is less than the number of messages of the number of the CAN messages expected to be sent, and the difference between the counting result of the valid CAN messages and the number of the CAN messages expected to be sent exceeds the minimum limit, it is determined that the CAN messages are sent too slowly.
9. The CAN message diagnostic method according to claim 1, wherein: in step S4, when it is determined that the sending of the CAN message is too fast or the sending of the CAN message is too slow, the fault anti-jitter processing is performed, and when it is determined that the number of times that the sending of the CAN message is too fast or the sending of the CAN message is too slow exceeds the anti-jitter number, a diagnosis result of the fault that the sending of the CAN message is too fast or the sending of the CAN message is too slow is generated and output.
10. A computer-readable storage medium characterized by: the computer-readable storage medium stores a program of the CAN message diagnosis method, and the program of the CAN message diagnosis method is executed by the vehicle controller to realize the steps of the CAN message diagnosis method in the above technical scheme.
CN202111129716.8A 2021-09-26 2021-09-26 CAN message diagnosis method Pending CN113946147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111129716.8A CN113946147A (en) 2021-09-26 2021-09-26 CAN message diagnosis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111129716.8A CN113946147A (en) 2021-09-26 2021-09-26 CAN message diagnosis method

Publications (1)

Publication Number Publication Date
CN113946147A true CN113946147A (en) 2022-01-18

Family

ID=79328687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111129716.8A Pending CN113946147A (en) 2021-09-26 2021-09-26 CAN message diagnosis method

Country Status (1)

Country Link
CN (1) CN113946147A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826974A (en) * 2022-04-29 2022-07-29 东风电驱动系统有限公司 CAN message timeout calculation method, device, equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008262375A (en) * 2007-04-12 2008-10-30 Yokogawa Electric Corp Field device with function of outputting result of abnormality diagnosis and method of outputting result of abnormality diagnosis
CN103856288A (en) * 2012-12-04 2014-06-11 北汽福田汽车股份有限公司 CAN communication signal verification and transmission method and system for automobile
CN104917690A (en) * 2015-04-15 2015-09-16 联动优势科技有限公司 Method for controlling message sending and device for controlling message sending
WO2016110087A1 (en) * 2015-01-08 2016-07-14 中兴通讯股份有限公司 Method and device for controlling time online, and computer storage medium
CN109873835A (en) * 2019-03-29 2019-06-11 北京经纬恒润科技有限公司 A kind of message handling system and method
CN110011888A (en) * 2019-04-17 2019-07-12 珠海广通汽车有限公司 A kind of modular CAN network load factor optimization method and device
CN113347058A (en) * 2021-05-20 2021-09-03 江铃汽车股份有限公司 Method and system for testing vehicle CAN network period consistency

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008262375A (en) * 2007-04-12 2008-10-30 Yokogawa Electric Corp Field device with function of outputting result of abnormality diagnosis and method of outputting result of abnormality diagnosis
CN103856288A (en) * 2012-12-04 2014-06-11 北汽福田汽车股份有限公司 CAN communication signal verification and transmission method and system for automobile
WO2016110087A1 (en) * 2015-01-08 2016-07-14 中兴通讯股份有限公司 Method and device for controlling time online, and computer storage medium
CN104917690A (en) * 2015-04-15 2015-09-16 联动优势科技有限公司 Method for controlling message sending and device for controlling message sending
CN109873835A (en) * 2019-03-29 2019-06-11 北京经纬恒润科技有限公司 A kind of message handling system and method
CN110011888A (en) * 2019-04-17 2019-07-12 珠海广通汽车有限公司 A kind of modular CAN network load factor optimization method and device
CN113347058A (en) * 2021-05-20 2021-09-03 江铃汽车股份有限公司 Method and system for testing vehicle CAN network period consistency

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826974A (en) * 2022-04-29 2022-07-29 东风电驱动系统有限公司 CAN message timeout calculation method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN105981336B (en) Abnormality detection electronic control unit, vehicle-mounted network system, and abnormality detection method
EP3358788B1 (en) Illegality detection electronic control unit, vehicle onboard network system, and communication method
EP3282646B1 (en) Network monitoring device and computer readable recording medium
US7612464B2 (en) Electronic control system with malfunction monitor
CN103168292B (en) Method for monitoring at least two microcontrollers
CN104272663A (en) Vehicle-specific network communication management device and communication management method
CN107097646B (en) The method that alarm indication is handled
CN1710867A (en) Method and system for regulating ethernet
US8488621B2 (en) Communication network system and error verification method
CN113726573B (en) Redundant network communication method, device, electronic equipment and storage medium
CN113946147A (en) CAN message diagnosis method
US10540218B2 (en) Processor system and method for monitoring processors
CN114170705A (en) Vehicle data uploading method, device and equipment
KR20100020253A (en) Monitoring apparatus for message transmission in network for a vehicle
CN111913846A (en) Reprogramming device for vehicle, reprogramming method thereof and vehicle comprising same
KR20120126873A (en) System for Dynamic Analysis of Embedded Software of Vehicle using UDS
KR20200139059A (en) Controller diagnostic device and method thereof
CN111443688B (en) Automobile diagnosis service network layer test system and method based on CAN bus
KR101945426B1 (en) Diagnosis method of can communication
US11902300B2 (en) Method for monitoring a data transmission system, data transmission system and motor vehicle
CN110011888B (en) Modularized CAN network load rate optimization method and device
CN115032973B (en) Data transmission system, method, device, equipment and medium
KR20130064500A (en) Method of error recovery while transmitting message in can communication system
CN115550265A (en) Vehicle-mounted network communication event filtering method, device, equipment and medium
CN108983751A (en) Diagnose the method and server of connector abnormality processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination