CN112731901B - Integrated diagnosis method based on CAN bus - Google Patents
Integrated diagnosis method based on CAN bus Download PDFInfo
- Publication number
- CN112731901B CN112731901B CN202011314241.5A CN202011314241A CN112731901B CN 112731901 B CN112731901 B CN 112731901B CN 202011314241 A CN202011314241 A CN 202011314241A CN 112731901 B CN112731901 B CN 112731901B
- Authority
- CN
- China
- Prior art keywords
- fault
- signal
- diagnosis
- message
- bit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0208—Electric 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/0213—Modular 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
Abstract
The invention discloses an integrated diagnosis method based on a CAN bus, which relates to the technical field of automobile fault identification and diagnosis, and comprises message loss detection and common fault bit diagnosis; the message loss detection comprises the steps of reading a Matlab script program into a signal ID of a CAN protocol of a specific vehicle type and storing the signal ID into a first memory; taking out the ID number of the first message from the first memory; comparing the message ID of the selected message file with the ID number taken out, and determining whether the ID is successfully matched; the common fault bit diagnosis takes out the corresponding fault signal according to the taken out ID number; analyzing the state value of the fault bit and determining whether the fault bit is 1; the diagnosis method provided by the invention CAN quickly determine the frame loss of the CAN message and the quick identification of various fault positions, CAN efficiently guide the vehicle fault state confirmation and fault diagnosis in the vehicle development process, and CAN judge the core fault positions of all the core controllers.
Description
Technical Field
The invention relates to the technical field of automobile fault identification and diagnosis, in particular to an integrated diagnosis method based on a CAN bus.
Background
With the rapid development of the automobile industry in China and the continuous popularization of household automobiles, the huge market potential of automobile life after the automobile industry has attracted wide attention of all parties. Through the market development and popularization for many years, the automobile fault diagnosis system is effectively developed. With the increase of the intelligent demand of vehicles and the rapid development of automobile electronic technology, electronic control systems with powerful functions, reliable performance and lower cost are generally adopted on automobiles. For intelligent, networked and high-reliability automobiles, more and more Electronic Control Units (ECUs) are integrated, and the functions of the ECUs are more and more complex. In order to accurately and quickly locate the fault problem of the automobile, an automobile diagnosis system is developed.
The prior art mainly aims at the processes of power-on and driving of the whole automobile, but can not give consideration to diagnosis in the automobile project development stage, namely, the precondition is carried out based on the precondition that each controller has the support of the diagnosis protocol.
Two common diagnosis methods are available, generally, a common CAN message is used, then a DBC file is used, and a high analysis software (such as the canoe software of VECTOR) is used for analyzing a corresponding fault frame, and finally a fault point is locked; the other is to develop a diagnostic instrument device to read fault codes. Generally, the first method is used in the development stage, and the second method is generally used for the post-productive projects. The traditional method has high cost, one message analysis software is more than ten thousand yuan, and much time and labor are consumed for developing a diagnostic instrument. And the locking of the failure point is inefficient.
Disclosure of Invention
In order to solve the problems of the prior art, the diagnosis method provided by the invention CAN quickly determine the frame loss of the CAN message and quickly identify various fault positions, CAN efficiently guide the vehicle fault state confirmation and fault diagnosis in the vehicle development process, and CAN judge the core fault positions of all the core controllers.
In order to achieve the above effects, the invention specifically adopts the following technical scheme:
an integrated diagnosis method based on CAN bus, the said diagnosis method includes the message loses and detects and the common fault bit diagnoses;
the message loss detection comprises the following steps:
s1: reading a signal ID of a CAN protocol of a specific vehicle type into a first memory by a Matlab script program;
s2: taking out the ID number of the first message from the first memory;
s3: comparing the message ID of the selected message file with the ID number taken out, and determining whether the ID is successfully matched;
s4: repeating S2-S3 until all IDs read from S1 are finished;
s5: counting the number of IDs failed in matching by using the Matlab self-editing script and outputting the ID value of the CAN signal:
s6: the Matlab self-editing GUI displays the number of IDs which are not matched successfully and the ID value of the corresponding CAN signal;
the common fault bit diagnosis comprises the following steps;
e1: reading a signal ID corresponding to a CAN fault bit of a specific vehicle type into a first memory by a Matlab script program;
e2: taking out the ID number of the message from the first memory;
e3: taking out the corresponding fault signal according to the ID number;
e4: analyzing the state value of the fault bit and determining whether the fault bit is 1 or not according to a CAN protocol;
e5: continuing to search the next ID and repeating S2-S4 until all the IDs read from S1 are finished;
e6: counting the ID number of the fault bit 1 by using a Matlab self-editing script and outputting a CAN signal name;
e7: and the Matlab self-editing GUI displays the ID number of the fault bit 0 and the corresponding fault bit signal name.
Further, the method also comprises a step S10 between the step S1 and the step S2: and connecting the CAN card to a diagnosis interface of the vehicle to be diagnosed.
Further scheme is that S11 is included between S1 and S2: and starting the vehicle for T1 second, and ensuring that the read CAN signal frames completely cover the number of the IDs in the CAN protocol and are stored in a second memory.
Further, the step S3 is to confirm whether the ID is successfully matched, for example, the ID is successfully matched, and set flag to 1, and if the ID is not successfully matched, set flag to 0, and store the ID that is not successfully matched.
Further, E10 is included between E1 and E2: and connecting the CAN card to a diagnosis interface of the vehicle to be diagnosed.
Further, E11 is included between E1 and E2: and starting the vehicle for T1 second, and ensuring that the read CAN signal frames completely cover the number of the IDs in the CAN protocol and are stored in a second memory.
The further scheme is that the state value of the fault bit is analyzed and whether the fault bit is 1 or not is determined in E4, if the fault bit is 0, the flag bit is set to 0, and the next ID is continuously searched; if the fault bit is 1, the flag bit is set to 1, and the ID corresponding to the flag bit is stored.
The invention has the beneficial effects that:
the diagnosis method provided by the invention CAN quickly determine the frame loss of the CAN message and the quick identification of various fault positions, CAN efficiently guide the vehicle fault state confirmation and fault diagnosis in the vehicle development process, and CAN judge the judgment of all core fault positions of the core controller by the method;
the diagnosis method provided by the invention can also quickly and iteratively optimize the whole vehicle control strategy and finally achieve the dynamic and economic indexes of new energy vehicle types, thereby saving precious development time and development cost and saving the software investment of high-cost equipment on the premise of ensuring the accuracy of simulation results;
the invention has accurate diagnosis result and high diagnosis efficiency;
the invention is not only suitable for the traditional fuel vehicle (supporting can communication) but also suitable for the diagnosis of new energy vehicle types of multiple controllers, and can be developed by C language, VB language and matlab language by means of a relatively universal tool language
The adopted development tool is mature, is written in Matlab M language and is converted into an exe file, and the tool can be directly operated under the condition that the Matlab is not installed.
Drawings
Fig. 1 is a flowchart of an implementation process of message loss detection in an integrated diagnostic method based on a CAN bus according to an embodiment of the present invention;
fig. 2 is a flowchart of a process for implementing common fault bit diagnosis in an integrated diagnosis method based on a CAN bus according to an embodiment of the present invention;
FIG. 3 is an interface diagram of an integrated diagnostic method based on a CAN bus according to an embodiment of the present invention;
FIG. 4 is a diagram of an output result of an integrated diagnostic method based on a CAN bus according to an embodiment of the present invention;
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
As shown in fig. 1-2, an embodiment of the present invention discloses an integrated diagnosis method based on a CAN bus, which includes message loss detection and common fault bit diagnosis;
the message loss detection comprises the following steps:
s1: reading a signal ID of a CAN protocol of a specific vehicle type into a first memory by a Matlab script program;
s2: taking out the ID number of the first message from the first memory;
s3: comparing the message ID of the selected message file with the ID number taken out, and determining whether the ID is successfully matched;
s4: repeating S2-S3 until all IDs read from S1 are finished;
s5: and (3) counting the number of IDs failed in matching by using a Matlab self-editing script and outputting the ID value of the CAN signal:
s6: the Matlab self-editing GUI displays the number of IDs which are unsuccessfully matched and the ID value of the corresponding CAN signal;
the common fault position diagnosis:
e1: reading a signal ID corresponding to a CAN fault bit of a specific vehicle type into a first memory by a Matlab script program;
e2: taking out the ID number of the message from the first memory;
e3: taking out the corresponding fault signal according to the ID number;
e4: analyzing the state value of the fault bit and determining whether the fault bit is 1 or not according to a CAN protocol;
e5: continuing to search the next ID and repeating S2-S4 until all the IDs read from S1 are finished;
e6: counting the ID number of the fault bit 1 by using a Matlab self-editing script and outputting a CAN signal name;
e7: and the Matlab self-editing GUI displays the ID number of the fault bit 0 and the corresponding fault bit signal name.
In this embodiment, S10 is further included between S1 and S2: and connecting the CAN card to a diagnosis interface of the vehicle to be diagnosed.
In this embodiment, S11 is further included between S1 and S2: and starting the vehicle for T1 second, ensuring that the read CAN signal frame completely covers the number of the IDs in the CAN protocol and storing the number in a second memory.
In this embodiment, in S3, it is determined whether the ID is successfully matched, for example, the ID is successfully matched, and the flag is set to 1, and if the ID is not successfully matched, the flag is set to 0, and the ID that is not successfully matched is stored.
In this embodiment, E10 is further included between E1 and E2: and connecting the CAN card to a diagnosis interface of the vehicle to be diagnosed.
In this embodiment, E11 is further included between E1 and E2: and starting the vehicle for T1 second, and ensuring that the read CAN signal frames completely cover the number of the IDs in the CAN protocol and are stored in a second memory.
In this embodiment, the state value of the fault bit is analyzed in E4, and it is determined whether the fault bit is 1, if the fault bit is 0, the flag bit flag is set to 0, and the next ID is continuously searched; if the fault bit is 1, the flag bit is set to 1, and the ID corresponding to the flag bit is stored.
The method is based on a light-truck pure electric vehicle type, the light-truck pure electric vehicle type comprises 33 frames of messages in total, a 'call' key is clicked, a CAN matrix is led into a memory space according to an algorithm in the first step, then message loss detection and common fault bit diagnosis are respectively calculated, a calculated interface diagram is shown in fig. 3, and an output final result is shown in fig. 4;
meanwhile, the method can quickly iterate and optimize the whole vehicle control strategy and finally reach the dynamic and economic indexes of the new energy vehicle type, so that on the premise of ensuring the accuracy of the simulation result, precious development time and development cost are saved, and the software investment of high-cost equipment is saved;
the method is not only suitable for the traditional fuel vehicle (supporting can communication), but also suitable for the diagnosis of new energy vehicle types of multiple controllers, and can be developed by C language, VB language and matlab language by means of a relatively universal tool language.
Finally, only specific embodiments of the present invention have been described in detail above. The invention is not limited to the specific embodiments described above. Equivalent modifications and substitutions by those skilled in the art are also within the scope of the present invention. Accordingly, equivalent alterations and modifications are intended to be included within the scope of the present invention, without departing from the spirit and scope of the invention.
Claims (1)
1. An integrated diagnosis method based on a CAN bus is characterized in that:
the diagnosis method comprises message loss detection and common fault bit diagnosis;
the message loss detection comprises the following steps:
s1: reading a signal ID of a CAN protocol of a specific vehicle type into a Matlab script program and storing the signal ID into a first memory;
s2: taking out the ID number of the first message from the first memory;
s3: comparing the message ID of the selected message file with the ID number taken out, and determining whether the ID is successfully matched;
s4: repeating S2-S3 until all IDs read from S1 are finished;
s5: and (3) counting the number of IDs failed in matching by using a Matlab self-editing script and outputting the ID value of the CAN signal:
s6: the Matlab self-editing GUI displays the number of IDs which are unsuccessfully matched and the ID value of the corresponding CAN signal;
the common fault bit diagnosis comprises the following steps:
e1: reading a signal ID corresponding to a CAN fault bit of a specific vehicle type into a first memory by a Matlab script program;
e2: the ID number of the message is taken out from the first memory;
e3: taking out the corresponding fault signal according to the ID number;
e4: analyzing the state value of the fault bit and determining whether the fault bit is 1 or not according to a CAN protocol;
e5: continuing to search the next ID and repeating S2-S4 until all IDs read from S1 are finished;
e6: counting the ID number of the fault bit 1 by using a Matlab self-editing script and outputting a CAN signal name;
e7: the Matlab self-editing GUI displays the ID number of the fault bit 0 and the corresponding fault bit signal name;
s10 is also included between S1 and S2: connecting the CAN card to a diagnosis interface of a vehicle to be diagnosed;
s11 is also included between S1 and S2: starting the vehicle for T1 second, ensuring that the read CAN signal frame completely covers the number of IDs in the CAN protocol and storing the CAN signal frame in a second memory;
s3, confirming whether the ID is successfully matched or not, if the ID is successfully matched, setting a flag to be 1, if the ID is not successfully matched, setting a flag to be 0, and simultaneously storing the ID which is not successfully matched;
e10 is also included between E1 and E2: connecting the CAN card to a diagnosis interface of a vehicle to be diagnosed;
e11 is also included between E1 and E2: starting the vehicle for T1 second, ensuring that the read CAN signal frame completely covers the number of IDs in the CAN protocol and storing the CAN signal frame in a second memory;
e4, analyzing the state value of the fault bit and determining whether the fault bit is 1, if the fault bit is 0, setting a flag bit to be 0, and continuously searching the next ID; if the fault bit is 1, the flag bit is set to 1, and the ID corresponding to the flag bit is stored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011314241.5A CN112731901B (en) | 2020-11-20 | 2020-11-20 | Integrated diagnosis method based on CAN bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011314241.5A CN112731901B (en) | 2020-11-20 | 2020-11-20 | Integrated diagnosis method based on CAN bus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112731901A CN112731901A (en) | 2021-04-30 |
CN112731901B true CN112731901B (en) | 2023-01-13 |
Family
ID=75597685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011314241.5A Active CN112731901B (en) | 2020-11-20 | 2020-11-20 | Integrated diagnosis method based on CAN bus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112731901B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114265387A (en) * | 2021-12-16 | 2022-04-01 | 江西五十铃汽车有限公司 | Vehicle-mounted fault diagnosis system |
CN115981289A (en) * | 2023-02-10 | 2023-04-18 | 力高(山东)新能源技术股份有限公司 | Fault diagnosis processing method for CAN specific frame wakeup |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103293008A (en) * | 2013-06-27 | 2013-09-11 | 长城汽车股份有限公司 | Automobile diagnosing device |
CN108415408A (en) * | 2018-03-16 | 2018-08-17 | 宁波杉杉汽车有限公司 | Automobile packet parsing based on CAN communication and method for diagnosing faults |
CN109104351A (en) * | 2017-06-21 | 2018-12-28 | 比亚迪股份有限公司 | Train network node and train network node monitoring method based on CANopen agreement |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106094798B (en) * | 2016-07-04 | 2019-01-08 | 江苏卡威汽车工业集团股份有限公司 | A kind of method for diagnosing faults based on CAN communication bus system |
CN106302807A (en) * | 2016-09-14 | 2017-01-04 | 中国科学院微电子研究所 | A kind of malfunction monitoring and position display method, system and motor vehicles |
CN111447128A (en) * | 2020-03-24 | 2020-07-24 | 重庆长安汽车股份有限公司 | Vehicle data acquisition and uploading method capable of being remotely and dynamically configured and storage medium |
CN111640970B (en) * | 2020-05-29 | 2021-07-06 | 湖北工业大学 | CAN bus-based fuel cell engine upper computer monitoring method |
-
2020
- 2020-11-20 CN CN202011314241.5A patent/CN112731901B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103293008A (en) * | 2013-06-27 | 2013-09-11 | 长城汽车股份有限公司 | Automobile diagnosing device |
CN109104351A (en) * | 2017-06-21 | 2018-12-28 | 比亚迪股份有限公司 | Train network node and train network node monitoring method based on CANopen agreement |
CN108415408A (en) * | 2018-03-16 | 2018-08-17 | 宁波杉杉汽车有限公司 | Automobile packet parsing based on CAN communication and method for diagnosing faults |
Also Published As
Publication number | Publication date |
---|---|
CN112731901A (en) | 2021-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112731901B (en) | Integrated diagnosis method based on CAN bus | |
CN110895405B (en) | Finished vehicle controller VCU offline detection system and method | |
CN104965147A (en) | Low-voltage-user electric energy meter series detection system and detection method | |
CN111796583B (en) | Vehicle ECU (electronic control Unit) identification method and system and vehicle diagnosis equipment | |
CN108388640B (en) | Data conversion method and device and data processing system | |
CN112327815A (en) | Method and device for batch testing of accuracy of data stream of automobile diagnostic instrument | |
CN102707710A (en) | Diagnosis function verification method and system for automobile electronic control unit | |
CN110109043A (en) | Electric energy meter detection method, detection terminal and computer readable storage medium | |
CN101846728B (en) | Incoming inspection device of power battery for hybrid electric vehicle and inspection method | |
CN116384961A (en) | Predictive application method and system based on vehicle electronic and electric appliance fault prediction model | |
CN213780745U (en) | Automobile fault diagnosis system based on CAN bus | |
CN112069006B (en) | Method and device for detecting and analyzing GPU (graphics processing Unit) rate state and computer readable medium | |
CN115586019A (en) | Automatic testing method, device, equipment and storage medium for vehicle | |
CN107015954A (en) | Equipment mainboard dial-up method to set up and system | |
CN111274185A (en) | Method and system for solving communication interface data compatibility in instrument old part replacement | |
CN110968071B (en) | Method and system for generating functional test case of electric screen cabinet of railway vehicle | |
CN111443689A (en) | Complete vehicle fault detection system and method for pure electric vehicle | |
CN111983989A (en) | Offline detection method and control equipment | |
CN113096269B (en) | Information acquisition method and device, electronic equipment and storage medium | |
CN116382235A (en) | Controller detection method, device, equipment, medium and product | |
CN117215286A (en) | Intelligent diagnosis method for new energy automobile based on fault tree | |
CN116233826A (en) | Method and device for writing software data, electronic equipment and storage medium thereof | |
CN113609577B (en) | Automobile electric appliance principle inspection method | |
CN113010402B (en) | Method and system for testing upper limit and lower limit of physical value of CAN (controller area network) signal | |
CN101620419A (en) | Novel automobile electrically-controlled controller and detection method thereof |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |