A method for file parsing and fault detection of the single-cell voltage of a fuel cell

The integration of CAN signal analysis with LabVIEW and box plot methods addresses real-time voltage data challenges in fuel cells, ensuring accurate and efficient fault detection, thereby improving system control and extending fuel cell lifespan.

CN115792639BActive Publication Date: 2025-07-08WUHAN HAIYI NEW ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211637729.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-07-08
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

Existing fuel cell systems face challenges in real-time, accurate collection and analysis of single cell voltage data due to interference from connection lines and environmental factors, which affect performance feedback and system control accuracy, potentially leading to reduced fuel cell lifespan.

Method used

Implementing CAN signal online and offline analysis using LabVIEW graphical programming and box plot analysis for precise fault detection in fuel cell single cell voltage, ensuring accurate and complete CAN bus signal integrity.

Benefits of technology

Ensures accurate and efficient detection of fuel cell single cell voltage anomalies, enhancing system control and extending fuel cell lifespan by providing clear, intuitive signal conversion results and rapid fault identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115792639B_ABST
    Figure CN115792639B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for file parsing and fault detection of the single-cell voltage of a fuel cell, which relates to the technical field of measurement and control of fuel cell stacks. The method includes reading a DBC file communicated via CAN provided by any model or different manufacturers through a single-cell inspection instrument detection system, and storing the read file as a string array; then parsing the signal structure and message structure in the DBC file according to the keywords, symbols and syntax structure in the DBC file, and then assigning the DBC signal structure and message structure to the CAN message structure and sending it through the CAN bus; a method for fault detection of the single-cell voltage of a fuel cell, first arranging the obtained single-cell voltages from small to large and storing them in an array, setting the corresponding quartiles and limit line positions through quartile analysis, and judging whether the data is an abnormal value according to the relationship between the voltage value and the pre-limit line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fuel cell stack measurement and control, and particularly to a method for file parsing and fault detection of a single fuel cell voltage. Background Art

[0002] A hydrogen-oxygen fuel cell stack is generally composed of multiple proton exchange membranes connected in series. The output voltage of each proton exchange membrane is generally lower than 1.2V. Therefore, hundreds of proton exchange membranes are required to form a fuel cell stack. The health status of the fuel cell stack is mainly reflected in the voltage of each proton exchange membrane. The voltage values of the single cells composed of multiple cells connected in series should not vary too much. Failure to detect and repair in time will lead to damage to the entire stack. Therefore, during the operation of the fuel cell, it is necessary to monitor the voltage value of each fuel cell single cell in real time. In case of abnormalities, an alarm or shutdown should be triggered in a timely manner.

[0003] The single fuel cell voltage is an important parameter reflecting the operating state of the fuel cell and plays an extremely important role in fuel cell performance evaluation and fuel cell system control. Adverse conditions such as over-dryness, over-wetness, and lack of gas in the fuel cell proton exchange membrane, as well as factors such as physical damage, will all affect the output voltage of the proton exchange membrane. Detecting the single cell voltage data of each proton exchange membrane is crucial for studying the performance of fuel cells. However, in the actual application process, there are problems such as the real-time performance, speed, and accuracy of voltage acquisition, as well as the interference of connection harnesses and the accidental factor fluctuations caused by the superposition of various physical scenarios in the environment. These problems seriously affect the true feedback of fuel cell performance and the control accuracy of the fuel cell system, thereby reducing the service life of the fuel cell. Therefore, there is an urgent need for a means to parse files and detect faults for the voltage information collected by single fuel cells. Summary of the Invention

[0004] Aiming at the deficiencies existing in the prior art, the purpose of the present invention is to provide a method for file parsing and fault detection of a single fuel cell voltage.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] Compared with the prior art, the advantages of the present invention are:

[0007] Compared with the prior art, in the method for file parsing and fault detection of a single fuel cell voltage in the present invention, the online parsing and offline analysis of CAN signals ensure the accuracy and integrity of CAN bus signals. The graphical programming language of LabVIEW makes the conversion result of CAN signals intuitive and clear, and the box plot analysis makes error positioning more accurate. Brief Description of the Drawings

[0008] Figure 1Schematic diagram of the process for parsing a file of the single-cell voltage of a fuel cell in an embodiment of the present invention;

[0009] Figure 2 Schematic diagram of the process for a method of detecting faults in the single-cell voltage of a fuel cell in an embodiment of the present invention;

[0010] Figure 3 Result diagram of the signal values obtained after parsing in an embodiment of the present invention. Detailed implementation manners

[0011] The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0012] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0013] The terms used in the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. The singular forms "a", "the", and "said" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0014] Refer to Figure 1 The schematic diagram of the process for parsing a file of the single-cell voltage of a fuel cell in an embodiment of the present invention as shown, includes the following steps: S1. Read out the network baud rate and network nodes by comparing the keywords BS_ and BU_;

