Method and device for predicting performance of vehicle fuel cell system, equipment and medium
By analyzing the target CAN message data of the fuel cell system and applying the long and short-term memory neural network model, the problem of low accuracy in fuel cell performance prediction in the prior art is solved, and more accurate performance prediction and longer Service life.
Patent Information
- Application Number
- CN202411338121.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the prediction accuracy of fuel cell performance attenuation based on physical models is low, due to the limited understanding of the attenuation mechanism and the influence of complex operating environment.
By analyzing the target CAN message data of the vehicle, extracting key data and storing it in an easy-to-read format file, the long-term and short-term memory neural network model is used to predict the performance of the fuel cell system, and the accuracy of the prediction results is improved.
It has achieved improved accuracy in fuel cell system performance prediction, can more effectively predict performance attenuation trends, and extend the service life of fuel cells.
Smart Images

Figure CN119312667A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a method, device, equipment and medium for predicting the performance of a vehicle fuel cell system. Background Art
[0002] Fuel cell vehicles generate electricity through the chemical reaction of hydrogen and oxygen to drive the vehicle. Its emissions are mainly water, and almost no harmful pollutants are produced. However, during the actual operation of fuel cell vehicles, the performance of their fuel cell systems will gradually decline, such as reduced power output capacity and reduced system efficiency. This performance decline will not only affect the normal operation of the vehicle, but also increase the cost of maintenance and replacement.
[0003] In related technologies, the performance degradation of fuel cells is predicted based on physical models. Specifically, the fuel cell's voltage, current, temperature and other parameters are input into the fuel cell's physical equation to calculate the fuel cell's capacity degradation trend.
[0004] However, the establishment of physical equations is limited by the limited understanding of various attenuation mechanisms of fuel cells, and the performance of fuel cells is also affected by their actual complex operating environment, so the accuracy of the prediction results based on physical models is relatively low. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a method, device, equipment and medium for predicting the performance of a vehicle fuel cell system that solves the above problems. The target CAN message data of the vehicle can be directly parsed, and the parsed key data is stored in an easy-to-read format file, and then relevant data affecting the performance of the fuel cell system is extracted therefrom. Performance prediction is performed based on these relevant data through a long short-term memory neural network model, making the prediction result more accurate.
[0006] In a first aspect, the present invention provides a method for predicting the performance of a vehicle fuel cell system, the method comprising:
[0007] Parsing key data from the target CAN message data of the vehicle based on the communication matrix file, and storing the key data in a file of a preset format after processing;
[0008] Extracting relevant data of the fuel cell system from the file in the preset format, the relevant data including multiple of a first operating parameter of the fuel cell, an air supply parameter, a cooling parameter, an environmental parameter, and a second operating parameter of the vehicle;
[0009] The relevant data is input into a pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model.
[0010] Optionally, the target CAN message data is CAN message data in an .asc format file, the preset format is a .csv format, and the key data is parsed from the target CAN message data of the vehicle based on the communication matrix file, and the key data is processed and stored in a file in the preset format, including:
[0011] Parsing key data from the target CAN message data in the .asc format file based on the communication matrix file, the key data including signal name, signal value and signal unit;
[0012] The key data is cleaned and filled and then stored in the .csv format file.
[0013] Optionally, parsing key data from the target CAN message data in the .asc format file based on the communication matrix file includes:
[0014] Obtain the frame type identifier of each line of target CAN message data in the .asc format file;
[0015] Determine the format of each line of target CAN message data according to the frame type identifier, wherein the format includes a CAN format and a CAN FD format;
[0016] Based on the structural characteristics of the format in the communication matrix file, determining the start bit and the stop bit of the key field in each line of the target CAN message data, and extracting the key field from each line of the target CAN message data according to the start bit and the stop bit;
[0017] The key data is obtained by parsing the key fields based on the communication matrix file.
[0018] Optionally, it is characterized in that the determining the start bit and stop bit of the key field in each line of the target CAN message data based on the structural characteristics of the format in the communication matrix file comprises:
[0019] If the key data is the signal value, then based on the structural characteristics of the format in the communication matrix file, determine the starting position of the key field corresponding to the signal value in each row of target CAN message data, and the data length code of the key field corresponding to the signal value;
[0020] The stop bit of the key field corresponding to the signal value in each line of the target CAN message data is calculated according to the start bit and the data length code.
[0021] Optionally, parsing key data from target CAN message data of the vehicle based on the communication matrix file includes:
[0022] Get the parsing frequency;
[0023] According to the analysis frequency, key data is analyzed from the target CAN message data of the vehicle based on the communication matrix file, and the analysis progress is displayed.
[0024] Optionally, the first operating parameter includes multiple ones of the stack output voltage, the stack output current, the stack temperature, the accumulated operating time, the insulation resistance and the standard deviation of the single cell voltage.
[0025] Optionally, the long short-term memory neural network model includes, in sequence, an input layer, a first LSTM layer, a first Dropout layer, a first BN layer, a second LSTM layer, a second Dropout layer, a second BN layer, a Dense layer and an output layer.
[0026] In a second aspect, the present invention provides a device for predicting the performance of a vehicle fuel cell system, the device comprising:
[0027] A parsing module, used for parsing key data from the target CAN message data of the vehicle based on the communication matrix file, and storing the key data in a file of a preset format after processing;
[0028] An extraction module, configured to extract relevant data of the fuel cell system from the file in the preset format, wherein the relevant data includes multiple of a first operating parameter of the fuel cell, an air supply parameter, a cooling parameter, an environmental parameter, and a second operating parameter of the vehicle;
[0029] The prediction module inputs the relevant data into a pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model.
[0030] In a third aspect, the present invention provides an electronic device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method described in the first aspect by executing the computer instructions.
[0031] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0032] The technical solution provided in the embodiments of the present invention has at least the following technical effects or advantages:
[0033] The embodiment of the present invention provides a method, device, equipment and medium for predicting the performance of a vehicle fuel cell system. Based on a communication matrix file, key data is parsed from the target CAN message data of the vehicle, the target CAN message data is directly converted to obtain first-hand data, and the key data is processed and stored in a file of a preset format, which is easy to read; relevant data of the fuel cell system is extracted from the file of the preset format, and the relevant data includes a plurality of first operating parameters of the fuel cell, gas supply parameters, cooling parameters, environmental parameters and second operating parameters of the vehicle, and these relevant data will affect the performance of the fuel cell system; the relevant data is input into a pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model, and the prediction is made by the long short-term memory neural network model, so that the prediction result can be more accurate. The method directly parses the target CAN message data of the vehicle, and stores the parsed key data in an easy-to-read format file, and then extracts the first-hand relevant data affecting the performance of the fuel cell system from it, and predicts the performance through the long short-term memory neural network model according to these relevant data, so that the prediction result is more accurate.
[0034] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0036] Figure 1 is a flow chart of a method for predicting vehicle fuel cell system performance provided by an embodiment of the present invention;
[0037] Figure 2 is a schematic diagram of raw data stored in an .asc format file provided by an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of key data stored in a .csv format file provided by an embodiment of the present invention;
[0039] Figure 4 It is a neural network structure diagram based on LSTM provided by an embodiment of the present invention;
[0040] Figure 5It is a structural block diagram of a vehicle fuel cell system performance prediction device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solutions and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. It should be understood that the embodiments of the present disclosure and the specific features in the embodiments are detailed descriptions of the technical solutions of the present application, rather than limitations on the technical solutions of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0042] Figure 1 is a flow chart of a method for predicting vehicle fuel cell system performance provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0043] Step S110: parse key data from the target CAN message data of the vehicle based on the communication matrix file, and store the processed key data into a file in a preset format.
[0044] In this embodiment, the communication matrix file is a .dbc format file, which is a file that defines the structure of CAN messages and the physical meaning of each signal in the automotive electronic system. It provides information such as the start bit, length, scaling factor, and offset of each field in each CAN message. It is saved in the dbc folder and can be directly obtained from the dbc folder when needed.
[0045] The target CAN message data is the data transmitted by the CAN bus. Each target CAN message data is composed of multiple fields, each field is composed of one or more numbers or characters, and different fields represent different meanings. Among them, the CAN bus is a serial communication protocol that is widely used in data exchange between automotive electronic control systems. The design goal of the CAN bus is to ensure high reliability and real-time data transmission, while simplifying the line layout and reducing costs. In the car, various electronic control units communicate with each other through the CAN bus.
[0046] In this embodiment, because the communication matrix file defines the structure of the CAN message and the physical meaning of each signal, the target CAN message data can be parsed based on the communication matrix file to obtain key data that can express the true meaning of the CAN message data.
[0047] Optionally, the target CAN message data of the vehicle is CAN message data in an .asc format file.
[0048] Among them, the .asc format file is used to store CAN message data. The .asc format file is a format file of the CAN bus (Controller Area Network) commonly used in the automotive industry, which records a wealth of communication data.
[0049] In this embodiment, the vehicle will collect raw data of the vehicle through various sensors when it is driving, and then collect the raw data collected by the sensor from the sensor network through the data acquisition module, and transmit the raw data to the central control unit through the CAN bus. The central control unit stores these raw data in .asc format files, and the .asc format files are saved in the corresponding .asc folders, that is, the target CAN message data in the .asc format file is the raw data collected by the sensor. When it is necessary to call, the .asc format file can be obtained from the central control unit. The data acquisition module ensures the real-time and accuracy of data transmission, laying the foundation for data processing and analysis.
[0050] Figure 2 is a schematic diagram of raw data stored in an .asc format file provided by an embodiment of the present invention, such as Figure 2 As shown, the .asc format file stores the raw data collected by the sensor, and each line (each) of target CAN message data represents the raw data collected by a sensor at a single time.
[0051] Optionally, the default format is .csv, which is an easy-to-read file format.
[0052] Optionally, step S110 includes step S111 and step S112.
[0053] Step S111: parse key data from the target CAN message data in the .asc format file based on the communication matrix file.
[0054] Among them, the key data includes the signal name (Signal Name), signal value (Value) and signal unit (Unit). Key data can also include timestamp (Timestamp) and CAN identifier (CAN ID). The signal name represents the name in the CAN message. The signal value represents the physical value of the signal. The signal unit represents the physical unit of the signal, such as voltage (V), temperature (℃) or speed (km / h). The timestamp indicates the time when the message is recorded and is used to analyze the time dimension of the message. The CAN identifier can uniquely identify the message type on the CAN bus, and usually corresponds one-to-one with the message type in the communication matrix file.
[0055] In this embodiment, based on the CAN message structure and physical meaning defined in the communication matrix file, each field in the target CAN message data in the .asc format file is parsed into key data, and different fields can be parsed into different key data. Figure 2 The raw data that is difficult to understand can be converted into key data that can be understood. For example, Figure 2 The field in the black box is defined in the CAN message structure as a timestamp. By parsing this field, we can get the time data. The physical meaning of the other field is a signal name. By parsing this field, we can get the temperature, indicating that the target CAN message data is temperature data.
[0056] Step S112: Clean and fill in the key data and store them in a .csv format file.
[0057] In this embodiment, data cleaning is performed on the key data to remove outliers and missing values to ensure the accuracy of the data. A forward filling method can be used to fill missing data and improve data availability. Abnormal data is deleted using the Z score method based on the standard deviation. A two-dimensional table form that is easier to analyze is sorted out according to the processed key data, and the processed key data is stored in a .csv format file. The key data is displayed through a two-dimensional table. This structured output method is convenient for subsequent statistical analysis and machine learning applications.
[0058] Figure 3 csv format file provided by an embodiment of the present invention, such as Figure 3 As shown, Figure 2 The unreadable data in the table has been parsed into readable decimal key data, and the physical meaning of each key data is marked on the table header. For example, the header of the first column is Time (time, unit s), and the content of the first column is the time data in the key data.
[0059] Optionally, step S111 includes:
[0060] The first step is to obtain the frame type identifier of each line of target CAN message data in the .asc format file.
[0061] Each line of target CAN message data has a field for recording the frame type identifier of the CAN message data.
[0062] In this embodiment, modern vehicle networks may have scenarios where the CAN (Classical CAN) protocol and the CAN FD (CAN with Flexible Data Rate) protocol are mixed. The methods for parsing key data in different protocol scenarios are somewhat different, so they must be distinguished. The frame type identifiers for target CAN message data records of different communication protocols in the .asc format file are different.
[0063] In this embodiment, since the structure of the CAN message is defined in the communication matrix file, the field recording the frame type identifier can be found from the communication matrix file, and the field can be extracted to obtain the frame type identifier of the CAN message data. Generally, the field of the frame type identifier is the second bit of data in the target CAN message data, so it is easy to extract without too many confirmation steps.
[0064] The second step is to determine the format of each line of target CAN message data according to the frame type identifier.
[0065] The formats include CAN format and CAN FD format. The structures of target CAN message data in different formats are different, especially the data length and rate. For example, the structure of target CAN message data in CAN format is timestamp, channel, CANID, DLC (Data Length Code) and data, while the structure of target CAN message data in CAN FD format is timestamp, frame type identifier, CANID, channel, DLC and data.
[0066] In this embodiment, if the frame type identifier is CAN or empty, the format of the corresponding CAN message data is determined to be the CAN format; if the frame type identifier is CAN FD, the format of the corresponding CAN message data is determined to be the CAN FD format.
[0067] It can be understood that if the frame type in a row of CAN message data is identified as CAN FD, then the format of the CAN message data in this row is CAN FD. If the frame type is identified as CAN or is empty, it means that the format of the CAN message data in this row is CAN format. Alternatively, the format of all CAN message data with the frame type identified as CAN FD is determined to be CAN FD, and the format of the remaining CAN message data is determined to be CAN format.
[0068] The third step is to determine the start bit and stop bit of the key field in each line of the target CAN message data based on the structural characteristics of the format in the communication matrix file, and extract the key field from each line of the target CAN message data according to the start bit and stop bit.
[0069] Among them, the key field is the key field in the target CAN message data, that is, the field that needs to be parsed in the end. Different key fields can be parsed into different key data in the end. For example, some key fields are parsed into signal names, and some key fields are parsed into signal values.
[0070] In this embodiment, the communication matrix file defines the structure of CAN messages of different formats and the start bit of the message, so according to the structural characteristics corresponding to the CAN format, the start bit and stop bit of the key field in the CAN message data of the CAN format can be determined. According to the structural characteristics corresponding to the CAN FD format, the start bit and stop bit of the key field in the CAN message data of the CAN FD format can be determined. Next, the original data between the corresponding start bit and stop bit in the target CAN message data is extracted, that is, the key field in the target CAN message data is extracted.
[0071] Optionally, the third step includes:
[0072] If the key data is a signal value, based on the structural characteristics of the format in the communication matrix file, determine the start bit of the key field corresponding to the signal value in each line of the target CAN message data, as well as the data length code of the key field corresponding to the signal value; based on the start bit and the data length code, calculate the stop bit of the key field corresponding to the signal value in each line of the target CAN message data.
[0073] In this embodiment, the core key data is the signal value, and the core key field is the key field corresponding to the signal value. The data length code of the key field corresponding to the signal value in the target CAN message data in CAN format is up to 8 (i.e., it can only carry 8 bytes of data at most). In the target CAN message data in CAN FD format, the data length code of the key field corresponding to the signal value can be up to 64, supporting longer data loads. Among them, the data length code is used to indicate the length of the key field.
[0074] Therefore, when parsing the signal value, since the start bit of each key field is generally defined in advance in the communication matrix file, it is only necessary to determine the stop bit of the key field corresponding to the signal value based on the start bit and the data length code. For example, the first bit of the target CAN message data in the CAN format defined in the communication matrix is the timestamp, and the seventh bit is the start bit of the key field corresponding to the signal value; the first bit of the CAN message data in the CAN FD format is the timestamp, and the ninth bit is the start bit of the key field corresponding to the signal value.
[0075] Next, find the record field of the data length code in the communication matrix file, then extract the corresponding field in the CAN message data to get the data length code, then add the start bit of the data corresponding to the signal value to the data length code and subtract one to get the stop bit of the key field corresponding to the signal value. For example, the data length code of the key field corresponding to the signal value is 8, the start bit is the 7th bit, and the stop bit of the key field corresponding to the signal value is the 14th bit. Then the original data between the 7th and 14th bits in the target CAN message data is the key field corresponding to the signal value. After parsing the key field, the signal value is obtained.
[0076] In this embodiment, if the key data is a signal name or a signal unit, the start bit of the key field corresponding to the signal name or signal unit is obtained according to the structural definition of the signal name or signal unit in the CAN format and the CAN FD format, and the data length code of the signal name or signal unit is generally 1, so the start bit and the stop bit are the same, and the key field corresponding to the signal name or signal unit is extracted from the target CAN message data, and the key field is parsed to obtain the signal name or signal unit.
[0077] Step 4: parse the key fields based on the communication matrix file to obtain key data.
[0078] Next, the key data can be obtained by parsing the key fields based on the communication matrix file. Among them, when parsing the key fields corresponding to the signal values, in addition to parsing the key fields into decimal data, the corresponding scaling factors and offset values in the communication matrix file must be combined to calculate the final signal value. If the parsed signal value is a null value (that is, there is no new data update at a certain moment), in order to ensure the integrity of the time series and ensure the continuity of the data, a forward filling strategy is used to fill the signal value before the null value into the blank position. This filling method is very effective in time series data processing, especially CAN bus data processing. It can avoid the problem of incomplete analysis caused by missing data, and can maintain the continuity and logical consistency of the data.
[0079] Optionally, step S110 includes:
[0080] Get the parsing frequency;
[0081] The target CAN message data of the vehicle is converted into first data according to the parsing frequency based on the communication matrix file, and the conversion progress is displayed.
[0082] In this embodiment, in order to improve the flexibility of analysis, a user input interaction mechanism is designed to allow users to select different analysis frequencies according to their needs, that is, to select different data analysis time intervals (1s, 0.1s or 0.01s). This gives users more refined control in different analysis scenarios, especially when high-frequency data needs to be processed (such as vehicle sensor data), a smaller analysis frequency can provide more accurate analysis results. For example, if a 0.01 second analysis frequency is selected, the update frequency of key data will be 0.01 seconds.
[0083] Therefore, users can customize the data parsing frequency according to actual needs, so as to achieve the best results in different analysis scenarios. For example, in a fast and dynamic scenario, selecting a parsing frequency of 0.01 seconds can accurately capture every subtle CAN bus message, while in a static or non-critical scenario, selecting a parsing frequency of 1 second can effectively reduce the amount of data and increase the processing speed.
[0084] In this embodiment, during the parsing process, Python's tqdm progress bar library is used to provide real-time parsing progress feedback, intuitively displaying the current parsing progress, especially when processing a large number of files or large-scale data, effectively alleviating the anxiety caused by uncertainty during the waiting process.
[0085] In this embodiment, the function of step S110 can be implemented by software such as CANalyzer, that is, the .asc format file and the communication matrix file storing the target CAN message data are input into software such as CANalyzer, and the software will directly display the parsed key data. When necessary, the user can click the export button to obtain a .csv format file storing the key data. However, when there are batches of .asc format files that need to be parsed, they need to be manually imported one by one, and when exported, they also need to be manually exported one by one, which is very troublesome and time-consuming, resulting in very low efficiency of the entire prediction work.
[0086] Therefore, in this embodiment, a parsing tool is designed, and a Python script program is used to automatically scan batches of .asc format files from the asc folder and scan communication matrix files from the dbc folder, and then parse them. After the parsing is completed, the .csv format file storing key data is automatically output. The parsing of batch files is realized, and .asc format files containing mixed data of different protocols can be seamlessly processed, thereby improving the parsing efficiency. Among them, the target CAN message data in the .asc file is read using Python's pandas library to ensure the accuracy and completeness of the data reading. The communication matrix file can also be verified by the Python script program, and can only be used after the verification is passed to ensure the legitimacy and consistency of the communication matrix file.
[0087] Step S120: extracting relevant data of the fuel cell system from a file in a preset format.
[0088] The relevant data include multiple ones of the first operating parameters of the fuel cell, the air supply parameters, the cooling parameters, the environmental parameters and the second operating parameters of the vehicle.
[0089] It should be noted that the target CAN message data is the operating data of the vehicle in the current complex environment, so the relevant data extracted from the parsed key data can also reflect the operating status of the fuel cell system in the current complex environment, and can more realistically reflect the status of the fuel cell system.
[0090] In this embodiment, the corresponding signal value is searched from the .csv format file according to the name of the relevant data to obtain the relevant data.
[0091] In this embodiment, the first operating parameter can directly reflect the instantaneous performance and power output of the fuel cell, while the gas supply parameters of the fuel cell gas supply system, the cooling parameters of the fuel cell cooling system, the environmental parameters of the fuel cell and the second operating parameters of the vehicle will indirectly affect the output power and performance of the fuel cell. Therefore, at least one of the above parameters can be used as relevant data. The more parameters included in the relevant data, the more accurate the final prediction result.
[0092] The first operating parameter includes at least one of the stack output voltage, the stack output current, the stack temperature, the accumulated operating time, the insulation resistance and the standard deviation of the single cell voltage.
[0093] In this embodiment, the first operating parameter is basically the relevant parameter of the fuel cell stack, which directly affects the output power of the fuel cell, thereby affecting the performance of the fuel cell. Among them, the stack output voltage and stack output current reflect the instantaneous performance and power output of the stack; the stack temperature directly affects the performance and life of the stack; the cumulative operating time is an important indicator of stack aging and performance degradation; the insulation resistance reflects the electrical insulation performance of the stack, which is an important indicator for measuring the safety of the fuel cell system; the standard deviation of the single cell voltage reflects the voltage balance of each single cell in the stack, and the smaller the standard deviation, the better the voltage balance. Therefore, the performance of the fuel cell system can be predicted based on the first operating parameter, but in order to make the prediction more accurate, it can be combined with one or more related data that indirectly affect the performance of the fuel cell system, that is, the gas supply parameters of the fuel cell gas supply system, the cooling parameters of the fuel cell cooling system, the environmental parameters of the fuel cell or the second operating parameters of the vehicle.
[0094] Among them, the standard deviation can be calculated by the following formula:
[0095]
[0096] σ V Represents the standard deviation of the single cell voltage, V i represents the voltage of the ith single cell, It represents the average voltage of all single cells, and n represents the number of single cells.
[0097] The environmental parameter includes at least one of the environmental temperature and the environmental humidity.
[0098] In this embodiment, the temperature of the stack is affected by the ambient temperature to a certain extent, and the performance of the proton exchange membrane is highly dependent on its hydration state. Appropriate ambient humidity is conducive to the water management of the stack. Appropriate humidity of the stack can maintain its good conductivity and improve the efficiency of the fuel cell. Therefore, environmental parameters are also factors that affect the performance of the fuel cell system, and can be considered during prediction to make the prediction results more accurate.
[0099] The gas supply parameters include at least one of hydrogen inlet temperature, air inlet temperature, hydrogen inlet pressure, air inlet pressure, hydrogen inlet flow, hydrogen consumption and air inlet flow.
[0100] In this embodiment, the hydrogen inlet temperature and the air inlet temperature will directly affect the temperature of the fuel cell stack, thereby indirectly affecting the performance and life of the fuel cell stack; the hydrogen inlet pressure, the air inlet pressure, the hydrogen inlet flow rate and the air inlet flow rate affect the fuel supply and reflection efficiency of the fuel cell stack, and the hydrogen consumption reflects the consumption of the fuel cell. Therefore, the gas supply parameters are also factors that affect the performance of the fuel cell system, and can be considered during the prediction to make the prediction result more accurate.
[0101] Among them, the second operating parameter includes at least one of the vehicle's required power, the vehicle speed and the remaining power of the power battery.
[0102] In this embodiment, the vehicle power requirement and vehicle speed reflect the load of the fuel cell stack; the remaining power of the power battery reflects the charge and discharge state of the battery, which directly affects the energy distribution and management of the vehicle. Therefore, the second operating parameter is also a factor that affects the performance of the fuel cell system and can be considered during prediction to make the prediction result more accurate.
[0103] In this embodiment, the relevant data may also include cooling parameters of the cooling system, including the temperature of the coolant entering the stack. The temperature of the coolant entering the stack will directly affect the temperature of the stack, thereby indirectly affecting the performance and life of the stack. Therefore, the cooling parameters are also factors that affect the performance of the fuel cell system, and can be considered during the prediction to make the prediction result more accurate.
[0104] According to the above related data, the sensor may include a temperature sensor, a humidity sensor, a voltage sensor, a current sensor, a pressure sensor, a flow meter, etc.
[0105] Step S130: input relevant data into a pre-built long short-term memory neural network model to obtain a performance value of the fuel cell system output by the long short-term memory neural network model.
[0106] In this embodiment, a long short-term memory neural network model will be constructed in advance, and relevant data that truly reflects the state of the fuel cell system in the current complex environment will be input into the long short-term memory neural network model. The long short-term memory neural network model will output the performance value of the fuel cell system, and reflect the actual performance of the fuel cell system through the performance value, fully considering the actual performance of the fuel cell system operating in a real-time changing environment, so that the predicted performance value is more accurate.
[0107] Among them, the performance value can be the ratio of the fuel cell stack output power to the hydrogen consumption, which intuitively reflects the energy conversion efficiency of the stack. Therefore, the larger the performance value, the better the performance of the fuel cell system, and the smaller the performance value, the worse the performance of the fuel cell system.
[0108] In this embodiment, if the performance value is lower than the preset performance threshold, an alarm is issued and a pre-established maintenance and operation strategy is executed to provide support for safe and efficient operation of the vehicle and extend the service life of the fuel cell. Alarm measures are taken based on the prediction results to ensure the reliability of vehicle operation.
[0109] In this embodiment, relevant data within a first time period set before the current moment is input into a pre-built long short-term memory neural network model to obtain a performance value within a second time period set after the current moment output by the model.
[0110] In this embodiment, the previous relevant data of the fuel cell system can be used to predict the future performance of the fuel cell system through the long short-term memory neural network model, and the performance degradation of the fuel cell system can be predicted in advance, so that preventive measures can be taken in advance to extend the service life of the fuel cell. The length of the first time period and the length of the second time period can be set according to actual conditions.
[0111] Of course, the current relevant data can also be used to predict the current performance of the fuel cell system. The long short-term memory neural network model can predict the performance of which time period, and the user can set it according to the needs.
[0112] In this embodiment, the steps of constructing a long short-term memory neural network model include:
[0113] The first step is to obtain historical relevant data of the entire life cycle of multiple fuel cell systems, as well as the historical ratio of historical output power to historical hydrogen consumption, and record the historical relevant data, historical ratio and life cycle time in a one-to-one correspondence. The historical relevant data includes at least one of the first historical operating parameters, the historical air supply parameters of the fuel cell air supply system, the historical cooling parameters of the fuel cell cooling system, the historical environmental parameters of the fuel cell and the second historical operating parameters of the vehicle. Among them, the multiple fuel cell systems may come from multiple different vehicles.
[0114] The second step is to clean and preprocess the historical data to remove outliers and missing values. The processed historical data is used as sample data and divided into training set and test set.
[0115] Step 3: Train the initial model using the training set. The model uses LSTM (Long Short-Term Memory) neural network, which is a special recurrent neural network (RNN) that is good at processing time series data. The LSTM model includes an input layer, multiple LSTM layers, and an output layer. The input layer receives the time series sample set data, the LSTM layer is used to extract features from the time series sample set, and the output layer is used to generate prediction results.
[0116] Figure 4 is a neural network structure diagram based on LSTM provided by an embodiment of the present invention, such as Figure 4 As shown, the LSTM neural network includes an input layer and an output layer. The input layer and the output layer include the first LSTM layer, the first Dropout layer, the first BN (Batch Normalization) layer, the second LSTM layer, the second Dropout layer, the second BN layer and the Dense layer in sequence.
[0117] Input layer: The input is time series data with a shape of (length, 1), where length represents the length of the input sequence and the number of historical data steps considered by the model when making predictions. By inputting past historical data into the model, the changing trend of the system is captured. Select an appropriate historical data window to ensure that the model has sufficient historical information reference when making predictions to reflect the current operating status of the fuel cell system.
[0118] The first LSTM layer is an LSTM layer with 128 neurons. The input dimension is (length, 1) and the output dimension is (length, 128). Each neuron can remember and process long-term dependencies in the time series. The LSTM memory mechanism allows the model to process long-term historical information and effectively filter noise. 128 units are sufficient to capture more complex time correlations, which helps predict the performance changes of fuel cells.
[0119] First Dropout layer: randomly discard 20% of neurons to prevent overfitting. When processing complex time series data, the model may overfit the training data, resulting in insufficient generalization ability. Introducing the Dropout layer to randomly shut down some neurons effectively reduces this risk.
[0120] The first BN layer: standardizes the output of each batch to improve the training speed and stability of the model. Keep the activation of each neuron within a reasonable range, thereby stabilizing the training process. By reducing internal covariate shift, the training speed is improved, and the model can be made more stable and adaptable to different batches of input.
[0121] Second LSTM layer: This layer continues to process the time dependency of LSTM output. The input dimension is (length, 128). The output does not return the entire sequence, but only the state of the last step. The output dimension is (128). The two-layer LSTM allows the network to capture deeper time series information, which is suitable for complex fuel cell systems. By not returning the sequence, the key information of the last time step can be further extracted to predict the performance trend of the fuel cell system.
[0122] Second Dropout layer and second BN layer: Dropout and BN are used for the second time to prevent overfitting and improve training stability.
[0123] Dense layer: fully connected layer, the input is the output of 128 neurons, processed by a 64-unit fully connected layer, and uses the ReLU activation function. It handles complex nonlinear relationships, improves the model's expressiveness, and adapts to different input conditions.
[0124] Output layer: Generates the final prediction result through a fully connected layer. The output dimension predicts the number of time steps, flexibly predicts the performance indicators of multiple steps in the future, and facilitates the judgment of long-term performance trends.
[0125] In this embodiment, the loss function of the model adopts MSE (mean-square error), and the optimization algorithm adopts Adam optimizer. During the optimization process, the model parameters are adjusted by the back propagation algorithm to minimize the loss function value. The model parameters are optimized by the hyperparameter tuning grid search method, and the parameters include batch, number of iterations, validation set ratio, number of neurons and learning rate, etc., to improve the prediction accuracy of the model. Among them, the batch (batch_size) size represents the number of samples used for each gradient update. Smaller batches will make the training more accurate, but the calculation time will be longer; larger batches are faster, but local gradient details may be ignored. The number of iterations (epochs) represents the number of times the model traverses the training set. Increasing the number of iterations helps the model to fully learn, but avoid overfitting. The validation set ratio (validation_split) represents the data used to split a portion of the sample data as a validation set to evaluate the generalization ability of the model and prevent the model from overfitting. The number of neurons is to adjust the number of neurons in the LSTM layer and the fully connected layer to ensure that the model has sufficient expression ability while avoiding overfitting. The learning rate controls the step size of each model update. If the learning rate is too large, the model will not converge, while if the learning rate is too small, the convergence speed will be too slow.
[0126] For example, after optimization, learning rate = 0.001, the number of neurons in the LSTM layer is 128, the number of neurons in the fully connected layer is 64, validation_split = 0.2, epochs = 50, batch_size = 256. After multiple iterations and adjustments, an LSTM neural network model with excellent results is obtained.
[0127] In order to prevent overfitting, save training resources, and improve the generalization ability of the model, the early stopping mechanism automatically determines when to stop training, thereby simplifying the process of hyperparameter adjustment. The tuned model is saved as an h5 format file for subsequent steps.
[0128] Step 4: Use the test set data to evaluate the accuracy of the model. The mean square error (MSE) is used as the evaluation indicator to evaluate the prediction effect of the model. After evaluation, if the model prediction effect is good, it means that the construction is successful. Otherwise, the model can be retrained.
[0129] Based on the same inventive concept, an embodiment of the present invention also provides a device for predicting the performance of a vehicle fuel cell system. Figure 5 is a structural block diagram of a vehicle fuel cell system performance prediction device provided by an embodiment of the present invention, such as Figure 5 As shown, the device 500 includes a parsing module 501 , an extraction module 502 and a prediction module 503 .
[0130] The parsing module 501 is used to parse the key data from the target CAN message data of the vehicle based on the communication matrix file, and store the processed key data into a file in a preset format;
[0131] An extraction module 502 is used to extract relevant data of the fuel cell system from a file in a preset format, the relevant data including multiple of a first operating parameter of the fuel cell, an air supply parameter, a cooling parameter, an environmental parameter, and a second operating parameter of the vehicle;
[0132] The prediction module 503 inputs the relevant data into the pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model.
[0133] Optionally, the target CAN message data is CAN message data in an .asc format file, the preset format is a .csv format, and the parsing module 501 includes:
[0134] A parsing unit, used for parsing key data from target CAN message data in an .asc format file based on a communication matrix file, the key data including signal name, signal value and signal unit;
[0135] The storage unit is used to clean and fill the key data and store them in a .csv file.
[0136] Optionally, the parsing unit includes:
[0137] The acquisition subunit is used to obtain the frame type identifier of each line of target CAN message data in the .asc format file;
[0138] A first determination subunit is used to determine the format of each line of target CAN message data according to the frame type identifier, and the format includes a CAN format and a CAN FD format;
[0139] The second determination subunit is used to determine the start bit and stop bit of the key field in each line of the target CAN message data based on the structural characteristics of the format in the communication matrix file, and extract the key field from each line of the target CAN message data according to the start bit and the stop bit;
[0140] The parsing subunit is used to parse the key fields based on the communication matrix file to obtain key data.
[0141] Optionally, the second determining subunit is further used for:
[0142] If the key data is a signal value, based on the structural characteristics of the format in the communication matrix file, determine the starting position of the key field corresponding to the signal value in each line of the target CAN message data, and the data length code of the key field corresponding to the signal value;
[0143] According to the start bit and data length code, calculate the stop bit of the key field corresponding to the signal value in each line of target CAN message data.
[0144] Optionally, the parsing module 501 is further used for:
[0145] Get the parsing frequency;
[0146] According to the parsing frequency, key data is parsed from the target CAN message data of the vehicle based on the communication matrix file, and the parsing progress is displayed.
[0147] Optionally, the first operating parameter includes multiple ones of the stack output voltage, the stack output current, the stack temperature, the accumulated operating time, the insulation resistance and the standard deviation of the single cell voltage.
[0148] Optionally, the long short-term memory neural network model includes, in sequence, an input layer, a first LSTM layer, a first Dropout layer, a first BN layer, a second LSTM layer, a second Dropout layer, a second BN layer, a Dense layer, and an output layer.
[0149] It can be understood that the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0150] An embodiment of the present invention further provides an electronic device, which may include a processor and a memory, wherein the processor and the memory may be communicatively connected to each other via a bus or other means.
[0151] The processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application, or may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned chips.
[0152] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside the electronic device. In a particular embodiment, the memory may be a non-volatile solid-state memory.
[0153] In one example, the memory may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0154] The processor implements any one of the vehicle fuel cell system performance prediction methods in the above embodiments by reading and executing computer program instructions stored in the memory.
[0155] In one example, the electronic device may further include a communication interface and a bus. Among them, the processor, memory, and communication interface are connected through a bus and communicate with each other. The communication interface is mainly used to realize the communication between the modules, devices, units and / or devices in the embodiment of the present application. Where appropriate, the bus may include one or more buses.
[0156] In addition, in combination with the vehicle fuel cell system performance prediction method in the above embodiment, the embodiment of the present invention can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any vehicle fuel cell system performance prediction method in the above embodiment is implemented.
[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0158] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:
[0159] The embodiment of the present invention provides a method, device, equipment and medium for predicting the performance of a vehicle fuel cell system. Based on a communication matrix file, key data is parsed from the target CAN message data of the vehicle, the target CAN message data is directly converted to obtain first-hand data, and the key data is processed and stored in a file of a preset format, which is easy to read; relevant data of the fuel cell system is extracted from the file of the preset format, and the relevant data includes a plurality of first operating parameters of the fuel cell, gas supply parameters, cooling parameters, environmental parameters and second operating parameters of the vehicle, and these relevant data will affect the performance of the fuel cell system; the relevant data is input into a pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model, and the prediction is made by the long short-term memory neural network model, so that the prediction result can be more accurate. The method directly parses the target CAN message data of the vehicle, and stores the parsed key data in an easy-to-read format file, and then extracts the first-hand relevant data affecting the performance of the fuel cell system from it, and predicts the performance through the long short-term memory neural network model according to these relevant data, so that the prediction result is more accurate.
[0160] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0161] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0162] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "one" or "an" preceding a component does not exclude the presence of a plurality of such components. The present invention may be implemented by means of hardware comprising a number of different components and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A method for predicting the performance of a vehicle fuel cell system, characterized in that: The method comprises: Parsing key data from the target CAN message data of the vehicle based on the communication matrix file, and storing the key data in a file of a preset format after processing; Extracting relevant data of the fuel cell system from the file in the preset format, the relevant data including multiple of a first operating parameter of the fuel cell, an air supply parameter, a cooling parameter, an environmental parameter, and a second operating parameter of the vehicle; The relevant data is input into a pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model.
2. The method for predicting vehicle fuel cell system performance according to claim 1, characterized in that: The target CAN message data is CAN message data in an .asc format file, the preset format is a .csv format, and the key data is parsed from the target CAN message data of the vehicle based on the communication matrix file, and the key data is processed and stored in a file in a preset format, including: Parsing key data from the target CAN message data in the .asc format file based on the communication matrix file, the key data including signal name, signal value and signal unit; The key data is cleaned and filled and then stored in the .csv format file.
3. The method for predicting vehicle fuel cell system performance according to claim 2, characterized in that: The step of parsing key data from the target CAN message data in the .asc format file based on the communication matrix file includes: Obtain the frame type identifier of each line of target CAN message data in the .asc format file; Determine the format of each line of target CAN message data according to the frame type identifier, wherein the format includes a CAN format and a CAN FD format; Based on the structural characteristics of the format in the communication matrix file, determining the start bit and the stop bit of the key field in each line of the target CAN message data, and extracting the key field from each line of the target CAN message data according to the start bit and the stop bit; The key data is obtained by parsing the key fields based on the communication matrix file.
4. The method for predicting vehicle fuel cell system performance according to claim 3, characterized in that: Determining the start bit and stop bit of the key field in each row of target CAN message data based on the structural characteristics of the format in the communication matrix file includes: If the key data is the signal value, then based on the structural characteristics of the format in the communication matrix file, determine the starting position of the key field corresponding to the signal value in each row of target CAN message data, and the data length code of the key field corresponding to the signal value; The stop bit of the key field corresponding to the signal value in each line of the target CAN message data is calculated according to the start bit and the data length code.
5. The method for predicting vehicle fuel cell system performance according to claim 2, characterized in that: The key data is parsed from the target CAN message data of the vehicle based on the communication matrix file, including: Get the parsing frequency; According to the analysis frequency, key data is analyzed from the target CAN message data of the vehicle based on the communication matrix file, and the analysis progress is displayed.
6. The method for predicting vehicle fuel cell system performance according to claim 1, characterized in that: The first operating parameters include multiple ones of the stack output voltage, the stack output current, the stack temperature, the accumulated operating time, the insulation resistance and the standard deviation of the single cell voltage.
7. The method for predicting vehicle fuel cell system performance according to claim 1, characterized in that: The long short-term memory neural network model sequentially includes an input layer, a first LSTM layer, a first Dropout layer, a first BN layer, a second LSTM layer, a second Dropout layer, a second BN layer, a Dense layer and an output layer.
8. A device for predicting the performance of a vehicle fuel cell system, characterized in that: The device comprises: A parsing module, used for parsing key data from the target CAN message data of the vehicle based on the communication matrix file, and storing the key data in a file of a preset format after processing; An extraction module, configured to extract relevant data of the fuel cell system from the file in the preset format, wherein the relevant data includes multiple of a first operating parameter of the fuel cell, an air supply parameter, a cooling parameter, an environmental parameter, and a second operating parameter of the vehicle; The prediction module inputs the relevant data into a pre-built long short-term memory neural network model to obtain the performance value of the fuel cell system output by the long short-term memory neural network model.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Fuel cell system output performance prediction method and device based on neural network
CN112993344A
Convolutional code decoding method and convolutional code encoding and decoding method based on bidirectional LSTM (Long Short Term Memory)
CN114268328A
Fuel cell voltage prediction method based on long short-term memory neural network model
CN114740361A
Shield tunneling machine performance prediction method based on LSTM neural network
CN116070363A
Vehicle fuel cell remaining life prediction method and device, electronic equipment and storage medium
CN116559704A