Vehicle battery and motor fault detection method and system, storage medium and vehicle
By integrating the multi-dimensional sensor data of vehicle motors and batteries and diagnosing lightweight fault detection models, the problems of accuracy and efficiency in the prior art are solved, real-time, accurate fault detection and efficient fault handling of vehicle motors and batteries are realized.
Patent Information
- Application Number
- CN202411701870.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-08-12
AI Technical Summary
The existing fault detection technology of vehicle batteries and motors has problems of accuracy and efficiency. Qualitative analysis method relies on manual logic inference and low efficiency, while quantitative analysis method relies on unstable model quality and requires additional hardware support.
By obtaining multi-dimensional sensor data of the motor and battery, performing feature fusion processing, inputting a pre-trained fault detection model for diagnosis, and using a lightweight fault detection model for real-time diagnosis, reducing dependence on cloud computing.
It improves the accuracy and efficiency of fault detection, realizes real-time and accurate fault diagnosis of vehicle motors and batteries, and improves the response efficiency and data utilization of fault handling.
Smart Images

Figure CN120468520A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle detection technology, and in particular to a vehicle battery and motor fault detection method, system, storage medium, controller, and vehicle. Background Art
[0002] At present, fault diagnosis technologies for vehicle batteries and motors are mainly divided into two categories: qualitative analysis and quantitative analysis. Qualitative analysis uses logical reasoning and expert systems to make fault judgments, while quantitative analysis relies on mathematical models or data-driven methods for analysis and prediction.
[0003] However, qualitative analysis relies on manual logical reasoning, which is inefficient and difficult to adapt to the real-time needs of complex working conditions. Quantitative analysis is highly dependent on model quality. When the model is not well constructed or the parameters are not properly selected, the accuracy of the diagnostic results cannot be guaranteed.
[0004] Therefore, the above-mentioned fault detection method for the vehicle motor and battery has low accuracy and efficiency. Summary of the Invention
[0005] An embodiment of the present application provides a method for detecting faults in a vehicle battery and motor, which can improve the accuracy and efficiency of fault detection in a vehicle motor and battery, thereby at least partially solving the above-mentioned technical problems.
[0006] To achieve the above objectives, according to a first aspect of the present application, a method for detecting faults in a vehicle battery and a motor is provided, comprising:
[0007] Obtain vehicle motor sensor data and battery sensor data;
[0008] Inputting the motor sensor data and the battery sensor data into a pre-trained fault detection model, performing fault detection on the motor and battery of the vehicle, and obtaining corresponding fault detection results;
[0009] Determine whether there is a fault in the motor and battery of the vehicle based on the fault detection result. If a fault exists, obtain and store fault data and perform corresponding fault warning operations.
[0010] Optionally, inputting the motor sensor data and the battery sensor data into a pre-trained fault detection model to perform fault detection on the motor and battery of the vehicle to obtain corresponding fault detection results includes:
[0011] Performing feature fusion processing on the motor sensor data and the battery sensor data to obtain a fused feature vector;
[0012] The fault detection model is input based on the fused feature vector to perform fault detection and obtain the fault detection result.
[0013] Optionally, the motor sensor data includes a negative sequence current, a vibration signal, and a torque signal of the motor, and the battery sensor data includes a battery temperature and a battery current of the battery.
[0014] Optionally, performing feature fusion processing on the motor sensor data and the battery sensor data to obtain a fused feature vector includes:
[0015] Constructing a first characteristic matrix based on the negative sequence current, vibration signal, and torque signal of the motor within a preset time period;
[0016] Acquire first time information of the motor sensor data and second time information of the battery sensor data;
[0017] fusing the first time information, the second time information, and the first feature matrix to obtain a second feature matrix;
[0018] Perform dimensionality reduction processing on the second feature matrix to obtain the fused feature vector.
[0019] Optionally, constructing a first characteristic matrix based on the negative sequence current, vibration signal, and torque signal of the motor within a preset time period includes:
[0020] constructing a current and temperature curve of the battery according to the battery temperature and the battery current of the battery;
[0021] Converting the current and temperature curve into a grayscale image, and converting the grayscale image into a first multidimensional array;
[0022] storing the negative sequence current, vibration signal, and torque signal of the motor in a second multidimensional array;
[0023] The first feature matrix is constructed based on the first multidimensional array and the second multidimensional array.
[0024] Optionally, the method further includes:
[0025] Calculating the instantaneous value of the stator current of each phase in the motor;
[0026] Based on the instantaneous value of the current of each phase of the stator, the negative sequence current of the motor is obtained.
[0027] Optionally, the method further includes:
[0028] Obtaining the motor moment of inertia, rotor electrical angular velocity, pole pair number, and load torque of the motor;
[0029] Calculating the rotor mechanical angular velocity of the motor according to the rotor electrical angular velocity and the number of pole pairs;
[0030] A torque signal of the motor is calculated according to the motor moment of inertia, the rotor mechanical angular velocity and the load torque of the motor.
[0031] Optionally, the method further includes:
[0032] Acquiring battery sensor data and motor sensor data of the vehicle under various operating conditions as a first training set;
[0033] Adding relative time information of the vehicle from a normal state to a fault state to the training data of the first training set to obtain a second training set;
[0034] performing feature fusion processing and dimensionality reduction processing on the training data in the second training set to obtain a third training set;
[0035] Use the pre-trained model to initialize the parameters of the preset model to obtain the initial fault detection model;
[0036] The training data of the third training set are masked and then sequentially input into the initial fault detection model. The initial fault detection model is iteratively trained until the initial fault detection model converges, thereby obtaining the trained fault detection model.
[0037] According to the second aspect of the present application, a vehicle battery and motor fault detection system is provided, with technical features.
[0038] According to the third aspect of the present application, there is also provided a largest exclusive right of a protected subject matter, which includes the second smallest exclusive right of a protected subject matter as described above.
[0039] In summary, the embodiment of the present application first obtains the motor sensor data and battery sensor data of the vehicle. The above motor sensor data and battery sensor data usually include multi-dimensional data, so that the correlation between the multi-dimensional data of the vehicle can be fully utilized, making up for the limitations of traditional fault diagnosis through a single signal, and improving the accuracy of fault diagnosis. Then, the motor sensor data and battery sensor data are input into a pre-trained fault detection model to perform fault detection on the motor and battery of the vehicle to obtain the corresponding fault detection results, thereby eliminating the need to rely on cloud computing and high network requirements. Data processing and real-time diagnosis can be performed based on a lightweight fault detection model, thereby improving the efficiency of fault detection. Finally, based on the fault detection results, it is determined whether there is a fault in the motor and battery of the vehicle. When a fault exists, the fault data is obtained and stored, and the corresponding fault warning operation is performed, thereby also improving the response efficiency and data utilization of fault processing.
[0040] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0042] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings, wherein the same drawing numbers represent the same parts in the following description.
[0043] Figure 1 is a flow chart of a method for detecting a fault in a vehicle battery and a motor provided in an exemplary embodiment of the present disclosure;
[0044] Figure 2 1 is a schematic diagram of the in-vehicle layout of a battery and motor fault detection system provided in an exemplary embodiment of the present disclosure;
[0045] Figure 3 is a schematic diagram of the hardware structure of a battery and motor fault detection system provided in an exemplary embodiment of the present disclosure;
[0046] Figure 4 1 is a schematic diagram of the topological structure of a battery and motor fault detection system provided in an exemplary embodiment of the present disclosure;
[0047] Figure 5 is a schematic diagram of the hardware structure of a battery and motor fault detection system provided in an exemplary embodiment of the present disclosure;
[0048] Figure 6 is a schematic diagram of fault detection for a vehicle provided in an exemplary embodiment of the present disclosure;
[0049] Figure 7 is a schematic diagram of a process for providing a vehicle fault warning according to an exemplary embodiment of the present disclosure;
[0050] Figure 8 is a schematic diagram of a process for processing vehicle data provided in an exemplary embodiment of the present disclosure;
[0051] Figure 9 is a schematic diagram of a process for training an initial fault detection model provided in an exemplary embodiment of the present disclosure;
[0052] Figure 10FIG. 1 is a schematic diagram of the architecture of a vehicle provided in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0054] Based on the issues mentioned in the background technology, the electric vehicle and hybrid vehicle markets are experiencing rapid growth, driven by global technological innovation and industrialization. In particular, the battery-motor system (BMS) in vehicles is undergoing rapid development. This system, consisting of a battery pack, motor, and electronic control system, is the core of new energy vehicles. To ensure the proper operation of these systems, fault diagnosis has been extensively researched and applied. Early fault diagnosis techniques relied primarily on manual experience, but subsequently evolved into diagnostic methods based on signal processing, expert knowledge, and mathematical models. In recent years, fault diagnosis techniques based on qualitative and quantitative analysis have gradually gained a dominant position. Qualitative analysis methods typically rely on manual reasoning and logical reasoning, using graph theory, qualitative simulation, and expert system approaches to diagnose systems. Quantitative analysis methods, on the other hand, rely on mathematical models or data-driven analytical model diagnosis or fault data analysis. Existing research has improved diagnostic efficiency and accuracy to a certain extent by using analytical modeling or data-driven methods to diagnose faults.
[0055] However, existing fault diagnosis technologies for vehicle batteries and motors still have many shortcomings. Qualitative analysis methods rely on human factors in logical reasoning, are inefficient, and have a limited diagnostic scope, making them unable to adapt to the real-time diagnosis needs of battery and motor systems under complex working conditions. Quantitative analysis methods are highly dependent on the accuracy of mathematical model construction and parameter selection. When the model is not well constructed or the data features are insufficiently extracted, the accuracy and stability of the diagnostic results will be significantly affected. In addition, some model-based fault diagnosis methods require additional hardware support or manual intervention, further increasing the system complexity and implementation costs. The above defects limit the widespread application of existing methods in vehicle battery and motor fault diagnosis.
[0056] This application provides a method for detecting vehicle battery and motor faults. Figure 1 The vehicle battery and motor fault detection method provided in the embodiment of the present application includes steps 101-103, which are described in detail below.
[0057] Step S101: Acquire motor sensor data and battery sensor data of the vehicle.
[0058] In some embodiments, the motor sensor data may include a negative sequence current, a vibration signal, and a torque signal of the motor, and the battery sensor data may include a battery temperature and a battery current of the battery.
[0059] Among them, the negative sequence current refers to the abnormal component caused by the imbalance of the three-phase current. It is usually detected by a current sensor and the three-phase current data is calculated according to the formula. The abnormal change of the negative sequence current is an important indication of the existence of an internal fault in the motor (such as a short circuit or damage to the winding). Among them, the vibration signal is collected by a vibration sensor (such as an accelerometer) installed near the motor, which can reflect the mechanical state of the motor, such as bearing damage, rotor imbalance, etc. Among them, the torque signal is usually collected by a torque sensor, or calculated based on the motor operating status and output power. Abnormal torque fluctuations may indicate abnormal mechanical load or motor operation failure.
[0060] The above data can come from the vehicle's built-in current sensor, vibration sensor and torque sensor. The sensor is connected to the control unit (such as MCU) through a bus and transmits real-time signal data to the diagnostic module for processing.
[0061] Battery temperature can be measured by real-time monitoring of the battery's operating temperature using temperature sensors in the battery management system (BMS). Abnormal temperature may indicate battery overheating, cooling system failure, or internal battery issues such as thermal runaway. Battery current can be measured by current sensors in the BMS to detect the battery's charge and discharge currents. Abnormal current fluctuations may indicate battery short circuits, aging, or abnormal load conditions.
[0062] The above data can be directly collected by the vehicle's BMS and transmitted to the diagnostic system through the vehicle's communication bus to form dynamic feedback on the battery's operating status.
[0063] In practical applications, such as Figure 2 As shown, inside the vehicle, the motor sensor is connected to the motor, and the battery sensor is connected to the power battery. The diagnostic system can obtain motor sensor data from the motor sensor and battery sensor data from the battery sensor, and input the above two types of data into the model to obtain corresponding fault detection results, and then store the fault detection results or give corresponding early warning measures.
[0064] By acquiring multi-dimensional data from the motor and battery, this application can fully understand the operating status of the vehicle's core components. This data not only provides key fault information individually, but also improves the accuracy and robustness of the diagnostic model after feature fusion. In particular, the combination of negative sequence current, vibration signals, and torque signals, used in conjunction with battery temperature and current data, can achieve joint diagnosis of the vehicle's motor and battery, effectively identify complex fault modes, and improve diagnostic effectiveness.
[0065] In some embodiments, the instantaneous value of the current of each phase of the stator in the motor may be calculated first, and then the negative sequence current of the motor may be obtained based on the instantaneous value of the current of each phase of the stator.
[0066] Specifically, the instantaneous value of each phase stator current is based on the motor three-phase current signal i A 、i B 、i C The amplitude and phase relationship is calculated, and the specific formula is as follows:
[0067]
[0068] Among them, I A , I B , I C are the amplitudes of the three-phase currents A, B, and C, ω is the angular frequency of the alternating current, and t is time.
[0069] The above formula can be used to determine the instantaneous value of the three-phase stator current at a given moment. Because three-phase current is periodic and symmetrical, by acquiring the three-phase stator current data and performing real-time calculations, dynamic current distribution information can be obtained during motor operation.
[0070] In some embodiments, the calculation formula of the negative sequence current can be expressed as:
[0071]
[0072] Among them, i A 、i B 、i c are the instantaneous values of the three-phase current of the stator, expressed in complex form. a=e j120° is a complex coefficient used to realize the rotation transformation of the three-phase current. The complex form of each phase current is:
[0073] i A =I A *exp(i*0°), i B =I B *exp(i*β1), i c =I C *exp(β2);
[0074] Among them, iA Remain unchanged, B Rotated 240°, corresponding to coefficient a 2 ,i C The negative sequence current value when the motor is running can be obtained by weighted summing of the three-phase currents.
[0075] Through the above method, this application calculates the instantaneous current value of each stator phase by the amplitude and phase of the motor's three-phase current signal. This instantaneous current value is then introduced into the negative-sequence current formula, and the unbalanced component is extracted through complex transformation to obtain the motor's negative-sequence current. The negative-sequence current reflects the imbalance of the motor's three-phase current and is an important basis for fault diagnosis, indicating problems such as short circuits, open circuits, or asymmetry in the motor windings.
[0076] In some embodiments, the motor's moment of inertia, rotor electrical angular velocity, pole pair number and load torque can be obtained first, and then the motor's rotor mechanical angular velocity is calculated based on the rotor electrical angular velocity and pole pair number. Finally, the motor's torque signal is calculated based on the motor's moment of inertia, rotor mechanical angular velocity and load torque.
[0077] Among them, the motor moment of inertia reflects the inertia of the motor rotor and load, which is usually determined by the design and operating status of the motor and can be obtained through the motor control system or parameter data provided by the manufacturer. The rotor electrical angular velocity is measured in real time through feedback data from the motor control system, usually in terms of the angular frequency of the electrical cycle (unit: ra The number of pole pairs is a fixed parameter of the motor's structure and can be found in the motor's specifications or design parameters. Load torque is calculated using a load sensor or based on operating conditions and represents the load torque at the motor shaft end.
[0078] In some embodiments, the rotor mechanical angular velocity can be calculated according to the following formula:
[0079]
[0080] Among them, Ω r is the rotor mechanical angular velocity, ω r is the rotor electrical angular velocity, P n The number of motor pole pairs. The rotor's mechanical angular velocity represents the actual physical rotational speed of the rotor. It is proportional to the electrical angular velocity through the number of pole pairs. Converting electrical parameters into mechanical angular velocity facilitates subsequent use.
[0081] In some embodiments, the calculation formula of the torque signal can be expressed as:
[0082]
[0083] Among them, Te is the torque signal, J is the motor moment of inertia, Ω r is the rotor mechanical angular velocity, T L is the load torque.
[0084] Step S102: Input the motor sensor data and the battery sensor data into a pre-trained fault detection model, perform fault detection on the motor and battery of the vehicle, and obtain corresponding fault detection results.
[0085] In some embodiments, step S102 may include:
[0086] First, feature fusion processing is performed on the motor sensor data and the battery sensor data to obtain a fused feature vector;
[0087] Then, the fault detection model is inputted based on the fused feature vector to perform fault detection and obtain the fault detection result.
[0088] To better understand the process of vehicle battery and motor fault detection in this application, first refer to Figures 3 to 5 , which will be described in detail below.
[0089] like Figure 3 As shown, the method of this application is executed on a microcontroller unit (MCU) based on a Linux system. The MCU is the central unit responsible for fault diagnosis and data processing. A lightweight fault detection model is deployed within it for real-time data processing and analysis. In this scenario, the fault detection model can be a model based on the structure of the ALBERT model.
[0090] Battery parameters can be acquired through a BMS (Battery Management System), including key signals such as battery current and temperature. Motor parameters can be collected in real time using in-vehicle current sensors, torque sensors, and other hardware, including motor status data such as negative sequence current, vibration signals, and torque signals.
[0091] During subsequent data transmission and fault detection result processing, the MCU can access these operating parameters via the in-vehicle bus and perform real-time diagnosis. The built-in communication module can upload fault data to a remote server or send it to emergency contacts. To improve data transmission stability, an LTE antenna module can also be integrated to enhance signal quality.
[0092] like Figure 4 As shown, in some embodiments, the system of the present application may include a sensor module, a storage module, a communication module and a clock module.
[0093] Specifically, the sensor module can collect multi-dimensional parameters of the vehicle battery and motor, including temperature, current, vibration signals, etc., and transmit them to the MCU via the bus. The storage module can be an EMMC storage unit equipped inside the MCU to record fault data. Combined with the RTC real-time clock module, it obtains the exact time of fault occurrence to support subsequent maintenance and analysis. The communication module is responsible for data uploading and SMS alarms, and promptly delivers diagnostic information to the owner or emergency contact. The clock module can ensure the accuracy of the fault recording time and provide a precise timestamp for data storage and analysis. The overall topology of the system clarifies the flow of system data and the logical level of information processing, forming a complete functional chain from data acquisition to storage and upload.
[0094] like Figure 5 As shown, the system of the present application may include three hardware modules: a data acquisition module, a fault diagnosis module, and a fault alarm module. Specifically, the data acquisition module is responsible for acquiring parameter information of the battery and motor from sensors and BMS. Data is transmitted through a real-time bus to ensure the integrity and real-time performance of the system's operating status. The fault diagnosis module is a core functional module that performs feature fusion and analysis on the input multi-dimensional data based on the fault detection model. The model uses vehicle-side computing resources to complete real-time fault judgment, avoiding dependence on cloud computing and enhancing the independence and real-time performance of the system. The fault alarm module can perform hierarchical processing based on the diagnostic results. For non-emergency faults, the fault detection data can be stored first, and the driver can be prompted through the in-vehicle display. For emergency faults, text messages can be sent to emergency contacts through the communication module, and the data can be stored for subsequent analysis.
[0095] It should be noted that fault levels can be divided into three levels. As an example only, a Level 1 fault may have no impact on vehicle safety, such as a minor anomaly. The system may record data for one minute before and after the fault. A Level 2 fault may have a certain impact on vehicle safety, such as insufficient motor power. The system will record data for three minutes before and after the fault. A Level 3 fault may have a significant impact on vehicle safety, such as a battery temperature detection failure. The system will record data for five minutes before and after the fault. When issuing an early warning, the system will inform the specific fault level and occurrence time and upload the relevant fault data to the server.
[0096] In some embodiments, the fused feature vector may be obtained by:
[0097] First, a first characteristic matrix is constructed based on the negative sequence current, vibration signal, and torque signal of the motor within a preset time period;
[0098] Then, obtaining first time information of the motor sensor data and second time information of the battery sensor data;
[0099] Next, the first time information, the second time information and the first feature matrix are fused to obtain a second feature matrix;
[0100] Finally, the second feature matrix is reduced in dimension to obtain the fused feature vector.
[0101] like Figure 8 As shown in the figure, in a specific implementation, three types of data are collected within a preset time window: the motor's negative-sequence current, vibration signal, and torque signal. The negative-sequence current reflects the unbalanced current during motor operation. The vibration signal captures the mechanical vibration characteristics of the motor during operation. The torque signal describes the torque changes in the motor's output.
[0102] In some embodiments, the three signals may be organized into a matrix in time sequence to form a first feature matrix containing a time series, for example, where rows represent time steps and columns represent different signals.
[0103] The first time information is the time series corresponding to the motor sensor data, which is used to capture the time-varying characteristics of the motor operating state. The second time information is the time series corresponding to the battery sensor data, which is used to capture the time-varying characteristics of the battery state.
[0104] In some embodiments, the first and second time information can be extracted and aligned to the same time base. These two types of time information can be added to the first feature matrix to form a second feature matrix containing five types of real-time data, such as negative sequence current, vibration signal, torque signal, battery temperature, and battery current, as well as the two types of time information. This approach allows the matrix to incorporate not only physical signals but also temporal characteristics, making it easier for the model to capture time-dependent patterns.
[0105] In some embodiments, principal component analysis (PCA) can be used for dimensionality reduction. PCA is a common dimensionality reduction method that converts high-dimensional data into low-dimensional feature vectors by extracting the main directions of variation in the data. The second feature matrix can be input into the PCA algorithm to extract the main features and obtain the reduced feature vectors. The goal is to adjust the dimensionality of the feature vectors to meet the input format requirements of the fault detection model, such as fixed-length feature vectors, to facilitate subsequent model training and inference.
[0106] During actual vehicle operation, the following five types of data can be collected in real time: the motor's negative-sequence current, vibration signal, torque signal, and the battery pack's battery temperature and current. In specific implementation, the first feature matrix can be collected and constructed. The first and second time information are then extracted. This time information is then combined with the real-time data to construct a second feature matrix. The PCA model used during training is then used to reduce the dimensionality of the second feature matrix to obtain eigenvectors. Ensure that the feature dimensions of the vehicle-side input data are identical to those used during training to ensure accurate model predictions.
[0107] Through the above steps, this application combines multiple signals within a preset time period, such as negative sequence current, vibration, torque, battery temperature, and battery current, with time information to form a feature matrix with time characteristics. Subsequently, this matrix is reduced to a feature vector that conforms to the input format of the fault detection model, enabling more efficient model training and inference while maintaining time-dependent diagnostic capabilities.
[0108] In some embodiments, the first feature matrix can be obtained by:
[0109] First, a current and temperature curve of the battery is constructed according to the battery temperature and battery current of the battery;
[0110] Next, the current and temperature curves are converted into a grayscale image, and the grayscale image is converted into a first multidimensional array;
[0111] Then, the negative sequence current, vibration signal and torque signal of the motor are stored in a second multidimensional array;
[0112] Finally, a first characteristic matrix is constructed based on the first multidimensional array and the second multidimensional array.
[0113] like Figure 6 As shown, the process of constructing the first feature matrix includes extracting key features from the data of the battery and the motor, and integrating these features into a unified feature matrix through a series of data processing steps.
[0114] In practice, after the vehicle is started, the battery management system (BMS) can obtain real-time battery current and temperature data. These data points are then arranged chronologically to plot a curve showing the battery current and temperature over time. This current and temperature curve reflects the dynamic changes in the battery under different operating conditions and is an important basis for identifying the battery's operating status.
[0115] In some embodiments, the generated battery current and temperature curve can be stored as an image and grayscaled to convert it into a grayscale image format. The grayscale image data can be represented as a numerical matrix to form a first multidimensional array of battery parameters. The grayscale image can convert the curve data into a standardized two-dimensional numerical form, allowing the data to be input into subsequent feature fusion and diagnostic models in a unified format.
[0116] In some embodiments, the motor's negative-sequence current data, calculated by the current sensor, can be stored in an array format as a time series. The vibration signal collected by the vibration sensor and the torque signal calculated by the torque sensor are also stored in a time series format. The negative-sequence current, vibration signal, and torque signal can be combined to form a second multidimensional array of the motor's operating status. This second multidimensional array can comprehensively reflect the motor's dynamic characteristics, providing highly accurate operating parameters for subsequent diagnostic models.
[0117] In some embodiments, the first multidimensional array (battery grayscale image data) and the second multidimensional array (motor signal data) can be fused to form a unified multidimensional data structure, namely the first characteristic matrix. The first characteristic matrix combines the operating status information of the battery and the motor, and includes not only the current and temperature characteristics of the battery, but also the vibration signal, negative sequence current and torque characteristics of the motor. The first characteristic matrix realizes cross-system data integration, provides complete input data with spatiotemporal characteristics for the fault diagnosis model, and can ensure the comprehensiveness and accuracy of the diagnosis.
[0118] In some embodiments, the fault detection model can be trained by:
[0119] First, obtain the vehicle's battery sensor data and motor sensor data under various operating conditions as the first training set;
[0120] Next, the relative time information of the vehicle changing from a normal state to a fault state is added to the training data of the first training set to obtain a second training set;
[0121] Then, feature fusion processing and dimensionality reduction processing are performed on the training data in the second training set to obtain the third training set;
[0122] Then, the pre-trained model is used to initialize the parameters of the preset model to obtain the initial fault detection model;
[0123] Finally, the training data of the third training set are masked and sequentially input into the initial fault detection model, and the initial fault detection model is iteratively trained until the initial fault detection model converges to obtain a trained fault detection model.
[0124] In specific implementation, such as Figure 9As shown, the battery sensor data of the vehicle under different working conditions, such as battery current and temperature signals, and the motor sensor data, such as negative sequence current, vibration signal, and torque signal, can be collected.
[0125] Data collection covers a variety of operating conditions, from normal to faulty, ensuring the comprehensiveness and diversity of the training set. The first training set can capture the multi-dimensional characteristics of batteries and motors, providing basic data for the model to learn fault characteristics under different operating conditions.
[0126] In some embodiments, based on the first training set, "relative time information from normal state to fault state" can be added to each set of training data. This time information serves as a feature, reflecting the evolution of the fault rather than the absolute time point, and is unrelated to actual time. The inclusion of time information gives the data a dynamic nature, enabling the model to better capture the temporal correlation and evolution patterns of fault occurrence.
[0127] In some embodiments, the multidimensional feature data in the second training set can be fused to integrate information from different data sources. Principal component analysis (PCA) is used to reduce the dimensionality of the high-dimensional data and generate feature vectors suitable for the fault detection model format. The feature vector length is standardized to 128 or 256. Feature fusion and dimensionality reduction preserve the key characteristics of the data while removing redundant information, making the data more compact and improving model training efficiency.
[0128] In some embodiments, a pre-trained model related to driving parameters can be used to initialize the parameters of the fault detection model. Based on the pre-trained model, an initial fault detection model is generated, providing an efficient starting point for subsequent training. By transferring knowledge from the pre-trained model, the computational cost of training from scratch is reduced, accelerating the model's convergence process and improving the model's initial performance.
[0129] In some embodiments, the data of the third training set can be subjected to N-gram masking to randomly mask some input features to improve the model's sensitivity to features and generalization ability. The masked data is sequentially input into the initial model for training, and the diagnosis results are output through the softmax layer. The loss value of the model is calculated and the parameters are updated. The training process is repeated until the model converges, the model weight parameters are saved, and the final fault detection model is generated. The trained model can accurately output the diagnosis results of the fault type and has strong feature extraction capabilities and robustness.
[0130] In some embodiments, the specific processing method can be expressed as:
[0131]
[0132] Among them, P(n) is the output probability value, n is the position of the masked feature in the sequence, N is the total length of the feature sequence, that is, the number of features, and k is the number value, such as the kth position.
[0133] In some embodiments, the softmax layer is calculated as follows:
[0134] y=softmax(z)=softmax(W T x+b);
[0135]
[0136] Among them, y is the output result of the activation function softmax layer, z is the input data after linear transformation, W is the weight matrix, x is the input feature vector, b is the bias term, and z j is the output value corresponding to the jth class after transformation.
[0137] After processing through the softmax layer, the model outputs the corresponding diagnosis result. For example, suppose the model diagnoses four faults, and the original output vector is [1, 2, 3, 4]. Through softmax normalization, this vector is converted into a probability distribution: [1 / (1+2+3+4), 2 / (1+2+3+4), 3 / (1+2+3+4), 4 / (1+2+3+4)], or [0.1, 0.2, 0.3, 0.4]. As can be seen from the results, the probability value corresponding to fault D is the largest (0.4), so the model diagnosis result is fault D.
[0138] Step S103: Determine whether there is a fault in the motor and battery of the vehicle based on the fault detection result. If there is a fault, obtain and store the fault data and perform corresponding fault warning operations.
[0139] like Figure 7 As shown, the fault detection module's MCU, combined with the fault detection model, can perform real-time monitoring and analysis of the vehicle's battery and motor operating status. Based on the diagnostic results, it can determine whether a fault exists. If not, the communication module enters a loop waiting state, continuously monitoring the vehicle's status until a fault occurs. If a fault is detected, the fault handling process begins.
[0140] When a fault occurs, the system immediately obtains relevant data from the sensor module, including battery current and temperature information, motor negative sequence current, vibration signals, and torque signals. The RTC clock module can be used to record the specific time of the fault, ensuring the temporal relevance of the data. The fault data and the time of occurrence can be stored in the storage module for subsequent analysis and maintenance.
[0141] In some embodiments, the 4G communication module can send SMS or other messages to convey fault details and severity to different users, such as the driver or emergency contact. After the alarm is completed, the fault data and time information can be uploaded to a remote server to facilitate subsequent maintenance and analysis. After the alarm is completed and the data is stored, the system returns to the loop waiting state and continues to monitor the vehicle status to ensure that the fault is discovered and handled promptly.
[0142] From the above, it can be seen that this application determines the status of the vehicle's motor and battery through fault detection, and when a fault is detected, quickly completes data collection, alarm operation and storage, ultimately providing detailed data support for subsequent maintenance, while improving the safety and reliability of vehicle operation.
[0143] According to a second aspect of the present disclosure, a vehicle battery and motor fault detection system is provided, comprising:
[0144] A data acquisition module, used to acquire motor sensor data and battery sensor data of the vehicle;
[0145] A fault diagnosis module is used to input motor sensor data and battery sensor data into a pre-trained fault detection model to perform fault detection on the vehicle's motor and battery and obtain corresponding fault detection results;
[0146] The fault alarm module is used to determine whether a fault exists based on the fault detection results. When a fault exists, the fault data is stored and corresponding early warning operations are performed.
[0147] In some embodiments, the vehicle battery and motor fault detection system further includes:
[0148] The sensor module is used to send the vehicle's sensor data to the microcontroller unit of the fault diagnosis module through the data bus for processing to obtain fault detection results;
[0149] A clock module is used to determine the corresponding fault occurrence time according to the fault detection result and send the fault occurrence time to the storage module;
[0150] A storage module is used to store the fault detection results and the fault occurrence time in correspondence;
[0151] The communication module is used to transmit the fault detection result and the time of the fault occurrence to a predetermined terminal device. The predetermined terminal device may be, but is not limited to, a vehicle-mounted terminal or a mobile terminal communicating with the vehicle.
[0152] It should be noted that the vehicle battery and motor fault detection system has all the beneficial effects of the above-mentioned vehicle battery and motor fault detection method, which will not be described in detail in this disclosure.
[0153] An embodiment of the present application also provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned vehicle battery and motor fault detection method.
[0154] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0155] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.
[0156] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system that is implemented in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0158] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0159] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0160] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated communication signals and carrier waves.
[0161] like Figure 10 , which is a schematic diagram of the architecture of a vehicle provided in an embodiment of the present application. In this embodiment, vehicle 300 may include a controller 200, which stores a computer program that, when executed by a processor, implements the steps of the above-described vehicle battery and motor fault detection method. In this embodiment, the vehicle may be a fuel vehicle, a plug-in hybrid vehicle, or a new energy vehicle, etc., which is not specifically limited in this disclosure.
[0162] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0163] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] The embodiments, implementation methods and related technical features of the present application can be combined and replaced with each other without conflict.
[0165] The above are merely preferred embodiments of the present application and do not constitute any form of limitation to the present application. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A method for detecting faults in a vehicle battery and a motor, characterized in that: include: Obtain vehicle motor sensor data and battery sensor data; Inputting the motor sensor data and the battery sensor data into a pre-trained fault detection model, performing fault detection on the motor and battery of the vehicle, and obtaining corresponding fault detection results; Determine whether there is a fault in the motor and battery of the vehicle based on the fault detection result. If a fault exists, obtain and store fault data and perform corresponding fault warning operations.
2. The method according to claim 1, characterized in that The step of inputting the motor sensor data and the battery sensor data into a pre-trained fault detection model, performing fault detection on the motor and battery of the vehicle, and obtaining corresponding fault detection results includes: Performing feature fusion processing on the motor sensor data and the battery sensor data to obtain a fused feature vector; The fused feature vector is input into the fault detection model to perform fault detection and obtain the fault detection result.
3. The method according to claim 2, characterized in that The motor sensor data includes a negative sequence current, a vibration signal, and a torque signal of the motor, and the battery sensor data includes a battery temperature and a battery current of the battery.
4. The method according to claim 3, characterized in that The performing feature fusion processing on the motor sensor data and the battery sensor data to obtain a fused feature vector includes: Constructing a first characteristic matrix based on the negative sequence current, vibration signal, and torque signal of the motor within a preset time period; Acquire first time information of the motor sensor data and second time information of the battery sensor data; fusing the first time information, the second time information, and the first feature matrix to obtain a second feature matrix; Perform dimensionality reduction processing on the second feature matrix to obtain the fused feature vector.
5. The method according to claim 4, characterized in that The constructing of a first characteristic matrix based on the negative sequence current, vibration signal, and torque signal of the motor within a preset time period includes: constructing a current and temperature curve of the battery according to the battery temperature and the battery current of the battery; Converting the current and temperature curve into a grayscale image, and converting the grayscale image into a first multidimensional array; storing the negative sequence current, vibration signal, and torque signal of the motor in a second multidimensional array; The first feature matrix is constructed based on the first multidimensional array and the second multidimensional array.
6. The method according to claim 3, characterized in that The method further comprises: Calculating the instantaneous value of the stator current of each phase in the motor; The negative sequence current of the motor is obtained based on the instantaneous value of the current of each phase of the stator.
7. The method according to claim 3, characterized in that The method further comprises: Obtaining the motor moment of inertia, rotor electrical angular velocity, pole pair number, and load torque of the motor; Calculating the rotor mechanical angular velocity of the motor according to the rotor electrical angular velocity and the number of pole pairs; A torque signal of the motor is calculated according to the motor moment of inertia, the rotor mechanical angular velocity and the load torque of the motor.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Acquiring battery sensor data and motor sensor data of the vehicle under various operating conditions as a first training set; Adding relative time information of the vehicle from a normal state to a fault state to the training data of the first training set to obtain a second training set; performing feature fusion processing and dimensionality reduction processing on the training data in the second training set to obtain a third training set; Use the pre-trained model to initialize the parameters of the preset model to obtain the initial fault detection model; The training data of the third training set are masked and then sequentially input into the initial fault detection model. The initial fault detection model is iteratively trained until the initial fault detection model converges, thereby obtaining the trained fault detection model.
9. A vehicle battery and motor fault detection system, characterized in that: include: A data acquisition module, used to acquire motor sensor data and battery sensor data of the vehicle; a fault diagnosis module, configured to input the motor sensor data and the battery sensor data into a pre-trained fault detection model, perform fault detection on the motor and battery of the vehicle, and obtain corresponding fault detection results; The fault alarm module is used to determine whether a fault exists based on the fault detection result. When a fault exists, the fault data is stored and corresponding early warning operations are performed.
10. The system according to claim 9, characterized in that Also includes: A sensor module, configured to send the sensor data of the vehicle to the microcontroller unit of the fault diagnosis module via a data bus for processing to obtain the fault detection result; a clock module, configured to determine a corresponding fault occurrence time according to the fault detection result, and send the fault occurrence time to the storage module; The storage module is used to store the fault detection result and the fault occurrence time in correspondence; The communication module is used to transmit the fault detection result and the fault occurrence time to a set terminal device.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A controller having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
13. A vehicle, characterized in that: Including the controller according to claim 12.
14. A computer program product, characterized in that The method comprises a computer program or instructions, which implements the steps of the method according to any one of claims 1 to 8 when the computer program or instructions are executed by a processor.