[0015] S2. Read out the message message and the signal mixing array BO / SG by conditionally looping and comparing the keywords BO_ and SG_;

[0016] S3. Read out the annotation array CM of the DBC message and signal by conditionally looping and comparing the keyword CM_;

[0017] S4. Use the size N of the array BO / SG in step S2 as the number of times for conditional judgment loop, and separate according to the defined DBC message structure and DBC signal structure;

[0018] Fill the DBC message cluster into the tree according to the signal name, start bit, length, format, conversion factor, offset, range, unit, node, and annotation.

[0019] S6. Compare the keyword VAL_ through a conditional loop to obtain the value of the signal and the description array VAL, and determine the specific position, value, and meaning represented by the value of the signal according to the value syntax;

[0020] S7. Assign the DBC signal structure and message structure obtained in the previous step to the CAN message structure and then send it through the CAN bus;

[0021] S8. Complete the file parsing of the single-chip voltage.

[0022] Among them, screening is performed by comparing the first three characters of the string, that is, step S4 also includes comparing the first three characters of each row of the array BO / SG with BO_:

[0023] If they are the same, obtain the message ID, message name, data length, and sending node according to the BO_ message syntax structure;

[0024] If they are not the same, then judge with SG_. If they are the same, obtain the name, start bit, bit length, byte order, symbol type, gain, offset, minimum value, maximum value, unit, and receiving node according to the SG_ signal syntax. At the same time, search the comment array CM according to the message ID, loop count, and CM_ object comment syntax to obtain the comment of each signal and assign it to the DBC signal structure;

[0025] If the first three characters of each row of the array BO / SG are neither equal to BO_ nor equal to SG_, obtain the DBC message structure and the number of signals in the message structure, and at the same time increment the loop count by 1, and repeat the above judgment until the loop count is greater than the size N of the array BO / SG, then exit the loop.

[0026] The specific steps in this embodiment will be described in detail below:

[0027] Define the DBC signal structure and DBC message structure. Among them, a DBC message may contain multiple DBC signals and the maximum number of signals is 513. The DBC message corresponds to the frame ID.

[0028] The definition of the DBC signal structure is as follows:

[0029] struct DBCSignal

[0030] {

[0031] uint32 nStartBit; / / Start bit

[0032] uint32 nLen; / / Bit length

[0033] double nFactor; / / Conversion factor

[0034] double nOffset; / / Conversion offset, actual value = original value * nFactor + nOffset

[0035] double nMin; / / Minimum value

[0036] double nMax; / / Maximum value

[0037] uint64 nRawValue; / / Original value

[0038] bool is_signed; / / Whether it is signed data

[0039] bool is_motorola; / / Whether it is in Motorola format

[0040] uint8 multiplexer_type; / / Multiplexer type

[0041] uint8 val_type; / / 0:integer, 1:float, 2:double

[0042] uint32 multiplexer_value; / / The signal is valid when the multiplexer switch value is this value

[0043] char unit[_DBC_UNIT_MAX_LENGTH_+1]; / / Unit

[0044] char strName[_DBC_NAME_LENGTH_+1]; / / Name

[0045] char strComment[_DBC_COMMENT_MAX_LENGTH_+1]; / / Comment

[0046] char strValDesc[_DBC_NAME_LENGTH_+1]; / / Value description

[0047] }

[0048] The DBC message structure is defined as follows:

[0049] struct DBCMessage

[0050] {

[0051] uint32 nSignalCount; / / Number of signals

[0052] uint32 nID; / / Message ID

[0053] uint32 nSize; / / Number of bytes occupied by the message

[0054] double nCycleTime; / / Transmission cycle

[0055] uint8 nExtend; / / 1: Extended frame, 0: Standard frame

[0056] DBCSignal vSignals[_DBC_SIGNAL_MAX_COUNT_]; / / Signal set

[0057] char strName[_DBC_NAME_LENGTH_+1]; / / Name

[0058] char strComment[_DBC_COMMENT_MAX_LENGTH_+1]; / / Comment

[0059] }

[0060] The DBC file has its own content elements, mainly divided into general elements, keywords and symbols, among which the general elements include data types and identifiers.

[0061] unsigned_integer Unsigned integer, such as message ID, signal bit length, etc.

[0062] signed_integer Signed integer, such as user-defined attribute values, etc.

[0063] double Double-precision floating-point number, such as signal gain, offset, lower limit value, upper limit value, etc.

[0064] char_string String, the content between double quotes, such as the comment descriptions of nodes, messages, signals, etc.

[0065] C_identifier Identifier, which must start with a letter or an underscore and may further contain letters, numbers and underscores, such as the names of nodes, messages, signals, etc.

