CN117389242A - Automatic detection method, system and detection equipment for automobile CAN bus - Google Patents

Automatic detection method, system and detection equipment for automobile CAN bus Download PDF

Info

Publication number
CN117389242A
CN117389242A CN202311242815.6A CN202311242815A CN117389242A CN 117389242 A CN117389242 A CN 117389242A CN 202311242815 A CN202311242815 A CN 202311242815A CN 117389242 A CN117389242 A CN 117389242A
Authority
CN
China
Prior art keywords
message
bus
network
module
automobile
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
CN202311242815.6A
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.)
China National Heavy Duty Truck Group Jinan Power Co Ltd
Original Assignee
China National Heavy Duty Truck Group Jinan Power 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 China National Heavy Duty Truck Group Jinan Power Co Ltd filed Critical China National Heavy Duty Truck Group Jinan Power Co Ltd
Priority to CN202311242815.6A priority Critical patent/CN117389242A/en
Publication of CN117389242A publication Critical patent/CN117389242A/en
Pending legal-status Critical Current

Links

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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides an automatic detection method, system and detection equipment for an automobile CAN bus, which belong to the field of automobile buses. The CAN bus automatic detection system is applied without grasping the details of communication protocols of the online controllers on each CAN network, so that the electric appliance initial-stage debugging of the off-line vehicle is standardized and simplified, the debugging period of the off-line vehicle is shortened, and the electric appliance debugging personnel CAN operate, detect and use conveniently.

Description

Automatic detection method, system and detection equipment for automobile CAN bus
Technical Field
The invention belongs to the field of automobile buses, and particularly relates to an automatic detection method, an automatic detection system and a calculation device for an automobile CAN bus.
Background
CAN is an abbreviation of controller area network Controller Area Network (hereinafter referred to as CAN), and is a International Organization for Standardization internationally standardized serial communication protocol. With the development of electronic and automobile engineering technologies, various electronic control systems ECU have been developed for safety, economy, comfort, and the like. Since the types of data used for communication between these systems and the requirements for reliability are not the same, the number of wiring harnesses is increased in many cases where the system is constituted by a plurality of buses. To accommodate the need to reduce the number of vehicle harnesses and to perform high-speed communication of large amounts of data over multiple LANs, CAN communication protocols have been developed.
At present, the automobile industry widely applies CAN bus technology to ensure normal communication among various vehicle-mounted controllers, the reliability of a vehicle-mounted CAN network determines the safety of vehicle function operation, and particularly on new energy automobiles, the higher requirements are put forward on the communication quality of the whole vehicle-mounted CAN network. When a new vehicle type is researched and developed by a host factory, the situation that the vehicle function cannot work normally due to inconsistent communication among all vehicle-mounted controllers is frequently encountered on a test vehicle, and specific reasons mainly comprise:
1) The CAN network lacks part of messages required by the controller;
2) The newly developed controller on the CAN network sends some undefined messages;
3) And the message sent by the controller is abnormal, such as occasional overtime and over-design threshold of the message deviation rate. When the problems occur, electric appliance debugging personnel of a manufacturing unit cannot solve the problems, and related electric appliance research personnel are required to conduct problem investigation at the same time, so that the problem solving period is long, and the normal use of the vehicle is affected.
Disclosure of Invention
The invention provides an automatic detection method for an automobile CAN bus, which is characterized in that an electric appliance debugger CAN detect potential risks of each CAN network of the automobile by using a CAN bus detection vehicle system through one key, does not require the electric appliance debugger to master the details of communication protocols of on-line controllers on each CAN network, and is convenient for the electric appliance debugger to operate, detect and use.
The method comprises the following steps:
s1: configuring parameters of a CAN bus, wherein the parameters comprise network topology and CAN network segments;
s2: loading CAN network description files of the CAN network segments in a CAN channel of a CAN monitoring and analyzing tool;
s3: starting a CAN bus detection program;
s4: judging whether all the configuration parameters are configured, if so, turning to S5;
otherwise, the CAN bus detection program is exited, the network topology and the CAN network segment are not selected, and the step S1 is carried out;
s5: judging whether the CAN channel is loaded with a CAN network description file, and judging whether the name of the CAN network description file is consistent with the name of the configured network segment;
if so, turning to S6;
otherwise, the CAN bus detection program is exited, the correct CAN network description file is not loaded, and S2 is carried out;
s6: starting a confirmation flow of the online controller;
s7: and executing a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
It should be further noted that, the confirmation process of the online controller in step S6 includes the following steps:
s61: monitoring a CAN network segment to be detected in real time by using a CAN monitoring and analyzing tool;
s62: retrieving all message information lists which appear on a storage bus;
s63: comparing the message ID as a characteristic value with the message definition in the CAN network description file, and determining all message sending nodes in a message information list;
s64: judging whether the message sending node is a gateway controller or not, if so, turning to S63;
otherwise, go to S65;
s65: storing the name of the sending node into a node list of the online controller;
s66: and displaying the node names and the node numbers in the node list on a program interface.
It should be further noted that, the real-time checking process of the consistency of the sending and receiving messages in step S7 includes the following steps:
s71: screening a received message list of the online controller from the CAN network description file;
s72: checking whether the message in the message list has a bus network segment to be detected or not piece by taking the message ID as a characteristic value;
if so, go to S73, if not, go to S710;
s73: screening a sending message list of the online controller from the CAN network description file;
s74: checking whether the message in the message list is an event type message or not one by taking the message period as a characteristic value;
if yes, go to S75, if no, go to S76;
s75: if the message is not in the system analysis range, rejecting the message;
s76: checking whether the message PGN of the message list is 0xECFF or 0xEBFF or not one by taking the message PGN as a characteristic value;
if yes, go to S75, if not, go to S77;
s77: storing a checked sending message list of the online controller;
s78: checking whether the checked and sent message list exists on the bus network segment to be detected one by taking the message ID as a characteristic value, if so, turning to S79, and if not, turning to S710;
s79: checking whether the messages of all message information lists are defined in the CAN network description file one by taking the message ID as a characteristic value, if so, turning to S712, and if not, turning to S711;
s710: storing the missing message information and displaying the missing message information in a program interface in real time;
s711: storing undefined message information and displaying the undefined message information in a program interface in real time;
s712: storing the checked message list;
s713: monitoring the message information of the checked message list in real time by using a CAN monitoring and analyzing tool;
s714: judging whether the interval time between two continuous receptions of the checked message list exceeds the interval time threshold
If yes, go to S715, if not, go to S716;
s715: storing abnormal message information and displaying the abnormal message information in a program interface in real time;
s716: judging whether the message transmission period deviation rate of the checked message list exceeds the message period deviation rate threshold value
If so, go to S715, if not, return to the initial state.
It is further noted that the interval time threshold valueThe calculation is performed according to the following formula:
wherein,a timeout evaluation coefficient; />Message sending period defined for CAN network description file, unit ms.
It should be further noted that the packet period deviation rate includes an average packet period deviation rateAnd worst message cyclePhase deviation rate->
The average message period deviation rateAnd worst message period deviation rate +.>The calculation is performed according to the following formula:
wherein n is the number of times of message transmission on the CAN bus in a certain time period;the weight of the periodic deviation of the message; />The unit s is a timestamp of the message transmitted on the CAN bus at this time; />The unit s is the timestamp of the last transmission of the message on the CAN bus; />The transmission period defined in the CAN network description file is a unit ms for the message.
It should be further noted that the packet period deviation rate threshold valueThe calculation is performed according to the following formula:
the invention also provides an automatic detection system of the automobile CAN bus, which comprises: the system comprises a parameter configuration module, a file loading module, a program starting module, a parameter judging module, a network segment name judging module, a confirmation flow starting module and a checking executing module;
the parameter configuration module is used for providing a parameter input device for a user, so that the user configures parameters for detecting the CAN bus, wherein the parameters comprise network topology and CAN network segments;
the file loading module is configured with a CAN monitoring and analyzing tool and is used for loading CAN network description files of the CAN network segments in a CAN channel of the CAN monitoring and analyzing tool;
the program starting module is used for starting a CAN bus detection program;
the parameter judging module is used for judging whether all the configuration parameters are configured, if yes, a configuration completion signal is sent to the network segment name judging module, otherwise, the CAN bus detecting program is exited, the network topology and the CAN network segment are not selected, and an unfinished signal is sent to the parameter configuring module;
the network segment name judging module is used for judging whether the CAN channel is loaded with the CAN network description file or not and the name of the CAN network description file is consistent with the configured network segment name;
if the signals are consistent, sending a consistency signal to a confirmation process starting module; otherwise, the CAN bus detection program is exited, correct CAN network description files are not loaded, and unloaded information is sent to the file loading module;
the confirmation flow starting module is used for starting and executing the confirmation flow of the online controller;
the checking execution module is used for executing a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
The invention also provides a detection device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the automatic detection method of the automobile CAN bus when executing the program.
From the above technical scheme, the invention has the following advantages:
the automatic detection method for the automobile CAN bus CAN automatically and accurately judge whether the receiving and transmitting messages of all the online controllers of the CAN network meet the design requirement and whether the related messages have overtime or deviation exceeding the design requirement, and visually display the conditions to electric appliance debugging personnel through a program interface. The user of the automatic detection system for the automobile CAN bus does not need to master the details of the communication protocol of the on-line controllers on each CAN network, so that the electric appliance initial stage debugging of the off-line vehicle is standardized and simplified, the debugging period of the off-line vehicle is shortened, meanwhile, the frequency of manually detecting the automobile CAN bus by electric appliance designers of research and development units CAN be reduced, and the detection efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an automatic detection method of an automobile CAN bus;
FIG. 2 is a schematic diagram of an automotive CAN bus automatic detection system;
FIG. 3 is a validation flow chart of the on-line controller;
fig. 4 is a flow chart for checking the consistency of the sending and receiving messages of the on-line controller in real time.
Detailed Description
The automatic detection method of the automobile CAN bus, which is provided by the invention, is applied to the detection of the automobile CAN bus, CAN realize the automatic detection of the automobile CAN bus, reduces the manual participation and improves the detection efficiency.
The automatic detection method for the automobile CAN bus utilizes a CAN monitoring analysis tool, combines a confirmation flow of an online controller and a receiving and transmitting message consistency real-time checking flow of the online controller, realizes the automatic detection of the automobile CAN bus by judging relevant parameters of a CAN bus detection program, and further effectively solves the problems that the message sent by the controller is abnormal, such as occasional overtime of the message and the deviation rate of the message exceeds a design threshold value. When the problems occur, the electric appliance debugging personnel of the manufacturing unit cannot solve the problems, and related electric appliance research personnel are required to conduct problem investigation at the same time, so that the problems of long problem solving period and influence on normal use of the vehicle are caused.
The term "user" as used in various embodiments of the present disclosure may refer to appliance commissioning personnel, appliance research personnel, and personnel related to vehicle detection, use.
Fig. 1 shows a flowchart of a preferred embodiment of the auto CAN bus detection method of the present invention. As shown in fig. 2, the automatic detection method of the automobile CAN bus is applied to one or more detection devices, and the detection devices CAN be connected to an on-board OBD interface of the automobile to perform CAN bus detection. The detection device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware of the detection device comprises, but is not limited to, a microprocessor, an Application-specific integrated circuit (SpecificIntegratedCircuit, ASIC), a programmable gate array (Field-ProgrammableGate Array, FPGA), a digital processor (DigitalSignalProcessor, DSP) and the like.
The detection device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the embodiments of the present application described and/or claimed herein.
The network in which the detection device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VirtualPrivateNetwork, VPN), and the like.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method of the embodiment comprises the following steps:
s1: configuring parameters of a CAN bus, wherein the parameters comprise network topology and CAN network segments;
in this embodiment, the configuration of parameters of the detected CAN bus is not limited to the above configuration parameters, and other parameter information may be configured according to actual needs, so as to meet the requirement of confirming the detected CAN network segment.
S2: loading CAN network description files of the CAN network segments in a CAN channel of a CAN monitoring and analyzing tool;
in the embodiment of the invention, the CAN network description file is DBC (Database CAN) file, and the DBC file content is not limited to network segment name, controller node received message definition, controller node transmitted message definition and message period.
The CAN monitoring and analyzing tool of the embodiment CAN monitor and record the data flow of the CAN network, and analyze the CAN monitoring and analyzing tool according to the attribute or the standardized high-level protocol. The CAN monitoring and analyzing tool CAN realize real-time display of all messages transmitted to the CAN bus, and different nodes and views. The optional data stream record allows for later offline analysis.
S3: starting a CAN bus detection program;
according to the embodiment of the application, the CAN bus detection program CAN be started by a user according to the needs, and CAN be automatically started based on the preset program of the CAN monitoring analysis tool, for example, after the CAN monitoring analysis tool is started. Specifically, the automatic start or the manual start of the user CAN be set according to the actual requirement of the CAN monitoring and analyzing tool, which is not limited herein.
The invention can be configured with the on and off keys according to the need, thus being arranged on the program panel, and the on and off states can be displayed on the program panel.
S4: judging whether all the configuration parameters are configured, if so, turning to S5;
otherwise, the CAN bus detection program is exited, the network topology and the CAN network segment are not selected, and the step S1 is carried out;
in the embodiment of the invention, whether the user selects the network topology and the network segment parameters is judged firstly so as to meet the requirement of subsequently confirming the detected CAN network segment. If the program detects the unselected parameters, the program automatically exits the CAN bus detection program operation, and the unselected network topology and network segments are displayed on a program interface to remind the user of the operation.
S5: judging whether the CAN channel is loaded with a CAN network description file, and judging whether the name of the CAN network description file is consistent with the name of the configured network segment;
if so, turning to S6;
otherwise, the CAN bus detection program is exited, the correct CAN network description file is not loaded, and S2 is carried out;
in the embodiment of the invention, whether the follow-up on-line controller confirmation and message receiving and transmitting consistency check flow is needed is judged according to the comparison of the DBC file name loaded by the CAN channel and the network segment name selected by the user. If the DBC file is not loaded in the CAN channel or the name of the loaded DBC file is inconsistent with the name of the network segment selected by the user, the CAN bus detection program is exited, and a 'correct CAN network description file is not loaded' is displayed on a program interface so as to remind the user of correct operation.
S6: starting a confirmation flow of the online controller;
as shown in fig. 3, the confirmation procedure of the online controller includes the following steps:
s61: monitoring a CAN network segment to be detected in real time by using a CAN monitoring and analyzing tool;
in the embodiment of the invention, the CAN monitoring and analyzing tool CAN be a product CANoe of a Vector company, or a product with similar functions in China, and is not limited herein.
S62: retrieving all message information list MsgList1 appearing on the memory bus;
s63: comparing the message ID as a characteristic value with the message definition in the CAN network description file, and determining all message sending nodes in a message information list;
s64: judging whether the message sending node is a gateway controller or not, if so, turning to S63;
otherwise, go to S65;
s65: storing the node name to a node list of an online controller;
s66: and displaying the node names and the node numbers in the node list on a program interface.
In the embodiment of the invention, the states of the on-line controller nodes are distinguished by the colors of the status indicator lamps, green represents normal, and red represents that the detection result has a problem.
S7: and executing a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
As shown in fig. 4, the real-time checking flow of the consistency of the sending and receiving messages in this embodiment includes the following steps:
s71: screening a received message list MsgList2 of the online controller from the CAN network description file aiming at the online controller node of the Nodelist;
s72: checking whether the message in the MsgList2 message list has a bus network segment to be detected or not piece by taking the message ID as a characteristic value;
if so, go to S73, if not, go to S710;
s73: screening a message list MsgList3 sent by the online controller from the CAN network description file aiming at the online controller node;
s74: checking whether the message in the message list is an event type message or not one by taking the message period as a characteristic value;
if yes, go to S75, if no, go to S76;
s75: if the message is not in the system analysis range, rejecting the message;
s76: checking whether the message PGN of the message list MsgList3 is 0xECFF or 0xEBFF or not one by taking the message PGN as a characteristic value;
if yes, go to S75, if not, go to S77;
in this embodiment, it is considered that the messages with PGN of 0 xectff or 0 xebcf will not appear periodically on the bus under normal conditions of the whole vehicle function, so the method does not consider the above messages.
S77: storing a checked sending message list MsgList4 of the online controller;
s78: checking whether the checked and sent message list MsgList4 exists on the bus network segment to be detected or not piece by taking the message ID as a characteristic value, if so, turning to S79, and if not, turning to S710;
s79: checking whether the messages of all message information lists are defined in the CAN network description file one by taking the message ID as a characteristic value, if so, turning to S712, and if not, turning to S711;
s710: storing the missing message information and displaying the missing message information in a program interface in real time;
s711: storing undefined message information and displaying the undefined message information in a program interface in real time;
s712: storing a checked message list MsgList5;
s713: monitoring the message information of the checked message list in real time by using a CAN monitoring and analyzing tool;
s714: judging whether the interval time between two continuous receptions of the checked message list exceeds the interval time threshold
If yes, go to S715, if not, go to S716;
in the present embodiment, the interval time thresholdThe calculation is performed according to the following formula:
wherein->A timeout evaluation coefficient; />Message sending period defined for CAN network description file, unit ms.
S715: storing abnormal message information and displaying the abnormal message information in a program interface in real time;
s716: judging whether the message transmission period deviation rate of the checked message list exceeds the message period deviation rate threshold valueThe method comprises the steps of carrying out a first treatment on the surface of the If so, go to S715, if not, return to the initial state.
In this embodiment, the packet period deviation rate includes an average packet period deviation rateAnd worst message period deviation rate +.>Average message period deviation rate +.>And worst message period deviation rate +.>The calculation is performed according to the following formula:
wherein n is the number of times the message is transmitted on the bus in a certain time period; />The weight of the periodic deviation of the message; />The time stamp of the message transmitted on the bus is given by a unit s; />The unit s is the timestamp of the last transmission of the message on the bus; />The transmission period defined in the CAN network description file for this message is in ms.
In addition, the packet period deviation rate threshold valueThe calculation is performed according to the following formula:
therefore, the automatic detection method of the automobile CAN bus CAN accurately judge whether the receiving and transmitting messages of each online controller on the detected network segment meet the design requirement and whether the related messages have overtime or deviation exceeding the design requirement according to the detected network segment selected by a user by one key, and visually display the receiving and transmitting messages to electric appliance debugging personnel on a program interface. The user of the automatic detection system of the automobile CAN bus does not need to master the details of the communication protocol of the on-line controllers on each CAN network, so that the electric appliance initial stage debugging of the off-line vehicle is standardized and simplified, and the debugging period of the off-line vehicle is shortened.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Further, as a refinement and extension of the specific implementation manner of the foregoing embodiment, in order to fully describe the specific implementation process in this embodiment, another method for automatically detecting a CAN bus of an automobile is provided, where the method includes:
s101, performing parameter configuration operation by a user, wherein the configuration content comprises network topology and network segments.
S102, selecting a CAN channel of the CAN monitoring and analyzing tool, and loading a CAN network description file of the detected CAN network segment.
S103, starting a CAN bus detection program.
S104, judging whether all the configuration parameters are configured, if yes, turning to S105, and if not, turning to S106.
S105, judging whether the CAN channel is loaded with the CAN network description file and the CAN network description file name is consistent with the configured network segment name, if so, turning to S108, and if not, turning to S107.
S106, exiting the CAN bus detection program operation, prompting that the network topology and the network segment are not selected, and turning to S101.
S107, exiting the CAN bus detection program operation, prompting that the correct CAN network description file is not loaded, and turning to S102.
S108, performing an on-line controller confirmation flow.
S109, carrying out a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
The method improves the detection efficiency, realizes the automation of the detection process, and ensures the detection effect.
The following is an embodiment of an automatic detection system for an automobile CAN bus provided by the embodiments of the present disclosure, which belongs to the same inventive concept as the automatic detection method for an automobile CAN bus of the above embodiments, and details of the embodiment of the automatic detection system for an automobile CAN bus, which are not described in detail, may refer to the embodiment of the automatic detection method for an automobile CAN bus.
The system comprises: the system comprises a parameter configuration module, a file loading module, a program starting module, a parameter judging module, a network segment name judging module, a confirmation flow starting module and a checking executing module; of course, the memory and the communication module can be configured according to actual needs. The above modules may be configured into a detection device.
The parameter configuration module is used for providing a parameter input device for a user, so that the user configures parameters for detecting the CAN bus, wherein the parameters comprise network topology and CAN network segments;
the parameter input device may be a touch screen display, keyboard, mouse, trackball, voice recognizer, card reader, or other known input device.
The file loading module is configured with a CAN monitoring and analyzing tool and is used for loading CAN network description files of the CAN network segments in a CAN channel of the CAN monitoring and analyzing tool;
the program starting module is used for starting a CAN bus detection program;
the parameter judging module is used for judging whether all the configuration parameters are configured, if yes, a configuration completion signal is sent to the network segment name judging module, otherwise, the CAN bus detecting program is exited, the network topology and the CAN network segment are not selected, and an unfinished signal is sent to the parameter configuring module;
the network segment name judging module is used for judging whether the CAN channel is loaded with the CAN network description file or not and the name of the CAN network description file is consistent with the configured network segment name;
if the signals are consistent, sending a consistency signal to a confirmation process starting module; otherwise, the CAN bus detection program is exited, correct CAN network description files are not loaded, and unloaded information is sent to the file loading module;
the confirmation flow starting module is used for starting and executing the confirmation flow of the online controller;
the checking execution module is used for executing a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
The automotive CAN bus automatic detection apparatus according to the present invention is the unit and algorithm steps of the examples described in connection with the embodiments disclosed herein, and CAN be implemented in electronic hardware, computer software, or a combination of both, and to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described in terms of functionality in the foregoing description. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Those skilled in the art will appreciate that aspects of the auto CAN bus auto detection method may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The automatic detection method for the automobile CAN bus is characterized by comprising the following steps of:
s1: configuring parameters of a detection CAN bus;
s2: loading CAN network description files of the CAN network segments in a CAN channel of a CAN monitoring and analyzing tool;
s3: starting a CAN bus detection program;
s4: judging whether all the configuration parameters are configured, if so, turning to S5;
otherwise, the CAN bus detection program is exited, the network topology and the CAN network segment are not selected, and the step S1 is carried out;
s5: judging whether the CAN channel is loaded with a CAN network description file, and judging whether the name of the CAN network description file is consistent with the name of the configured network segment;
if so, turning to S6;
otherwise, the CAN bus detection program is exited, the correct CAN network description file is not loaded, and S2 is carried out;
s6: starting a confirmation flow of the online controller;
s7: and executing a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
2. The automatic detection method for the automobile CAN bus according to claim 1, wherein,
parameters include network topology and CAN segments.
3. The automatic detection method for the automobile CAN bus according to claim 1, wherein,
in step S4, it is determined whether all the configuration parameters are configured, if not, the CAN bus detection procedure is exited, the network topology and the CAN network segment are not selected, and the process goes to step S1.
4. The automatic detection method for the automobile CAN bus according to claim 1, wherein,
the confirmation flow of the online controller in step S6 includes the following steps:
s61: monitoring a CAN network segment to be detected in real time by using a CAN monitoring and analyzing tool;
s62: retrieving all message information lists which appear on a storage bus;
s63: comparing the message ID as a characteristic value with the message definition in the CAN network description file, and determining all message sending nodes in a message information list;
s64: judging whether the message sending node is a gateway controller or not, if so, turning to S63;
otherwise, go to S65;
s65: storing the name of the sending node into a node list of the online controller;
s66: and displaying the node names and the node numbers in the node list on a program interface.
5. The automatic detection method for the automobile CAN bus according to claim 1, wherein,
the real-time checking flow of the consistency of the receiving and transmitting messages in the step S7 comprises the following steps:
s71: screening a received message list of the online controller from the CAN network description file;
s72: checking whether the message in the message list has a bus network segment to be detected or not piece by taking the message ID as a characteristic value;
if so, go to S73, if not, go to S710;
s73: screening a sending message list of the online controller from the CAN network description file;
s74: checking whether the message in the message list is an event type message or not one by taking the message period as a characteristic value;
if yes, go to S75, if no, go to S76;
s75: if the message is not in the system analysis range, rejecting the message;
s76: checking whether the message PGN of the message list is 0xECFF or 0xEBFF or not one by taking the message PGN as a characteristic value;
if yes, go to S75, if not, go to S77;
s77: storing a checked sending message list of the online controller;
s78: checking whether the checked and sent message list exists on the bus network segment to be detected one by taking the message ID as a characteristic value, if so, turning to S79, and if not, turning to S710;
s79: checking whether the messages of all message information lists are defined in the CAN network description file one by taking the message ID as a characteristic value, if so, turning to S712, and if not, turning to S711;
s710: storing the missing message information and displaying the missing message information in a program interface in real time;
s711: storing undefined message information and displaying the undefined message information in a program interface in real time;
s712: storing the checked message list;
s713: monitoring the message information of the checked message list in real time by using a CAN monitoring and analyzing tool;
s714: judging whether the interval time between two continuous receptions of the checked message list exceeds the interval time threshold
If yes, go to S715, if not, go to S716;
s715: storing abnormal message information and displaying the abnormal message information in a program interface in real time;
s716: judging whether the deviation rate of the message transmission period of the checked message list exceeds the deviation of the message periodRate threshold
If so, go to S715, if not, return to the initial state.
6. The automatic detection method for automobile CAN bus according to claim 5, wherein,
the interval time threshold valueThe calculation is performed according to the following formula:
wherein,a timeout evaluation coefficient; />And a message sending period defined for the CAN network description file.
7. The automatic detection method for automobile CAN bus according to claim 5, wherein,
the packet period deviation rate includes an average packet period deviation rateAnd worst message period deviation rate +.>
The average message period deviation rateAnd worst message period deviation rate +.>The calculation is performed according to the following formula:
wherein n is the number of times of message transmission on the CAN bus in a certain time period;the weight of the periodic deviation of the message;the time stamp of the message transmitted on the CAN bus at this time is used; />The time stamp of the last transmission of the message on the CAN bus is used; />The transmission period defined in the CAN network description file for the message.
8. The automatic detection method for automobile CAN bus according to claim 5, wherein,
the message period deviation rate threshold valueThe calculation is performed according to the following formula:
9. an automatic detection system for an automobile CAN bus, which is characterized in that the system adopts the automatic detection method for the automobile CAN bus according to any one of claims 1 to 8;
the system comprises: the system comprises a parameter configuration module, a file loading module, a program starting module, a parameter judging module, a network segment name judging module, a confirmation flow starting module and a checking executing module;
the parameter configuration module is used for providing a parameter input device for a user, so that the user configures parameters for detecting the CAN bus, wherein the parameters comprise network topology and CAN network segments;
the file loading module is configured with a CAN monitoring and analyzing tool and is used for loading CAN network description files of the CAN network segments in a CAN channel of the CAN monitoring and analyzing tool;
the program starting module is used for starting a CAN bus detection program;
the parameter judging module is used for judging whether all the configuration parameters are configured, if yes, a configuration completion signal is sent to the network segment name judging module, otherwise, the CAN bus detecting program is exited, the network topology and the CAN network segment are not selected, and an unfinished signal is sent to the parameter configuring module;
the network segment name judging module is used for judging whether the CAN channel is loaded with a CAN network description file, and whether the name of the CAN network description file is consistent with the configured network segment name;
if the signals are consistent, sending a consistency signal to a confirmation process starting module; otherwise, the CAN bus detection program is exited, correct CAN network description files are not loaded, and unloaded information is sent to the file loading module;
the confirmation flow starting module is used for starting and executing the confirmation flow of the online controller;
the checking execution module is used for executing a real-time checking flow of the consistency of the receiving and transmitting messages of the online controller.
10. A detection device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the auto CAN bus detection method according to any one of claims 1 to 8 when the program is executed by the processor.
CN202311242815.6A 2023-09-25 2023-09-25 Automatic detection method, system and detection equipment for automobile CAN bus Pending CN117389242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311242815.6A CN117389242A (en) 2023-09-25 2023-09-25 Automatic detection method, system and detection equipment for automobile CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311242815.6A CN117389242A (en) 2023-09-25 2023-09-25 Automatic detection method, system and detection equipment for automobile CAN bus