[0066] Read the DBC file of CAN communication provided by any model or different manufacturers through the single-chip inspection instrument detection system, and save the read file as a string array; then parse the signal structure and message structure in the DBC file according to the keywords, symbols and syntax structure in the DBC file.

[0067] The keywords and syntax structure of the DBC file are as follows:

[0068] (1)BS_ Define the CAN network baud rate

[0069] (2)Lines starting with BU_ define nodes, separated by spaces between each node

[0070] Node syntax BU_: node name1 node name2 node name3 …

[0071] (3)Lines starting with BO_ define message messages. The message ID is in decimal. For the standard frame ID, it is the numerical value itself. For the extended frame ID, it is the numerical value itself minus 0x80000000;

[0072] Message syntax BO_ message ID message name: message data length sending node

[0073] (4)Lines starting with SG_ define signals

[0074] Signal syntax: SG_ signal name: start bit|bit length@byte order symbol type (gain, offset) [minimum value|maximum value] "unit" receiving node

[0075] Byte order 0 represents Motorola format, 1 represents Intel format, symbol type + represents unsigned, — represents signed. The gain and offset of the signal are used for the conversion calculation between the signal raw value and the physical value. The calculation formula is:

[0076] The calculation formula is:

[0077] physical_value = raw_value * factor + offset

[0078] raw_value = (physical_value – offset) / factor

[0079] (5)EV_ Objects of the environmental variable type

[0080] (6)Lines starting with CM_ define object comments. The object type can be node, message, or signal.

[0081] For object types of messages, the object name uses the message ID. For object types of signals, the message ID needs to be added before the signal name to determine the specific location of the signal.

[0082] Object comment syntax: CM_ object type object name "comment"

[0083] (7)Lines starting with BA_DEF_ define attributes. The object type can be node, message, or signal.

[0084] Attribute annotation syntax: BA_DEF_Object type "Attribute name" Attribute value type Minimum value Maximum value

[0085] (8) Lines starting with BA_DEF_DEF define the default attribute values. When defining an attribute, the default attribute value must be specified.

[0086] Default attribute value syntax: BA_DEF_DEF_ "Attribute name" Attribute default value

[0087] (9) Lines starting with BA_ define the attribute values.

[0088] Attribute value syntax: BA_ "Attribute name" Object type Object name Attribute value

[0089] (10) Lines starting with VAL_ define the value descriptions of signals. Values and descriptions appear in pairs. For signal-type objects, the message ID needs to be added before the signal name to determine the specific location of the signal.

[0090] Value syntax: VAL_Signal or environment variable name Value 1 "Value 1 description", Value 2 "Value 2 description", Value 3 "Value 3 description"...;

[0091] The file parsing method of the single-cell voltage of the fuel cell in this application uses the graphical programming language of LabVIEW to implement the online parsing and offline analysis of CAN signals for DBC files, effectively utilizes the DBC files, saves development costs, efficiently and accurately interprets various information on the CAN line, and at the same time can be observed through a tree diagram, and the conversion result is intuitive and clear.

[0092] See Figure 2 The flowchart of a method for detecting faults in the single-cell voltage of a fuel cell shown in the embodiments of the present invention. A method for detecting faults in the single-cell voltage of a fuel cell, the method includes the following steps: Step 1: Read the DBC file and obtain the actual voltage of the single-cell voltage in real time through the CAN bus;

[0093] Step 2: Save each single cell in the array A1 in order, and then sort the single-cell voltages in the array A1 from small to large and save them in the array A2, and at the same time record the corresponding single-cell numbers and save them in the array B1;

[0094] Step 3: Set the box plot of the single-cell voltage of the array, preset the positions of the quartiles, divide the numbers in the array A2 into four parts, set three quartiles in an array and they are the lower quartile Q1, the middle quartile Q2 and the upper quartile Q3 in turn, where Q1 = (n + 1) / 4, Q2 = (n + 1) / 2, Q3 = 3*(n + 1) / 2, where n represents the size of the array;

[0095] Step 4: Analyze the outliers based on the box plot. Let the interquartile range be IQR = Q3 - Q1, and the positions of the limit lines be Q1 - nIQR to Q1 + nIQR, where n is a coefficient. The outliers are defined as the data outside the limit lines, and all the single cells corresponding to the outliers are marked as abnormal single cells.

[0096] Step 5: Screen the outliers. Set the values within the limit line positions as normal values, and those below or beyond the limit line positions as outliers. Obtain the positions in array A2 based on the outliers, and then get the single cell numbers in array B1 corresponding to these positions.

[0097] Step 6: Display the outliers and the single cell positions graphically to complete the fault detection.