Publications (1)

Publication Number Publication Date
CN117389242A true CN117389242A (en) 2024-01-12

Family

ID=89469232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311242815.6A Pending CN117389242A (en) 2023-09-25 2023-09-25 Automatic detection method, system and detection equipment for automobile CAN bus

Country Status (1)

Country Link
CN (1) CN117389242A (en)

Similar Documents

Publication Publication Date Title
US20180316584A1 (en) Abnormality detection method, abnormality detection apparatus, and abnormality detection system
CN108415409B (en) Multi-stage automobile fault diagnosis system and diagnosis method
CN107659465B (en) Device and method for checking error frames of CAN (controller area network) bus of whole vehicle
CN104734911A (en) CAN bus network management test system and method
US8793366B2 (en) Method and arrangement for diagnosing networks including field bus systems
WO2022184069A1 (en) Automobile bus fault analysis method, diagnosis device, and bus fault analysis system
US20070220330A1 (en) Computer-Supported Diagnostic System, Based on Heuristics and System Topologies
CN104639368A (en) Method and device for processing faults of communications network equipment
KR101241945B1 (en) In-Vehicle Network Fault Monitoring System and Method thereof
CN110943894A (en) Message testing method and device
CN110069050A (en) Automobile polyelectron control unit detection method and device
US10223319B2 (en) Communication load determining apparatus
CN112463428A (en) Automobile bus fault diagnosis method and device and computing equipment
CN103017812B (en) Automobile instrument networked testing system and testing method thereof
CN113596619B (en) Fire-fighting Internet of things multi-equipment state judging method, device, equipment and storage medium
CN117389242A (en) Automatic detection method, system and detection equipment for automobile CAN bus
CN112511396A (en) Whole vehicle communication monitoring method and device
CN108650134A (en) The method, apparatus and electronic equipment of network failure positioning
CN112630579A (en) Aging test method and system for servo driver
CN112532467B (en) Method, device and system for realizing fault detection
JP5696685B2 (en) In-vehicle communication system, communication abnormality monitoring method for in-vehicle communication system, and communication abnormality monitoring program for in-vehicle communication system
CN110011888B (en) Modularized CAN network load rate optimization method and device
CN114415646B (en) Remote vehicle diagnosis method, system and terminal equipment based on DoIP protocol
CN115437307A (en) Early warning method and device based on Thingworx platform and computer-storable medium
CN109634203B (en) Control system for controlling IO terminal based on numerical control controller and corresponding method

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