[0098] In this embodiment, n is taken as 1.5, and the positions of the interquartile range limit lines in Step 6 are Q1 - 1.5IQR to Q1 + 1.5IQR. Here, n can be arbitrarily taken. For example, when a single value screening judgment is required and n = 0, the position of the interquartile range limit line in Step 6 is IQR = (Q3 - Q1) / 2.

[0099] In this application, the fault detection method for the single cell voltage of the fuel cell uses box plot analysis and locates incorrect data, which is fast and efficient, and can quickly judge the faulty single cell voltage and indicate the fault position information.

[0100] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0101] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0102] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes and / or blocks Figure 1 one or more of the processes and / or blocks Figure 1 specified in the block or blocks.

[0103] These computer program instructions can 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, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes and / or blocks Figure 1 one or more of the processes and / or blocks Figure 1 specified in the block or blocks.

[0104] The present invention is not limited to the above embodiments. For those of ordinary skill in the art of this technology, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications are also considered within the protection scope of the present invention. The content not described in detail in this specification belongs to the prior art well known to those skilled in the art.

Claims

1. A method for fault detection of the single - cell voltage of a fuel cell, characterized in that, It includes the following steps: S1. Read the network baud rate and network nodes by comparing the keywords BS_ and BU_. S2. Read the message and signal mixing array BO / SG by conditionally looping and comparing the keywords BO_ and SG_. S3. Read the annotation array CM of DBC messages and signals by conditionally looping and comparing the keyword CM_. S4. Use the size N of the array BO / SG in step S2 as the number of times for conditional judgment loop, and separate it according to the defined DBC message structure and DBC signal structure. Fill the DBC message cluster into the tree according to the signal name, start bit, length, format, conversion factor, offset, range, unit, node, and annotation. S6. Obtain the signal value and description array VAL by conditionally looping and comparing the keyword VAL_, and determine the specific position, value, and meaning represented by the value according to the value syntax. S7. Assign the DBC signal structure and message structure obtained in the previous step to the CAN message structure and then send it through the CAN bus. S8. Complete the file parsing of the single-chip voltage. It also includes: Step 1. Read the DBC file and obtain the actual voltage of the single-chip voltage in real time through the CAN bus. Step 2. Save each single chip in the array A1 in sequence, then sort the single-chip voltages in the array A1 from small to large and save them in the array A2, and record the corresponding single-chip numbers and save them in the array B1. Step 3. Set the box plot of the single-chip voltage array, preset the positions of the quartiles, divide the array A2 into four parts of numbers, set three quartiles in one array and they are the lower quartile Q1, the middle quartile Q2, and the upper quartile Q3 in turn, where Q1 = (n + 1) / 4, Q2 = (n + 1) / 2, Q3 = 3*(n + 1) / 2, and n represents the array size. Step 4. Analyze the outliers according to the box plot. Set the interquartile range as: IQR = Q3 - Q1, and the limit line positions as: Q1 - nIQR ~~ Q1 + nIQR, where n is the value coefficient. The outliers are set as the data outside the limit line, and the single-chip batteries corresponding to the outliers are all marked as abnormal single-chip batteries. Step 5. Screen the outliers, set the values within the limit line positions as normal values, and those lower than or exceeding the limit line positions as outliers. Obtain the positions in the array A2 according to the outliers, and then obtain the single-chip numbers in the array B1 corresponding to these positions. Step 6. Display the outliers and single-chip positions graphically to complete the fault detection.

2. The method for detecting a fault in the single-cell voltage of a fuel cell according to claim 1, wherein: In step S4, it also includes comparing the first three characters of each row of the array BO / SG with BO_: If they are consistent, obtain the message ID, message name, data length, and sending node according to the BO_ message syntax structure. If they are inconsistent, then judge with SG_. If they are consistent, obtain the name, start bit, bit length, byte order, symbol type, gain, offset, minimum value, maximum value, unit, and receiving node according to the SG_ signal syntax. At the same time, search the annotation array CM according to the message ID, loop times, and CM_ object annotation syntax to obtain the annotation of each signal and assign it to the DBC signal structure. If the first three characters of each row of the array BO / SG are neither equal to BO_ nor equal to SG_, obtain the DBC message structure and the number of signals in the message structure, and at the same time increment the loop count by 1. Repeat the above judgment until the loop count is greater than the size N of the array BO / SG, and then exit the loop.

3. The fault detection method for the single-cell voltage of a fuel cell according to claim 1, wherein: In the fourth step, the position of the interquartile range limit line is Q1 - 1.5IQR to Q1 + 1.5IQR.

4. The fault detection method for the single-cell voltage of a fuel cell according to claim 1, characterized in that: IQR = (Q3 - Q1) / 2.

Citation Information

Patent Citations

  • DBC file analysis method and DBC file analysis program design method based on CAN communication

    CN107132832A

  • DBC file parsing and message analyzing method based on regular expression

    CN108600192A