A new energy vehicle real-time fault detection method and system
The new energy vehicle fault detection method based on a dual-observer architecture and adaptive gain matrix solves the problem of the observer gain not being able to adaptively optimize under multiple operating conditions, realizes real-time fault detection of electrical components and early warning of performance degradation, improves estimation accuracy and reduces false alarm rate.
Patent Information
- Application Number
- CN202512001876.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-05-15
- Estimated Expiration
- 2045-12-29
AI Technical Summary
Existing fault detection methods for new energy vehicles cannot adaptively optimize the observer gain under multiple operating conditions, resulting in decreased estimation accuracy and increased false alarm rate. Furthermore, they are unable to identify gradual faults in the performance of electrical components and thus cannot achieve early warning.
A dual-observer architecture is adopted, combining a fast-timescale state observer and a slow-timescale extended state observer. The adaptive gain matrix is calculated using the operating condition feature vector and Mahalanobis distance to estimate the parameters of battery internal resistance, motor winding resistance and power device on-state voltage drop. The observation residuals are used to identify sudden faults and the performance degradation is determined by trend analysis.
It enables real-time fault detection of electrical components in new energy vehicles, reduces false alarm rate, improves estimation accuracy, and provides timely warning of electrical component performance degradation, thus providing a time window for predictive maintenance.
Smart Images

Figure CN121434819B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical control system monitoring technology, and in particular to a real-time fault detection method and system for new energy vehicles. Background Technology
[0002] Real-time fault detection methods for new energy vehicles are key technologies for ensuring safe vehicle operation. Existing technologies commonly employ fault detection methods based on fixed thresholds. These methods set upper and lower limits for parameters such as voltage, current, and temperature in the battery management system and motor control system, triggering a fault alarm when monitored parameters exceed preset ranges. Another type of existing technology uses fault detection methods based on state observers. These methods construct a state observer by establishing a mathematical model of the electrical system and use observation residuals to determine whether a fault exists in the system. Alternatively, they employ machine learning algorithms such as support vector machines and neural networks to build a fault classification model by training historical fault data to identify fault types. These methods can achieve certain fault detection functions in laboratory environments and under specific operating conditions, providing a technological foundation for the safety monitoring of new energy vehicles.
[0003] However, existing technologies have significant shortcomings. Detection methods based on fixed thresholds struggle to adapt to parameter fluctuations in new energy vehicles under different operating conditions such as acceleration, braking, and hill climbing. Under high-current discharge conditions, increased voltage drop due to battery internal resistance can easily be misjudged as voltage anomalies. Under energy recovery conditions, reverse current flow can easily trigger current direction anomaly alarms, leading to excessively high false alarm rates. Methods based on fixed-gain state observers suffer from increased observation errors due to model mismatch during operating condition switching. When the vehicle switches from constant speed to rapid acceleration, the observer gain parameter cannot be adjusted in time to adapt to changes in the system's dynamic characteristics, resulting in false peaks in the observation residuals that trigger false alarms. Existing machine learning methods heavily rely on the quality and completeness of training data, lacking sufficient ability to identify rare fault modes and novel faults. Furthermore, complex deep learning algorithms are computationally intensive and have long response times, making it difficult to achieve true real-time processing under the limited computing power of in-vehicle embedded systems. The inability to complete fault judgment within the control cycle affects the timely response of emergency protection strategies.
[0004] Even with state observer methods to track the operating status of electrical components, existing technologies still face the dual challenges of adaptability to multiple operating conditions and gradual fault identification. Due to the complex and variable operating conditions of new energy vehicles, a fixed observer gain matrix cannot maintain optimal performance under all conditions. When operating characteristics change, the accuracy of the observer's estimation of health parameters such as battery internal resistance and motor winding resistance decreases significantly. This not only reduces the sensitivity to detect sudden faults but, more seriously, makes it impossible to accurately track the slow degradation trend of health parameters. The performance degradation of electrical components is often a gradual process: battery internal resistance gradually increases due to cyclic aging, motor winding insulation deteriorates due to temperature cycling, and power devices experience characteristic drift due to repeated switching stress. In the early stages of these gradual processes, parameter changes are minimal and are submerged in normal operating condition fluctuations and measurement noise. Traditional threshold judgment methods can only detect faults when parameters severely exceed limits, at which point the electrical component is already near failure and the preventative maintenance window has been lost. Therefore, existing technologies cannot solve the problem of adaptive optimization of observer gain under multiple operating conditions, nor can they achieve early trend identification of minute gradual changes in signals. Summary of the Invention
[0005] This application provides a real-time fault detection method and system for new energy vehicles, which solves the problems in the prior art where the observer gain cannot adapt to changes in multiple operating conditions, leading to a decrease in estimation accuracy and an increase in false alarm rate, as well as the problem that traditional methods are unable to identify gradual performance changes in electrical components and thus cannot achieve early warning.
[0006] Firstly, this application provides a real-time fault detection method for new energy vehicles, the method comprising:
[0007] Step S1: Collect the voltage control signal and current control signal of the battery management system and the three-phase current control signal of the motor control system, and calculate the operating condition feature vector based on the voltage control signal, current control signal and control command;
[0008] Step S2: Establish a fast timescale state observer based on the voltage control signal and current control signal, and establish a slow timescale observer based on the voltage control signal and current control signal, taking the battery internal resistance parameter, motor winding resistance parameter, and power device on-state voltage drop parameter as extended states;
[0009] Step S3: Calculate the Mahalanobis distance between the operating condition feature vector and each preset operating condition cluster center. Substitute the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each operating condition category. Use the membership degree as a weighting coefficient to perform weighted summation on the observer gain matrix corresponding to each operating condition category to obtain the adaptive gain matrix. Use the adaptive gain matrix to perform state correction on the slow time scale observer to obtain the estimated values of battery internal resistance parameters, motor winding resistance parameters, and power device on-state voltage drop parameters.
[0010] Step S4: Use the observation residuals of the fast timescale state observer to determine the sudden fault of the electrical component, perform trend analysis on the estimated values of the battery internal resistance parameter, the estimated value of the motor winding resistance parameter, and the estimated value of the power device conduction voltage drop parameter to determine the performance degradation fault of the electrical component, and generate fault detection results.
[0011] Secondly, this application provides a real-time fault detection system for new energy vehicles, the real-time fault detection system for new energy vehicles comprising:
[0012] The acquisition module is used to acquire the voltage control signal and current control signal of the battery management system and the three-phase current control signal of the motor control system, and calculate the operating condition feature vector based on the voltage control signal, current control signal and control command;
[0013] The generation module is used to establish a fast time-scale state observer based on the voltage control signal and the current control signal, and to establish a slow time-scale observer based on the voltage control signal and the current control signal, taking the battery internal resistance parameter, the motor winding resistance parameter, and the power device on-state voltage drop parameter as extended states.
[0014] The calculation module is used to calculate the Mahalanobis distance between the operating condition feature vector and each preset operating condition cluster center, substitute the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each operating condition category, use the membership degree as a weight coefficient to perform weighted summation on the observer gain matrix corresponding to each operating condition category to obtain the adaptive gain matrix, and use the adaptive gain matrix to perform state correction on the slow time scale observer to obtain the estimated values of battery internal resistance parameters, motor winding resistance parameters, and power device on-state voltage drop parameters.
[0015] The determination module is used to determine sudden faults of electrical components by using the observation residuals of the fast timescale state observer, and to perform trend analysis on the estimated values of the battery internal resistance parameter, the estimated values of the motor winding resistance parameter, and the estimated values of the power device conduction voltage drop parameter to determine the performance degradation faults of electrical components, and generate fault detection results.
[0016] Thirdly, a real-time fault detection device for new energy vehicles is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the real-time fault detection device for new energy vehicles to execute the aforementioned real-time fault detection method for new energy vehicles.
[0017] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computer, cause the computer to perform the above-described real-time fault detection method for new energy vehicles.
[0018] The technical solution provided in this application acquires voltage control signals and current control signals from the battery management system and three-phase current control signals from the motor control system. Based on these control signals, a working condition feature vector is calculated, enabling multi-dimensional characterization of the operating state of the electrical control system of new energy vehicles. The working condition feature vector integrates parameters reflecting different physical meanings, such as battery power, vehicle speed, acceleration, motor torque, and state of charge, into a unified feature space representation, providing a complete state information foundation for subsequent working condition identification and adaptive adjustment. A dual-observer architecture, consisting of a fast-timescale state observer and a slow-timescale extended state observer, is established. This achieves time-scale decoupling between control performance tracking and health parameter estimation. The fast observer uses a reduced-order linear model to focus on high-frequency tracking of control-related states, resulting in low computational complexity and not affecting the real-time performance of the control system. The slow observer uses an extended state model to indirectly estimate parameters that are difficult to measure directly, such as battery internal resistance, motor winding resistance, and power device on-state voltage drop. By measuring the residuals, changes in health parameters are inferred in reverse, overcoming the limitation of traditional methods that can only monitor measurable electrical quantities. This enables non-destructive online assessment of the internal health state of electrical components.
[0019] Compared to Euclidean distance, Mahalanobis distance introduces a covariance matrix to normalize and decorrelate the feature space, eliminating the unbalanced influence of different dimensional parameters on distance calculation. This accurately measures the true similarity between the current operating condition and typical operating conditions. The Gaussian membership function transforms the distance metric into a probabilistic membership degree, realizing the transformation of operating condition classification from hard classification to soft classification. This ensures that the membership degree changes continuously and smoothly during operating condition switching, avoiding abrupt changes in the classification boundary. The weighted fusion algorithm performs a convex combination of the observer gain matrix corresponding to each operating condition based on the membership degree. The resulting adaptive gain matrix dynamically adjusts the observation weights of each health parameter according to the operating condition characteristics. Under high current conditions, it automatically increases the observation gain of the battery internal resistance to quickly track changes in internal resistance. Under low current conditions, it automatically reduces the observation gain to suppress measurement noise interference, solving the problem of decreased estimation accuracy and increased false alarm rate caused by model mismatch in multi-operating-condition environments for fixed-gain observers. By utilizing the observation residuals of the fast observer, millisecond-level rapid detection of sudden faults such as sensor failure and power device short circuits is achieved. Weighted least squares linear regression fitting is performed on the health parameter estimates output by the slow observer to extract the degradation slope. Combined with the dual-condition criterion of normalized distance, early warning of gradual performance degradation faults of electrical components is achieved. This avoids premature alarms caused by relying solely on degradation rate judgment and delayed detection caused by relying solely on parameter threshold judgment. It triggers early warning in a timely manner when electrical components are in the accelerated degradation stage and are about to break through the health boundary, providing a sufficient time window for predictive maintenance. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of one embodiment of the real-time fault detection method for new energy vehicles in this application.
[0022] Figure 2 This is a schematic diagram illustrating the dynamic change of the Mahalanobis distance between the working condition feature vector and the preset working condition cluster center in the embodiments of this application.
[0023] Figure 3 This is a schematic diagram illustrating the dynamic changes in the membership degree of each working condition category calculated based on the Gaussian membership function in the embodiments of this application. Detailed Implementation
[0024] This application provides a method and system for real-time fault detection in new energy vehicles. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0025] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the real-time fault detection method for new energy vehicles in this application includes:
[0026] Step S1: Collect the voltage control signal and current control signal of the battery management system and the three-phase current control signal of the motor control system, and calculate the operating condition feature vector based on the voltage control signal, current control signal and control command;
[0027] The acquired voltage and current control signals originate from the control loop feedback of the electrical control system. The voltage control signal is acquired by voltage sensors at the positive and negative terminals of the battery pack, while the current control signal is acquired by Hall effect current sensors that capture the main circuit current of the battery pack. The three-phase current control signal is acquired by three-phase current sensors in the motor stator windings. The Clarke-Park coordinate transformation converts the current signal in the three-phase stationary coordinate system into direct-axis and quadrature-axis components in a two-phase rotating coordinate system. The quadrature-axis current component is proportional to the motor torque. The operating condition feature vector reflects a multi-dimensional combination of parameters that represent the vehicle's power demand and the electrical system's load state, forming a feature space characterizing the current operating condition. The combination patterns of these parameters differ significantly under different operating conditions.
[0028] Step S2: Establish a fast time-scale state observer based on the voltage control signal and the current control signal, and establish a slow time-scale observer based on the voltage control signal and the current control signal, taking the battery internal resistance parameter, the motor winding resistance parameter, and the power device on-state voltage drop parameter as the extended state.
[0029] The fast-timescale state observer employs a reduced-order linear model. The state transition matrix is derived from the linearization of the battery's first-order RC equivalent circuit model and the dq-axis voltage equation of the permanent magnet synchronous motor, describing the dynamic evolution of battery voltage and current and motor current within the control cycle. The slow-timescale observer uses health parameters as extended state variables. The battery internal resistance parameter reflects the increasing trend of battery ohmic internal resistance with aging; the motor winding resistance parameter reflects the resistance change of the stator winding due to temperature rise and insulation aging; and the power device on-state voltage drop parameter reflects the deterioration of the IGBT power module's conduction characteristics due to increased junction temperature and chip degradation. The extended state observer inversely calculates the changes in these parameters by using the residuals between measured and predicted values.
[0030] Step S3: Calculate the Mahalanobis distance between the feature vector of the operating condition and the cluster center of each preset operating condition. Substitute the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each operating condition category. Use the membership degree as a weighting coefficient to perform weighted summation on the observer gain matrix corresponding to each operating condition category to obtain the adaptive gain matrix. Use the adaptive gain matrix to perform state correction on the slow time scale observer to obtain the estimated values of battery internal resistance parameter, motor winding resistance parameter, and power device on-state voltage drop parameter.
[0031] In the Mahalanobis distance calculation, the inverse of the covariance matrix normalizes and decorrelates the feature space, eliminating the dimensional influence of the components of the operating condition feature vector on the numerical scale. The fuzzification parameter in the Gaussian membership function controls the membership decay rate, achieving a smooth transition of membership during operating condition switching. The weighted summation process continuously interpolates the observer gain matrices corresponding to multiple discrete operating conditions, and the adaptive gain matrix dynamically adjusts the observation weights of the slow observers for each extended state variable based on the current operating condition characteristics. The state correction process adds the predicted state to the product of the adaptive gain matrix and the measurement residual. The measurement residual is the actual measured terminal voltage minus the predicted terminal voltage calculated based on the current state estimate and health parameter estimate. The health parameter estimate is updated through residual feedback.
[0032] Step S4: Use the observation residuals of the fast timescale state observer to determine sudden faults in electrical components, perform trend analysis on the estimated values of battery internal resistance parameters, motor winding resistance parameters, and power device conduction voltage drop parameters to determine the performance degradation faults of electrical components, and generate fault detection results.
[0033] Specifically, the observation residuals generated by the fast-timescale state observer include voltage and current residuals. When the weighted L2 norm of the residuals exceeds the dynamic threshold and persists for multiple control cycles, it is determined to be a sudden fault such as sensor failure or power device short circuit. Trend analysis performs weighted least squares linear regression fitting on the health parameter estimate sequence. The slope term in the regression coefficients represents the rate of change of the health parameter over time, i.e., the degradation slope. The normalized distance is calculated by dividing the difference between the health parameter estimate and the preset health boundary by the health range width. When the absolute value of the degradation slope exceeds the degradation rate threshold and the normalized distance is less than the safety margin, it is determined that the electrical component is in the accelerated performance degradation stage, triggering a gradual fault warning flag. The fault detection result includes a fault type code and the corresponding current value of the health parameter.
[0034] In one specific embodiment, step S1 includes:
[0035] The total current of the battery pack is collected by a current sensor, and the terminal voltage of the battery pack is collected by a voltage sensor to obtain current control signals and voltage control signals.
[0036] The three-phase stator current of the motor is collected by a three-phase current sensor to obtain the three-phase current control signal;
[0037] Read the accelerator pedal opening, brake pedal opening and real-time vehicle speed, calculate the battery power as the product of the battery pack terminal voltage and the total battery pack current, calculate the vehicle acceleration as the difference between the current vehicle speed and the vehicle speed at the previous moment divided by the control cycle, perform Clarke-Park coordinate transformation on the three-phase current control signal to obtain the quadrature axis current component, and calculate the motor torque based on the quadrature axis current component, the number of motor pole pairs and the permanent magnet flux linkage.
[0038] Battery power, real-time vehicle speed, vehicle acceleration, motor torque, and state of charge are used to construct a feature vector for operating conditions.
[0039] Specifically, the current control signal and voltage control signal come from the control loop feedback of the battery management system. The current sensor uses the Hall effect principle to measure the total current of the main circuit of the battery pack in real time, and the voltage sensor directly measures the terminal voltage between the positive and negative terminals of the battery pack. The three-phase current control signal is collected by current sensors installed on phases A, B, and C of the motor stator winding. These signals reflect the real-time control status of the motor by the motor controller. The Clarke-Park coordinate transformation is the standard coordinate system transformation method in the field of motor control. The Clarke transformation converts the three-phase stationary coordinate system (ABC) into a two-phase stationary coordinate system (α-β), and the Park transformation further converts the two-phase stationary coordinate system into a two-phase rotating coordinate system (dq). The d-axis is the direct axis and is in the same direction as the rotor magnetic field, and the q-axis is the quadrature axis and is orthogonal to the rotor magnetic field. The quadrature axis current component directly generates electromagnetic torque. The motor torque is calculated by multiplying the quadrature axis current component by the number of motor pole pairs and then by the permanent magnet flux linkage. This torque value reflects the current output capacity and load state of the motor.
[0040] The operating condition feature vector combines five parameters—battery power, real-time vehicle speed, vehicle acceleration, motor torque, and state of charge—to form a point in a five-dimensional feature space. The location of this point uniquely represents the current operating condition of the electrical control system of the new energy vehicle. Battery power reflects the direction and intensity of energy flow in the electrical system; a positive value indicates discharging and a negative value indicates charging. Real-time vehicle speed and vehicle acceleration reflect the vehicle's motion state. Motor torque reflects the load demand of the drive system, and state of charge reflects the remaining battery charge. Different combinations of these five parameters correspond to different typical operating conditions. For example, high power, high torque, and low vehicle speed correspond to climbing conditions; low power, medium vehicle speed, and zero acceleration correspond to constant speed cruising conditions; and negative power, negative torque, and positive vehicle speed correspond to regenerative braking conditions.
[0041] The current operating condition feature vector is compared with the cluster centers of each typical operating condition obtained by clustering real vehicle data. The membership degree of the current operating condition to each typical operating condition category is obtained by Mahalanobis distance calculation and Gaussian membership function transformation. The membership degree reflects the similarity between the current operating state of the electrical control system and each typical operating condition. The gain matrix of the observer corresponding to each operating condition is weighted and fused based on the membership degree, so that the gain parameter of the slow time scale observer can be adjusted in real time according to the operating condition. For example, under the high current discharge condition, the gain matrix will increase the observation weight of the battery internal resistance parameter because the change of internal resistance under high current has a more significant impact on the terminal voltage. Under the low current condition, the gain matrix will reduce the observation weight of internal resistance to avoid measurement noise interference. This solves the problem of decreased estimation accuracy and increased false alarm rate caused by model mismatch in multi-operating-condition environments for fixed gain observers.
[0042] In one specific embodiment, step S3, calculating the Mahalanobis distance between the working condition feature vector and each preset working condition cluster center, includes:
[0043] Read the preset working condition cluster centers and the covariance matrix of each cluster;
[0044] Calculate the difference vector between the feature vector of the working condition and the cluster center of the i-th working condition;
[0045] The difference vector is multiplied by the inverse of the covariance matrix of the i-th cluster, and then multiplied by the transpose of the difference vector. The square root of the result is then taken to obtain the Mahalanobis distance between the operating condition feature vector and the center of the i-th operating condition cluster, which is used to identify the current operating condition of the electrical control system.
[0046] Specifically, the preset operating condition cluster centers and covariance matrix are obtained through K-means clustering analysis of real vehicle operating data in the offline phase. The cluster centers are the mean of the feature vectors of all samples under that operating condition, and the covariance matrix describes the fluctuation range and correlation of each feature parameter within that operating condition. The difference vector is obtained by subtracting the element corresponding to the i-th cluster center from each element of the current operating condition feature vector. This vector reflects the degree of deviation between the current operating condition and the typical operating condition in the feature space. The inverse of the covariance matrix performs a weighted transformation on the difference vector, eliminating the influence of different dimensions and fluctuation amplitudes of the feature parameters. For example, the battery power of a new energy vehicle during operation ranges from tens of thousands of watts to tens of kilometers per hour. If the Euclidean distance is calculated directly, large numerical parameters will dominate the distance calculation result. The inverse of the covariance matrix is normalized to balance the contribution weight of each dimension feature to the distance.
[0047] The complete process of matrix multiplication is as follows: First, the difference vector is multiplied on the left by the inverse of the covariance matrix to obtain an intermediate vector. This intermediate vector is the representation of the difference vector in the normalized feature space after the inverse transformation of the covariance matrix. Then, the intermediate vector is multiplied by the transpose of the difference vector to obtain a scalar. This scalar represents the squared distance in the normalized feature space. The square root of this scalar is then taken to obtain the Mahalanobis distance. Essentially, this calculation process transforms the Euclidean distance in the original feature space into a weighted distance that considers the characteristics of the feature distribution through the covariance matrix. When a certain feature parameter fluctuates significantly in a given operating condition, its contribution to the distance is automatically reduced in weight. When two feature parameters are strongly correlated, the Mahalanobis distance automatically eliminates redundant information to avoid duplicate calculations.
[0048] The core improvement of Mahalanobis distance over traditional Euclidean distance lies in the introduction of a covariance matrix for adaptive correction of the feature space. This is crucial for the operating condition identification of electrical control systems in new energy vehicles. This is because the characteristics of electrical parameters vary significantly under different operating conditions. For example, during rapid acceleration, battery power and motor torque change drastically while vehicle speed changes relatively smoothly; during constant-speed cruising, vehicle speed remains stable while power and torque fluctuations are small. Euclidean distance cannot distinguish these differences in parameter distribution within operating conditions, leading to misjudgments. Mahalanobis distance, through the covariance matrix, captures the inherent statistical characteristics of each operating condition category, accurately identifying the current operating condition of the electrical control system and solving the problem of low accuracy in operating condition identification under multiple operating conditions using fixed thresholds or Euclidean distance methods.
[0049] Figure 2 This is a schematic diagram illustrating the dynamic change of the Mahalanobis distance between the working condition feature vector and the preset working condition cluster center in the embodiments of this application. Figure 2 The diagram shows the changes in the Mahalanobis distance between the current operating condition feature vector and the cluster centers of the rapid acceleration and constant speed cruise conditions during the switching process of a new energy vehicle. From 0 to 10 seconds, the vehicle is in constant speed cruise mode, where the Mahalanobis distance remains relatively low at approximately 2 to 2.5, while the Mahalanobis distance for rapid acceleration is higher at approximately 8 to 10, indicating a high degree of matching between the current and constant speed cruise conditions. From 10 to 25 seconds, the vehicle gradually transitions from constant speed cruise to rapid acceleration. The Mahalanobis distance for rapid acceleration drops rapidly from approximately 8 to approximately 3, while the Mahalanobis distance for constant speed cruise rises from approximately 2 to approximately 6. The two curves intersect at approximately 13 seconds, indicating the critical point of the operating condition switch. After 25 seconds, the vehicle enters a stable rapid acceleration mode, where the Mahalanobis distance stabilizes between 5 and 6, and the Mahalanobis distance for constant speed cruise stabilizes between 2.5 and 3.5. This figure visually demonstrates that the Mahalanobis distance calculation method can accurately identify the current operating condition of the electrical control system and provide a continuous and smooth distance measurement when the operating condition changes.
[0050] In one specific embodiment, step S3 involves substituting the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each working condition category, including:
[0051] The squared value of the Mahalanobis distance is obtained by squaring the Mahalanobis distance. The squared value of the Mahalanobis distance is divided by twice the fuzzification parameter. The result is then negative and exponentially calculated to obtain the exponential term of the i-th working condition category.
[0052] The summation of the exponents for all operating conditions is performed to obtain the total sum of the exponents.
[0053] Divide the index term of the i-th operating condition category by the sum of the index terms to obtain the membership degree of the i-th operating condition category, which is used to quantify the degree of matching between the electrical control system and each typical operating condition.
[0054] Specifically, the squared Mahalanobis distance is obtained by multiplying the Mahalanobis distance calculated in the previous step. The squaring operation amplifies the distance difference, making the distinction between similar and dissimilar working conditions more obvious. The fuzzification parameter controls the decay rate of the Gaussian membership function. This parameter determines how quickly the membership degree decreases as the Mahalanobis distance increases. A larger parameter value results in a smoother membership function and a more gradual change in membership degree during working condition switching; a smaller parameter value results in a steeper membership function and a more sensitive response to changes in working conditions. Dividing the squared Mahalanobis distance by twice the fuzzification parameter and taking the negative value constitutes the exponential part of the Gaussian function. The negative value ensures that the result of the exponential operation is between zero and one. When the Mahalanobis distance is zero, the exponential term takes the maximum value of one, indicating a perfect match for the working condition. As the Mahalanobis distance increases, the exponential term gradually decays towards zero, indicating a decrease in similarity to the working condition. The exponential operation uses a natural exponential function, converting a linear distance metric into a non-linear similarity metric. This non-linear mapping conforms to the human cognitive pattern of similarity, namely, that similarity decays exponentially rather than non-linearly with increasing distance.
[0055] The sum of the exponents for all operating condition categories is used as a normalization factor to ensure that the sum of the membership degrees of all operating condition categories equals one, satisfying the normalization condition in probability theory. The membership degree of the i-th operating condition category is obtained by dividing the exponent of the i-th operating condition category by the sum of the exponents. The membership degree ranges from zero to one; the closer the value is to one, the more similar the current electrical control system's operating state is to that typical operating condition; the closer the value is to zero, the lower the similarity. This Gaussian function-based membership degree calculation method is smooth; when the vehicle transitions from one operating condition to another, the membership degrees of each operating condition category change continuously rather than abruptly, avoiding the boundary jump problem during operating condition switching in hard classification methods.
[0056] Membership quantifies the matching degree between the electrical control system and various typical operating conditions. This quantification result is directly used for the subsequent weighted fusion of observer gain matrices. The higher the membership degree of the operating condition category, the greater the weight of its corresponding gain matrix during the fusion process, thus making the final adaptive gain matrix closer to the optimal gain configuration of the current actual operating condition. For example, when the vehicle is in a transitional state between rapid acceleration and hill climbing, the membership degree of the rapid acceleration condition is 0.6, the membership degree of the hill climbing condition is 0.3, and the sum of the membership degrees of other operating conditions is 0.1. The adaptive gain matrix will be mainly composed of the gain matrices of the rapid acceleration and hill climbing conditions weighted at a ratio of 6:3. Compared with the hard classification method, the soft switching mechanism can smoothly adapt to changes in operating conditions, avoid oscillations in the slow-timescale observer state estimation caused by abrupt changes in the gain matrix, and solve the problem of increased estimation error and false alarm rate caused by gain mismatch during operating condition switching in traditional fixed-gain observers.
[0057] Figure 3 This is a schematic diagram illustrating the dynamic changes in the membership degree of each working condition category calculated based on the Gaussian membership function in the embodiments of this application. Figure 3 The diagram shows the changes in membership degrees for rapid acceleration and constant-speed cruising, calculated using a Gaussian membership function, over time during the transition between operating conditions for a new energy vehicle. From 0 to 10 seconds, the vehicle is in constant-speed cruising mode, with the membership degree remaining between 0.75 and 0.8, while the membership degree for rapid acceleration remains between 0.15 and 0.2. The sum of the two is approximately 1, meeting the membership degree normalization condition. From 10 to 25 seconds, the vehicle gradually transitions from constant-speed cruising to rapid acceleration. The membership degree for rapid acceleration smoothly increases from approximately 0.15 to approximately 0.85, while the membership degree for constant-speed cruising smoothly decreases from approximately 0.75 to approximately 0.12. The two curves intersect near 0.5 at approximately 17 seconds, indicating the midpoint of the operating condition transition. After 25 seconds, the vehicle stably entered the rapid acceleration mode, where the membership degree stabilized between 0.85 and 0.9, while the membership degree stabilized around 0.12 during constant speed cruising. This figure visually demonstrates that after the Gaussian membership function converts the Mahalanobis distance into probabilistic membership, the membership degree exhibits a continuous and smooth change rather than abrupt changes during mode transitions. This avoids the boundary jump problem of hard classification methods and provides smooth weight coefficients for subsequent weighted fusion of the observer gain matrix, achieving dynamic optimization of the adaptive gain matrix according to the characteristics of the driving conditions.
[0058] In one specific embodiment, step S3 involves using membership degrees as weighting coefficients to perform a weighted summation of the observer gain matrices corresponding to each working condition category to obtain an adaptive gain matrix, including:
[0059] Perform a scalar multiplication operation between the membership degree of the i-th working condition category and the observer gain matrix corresponding to the i-th working condition category to obtain the i-th weighted gain matrix;
[0060] Matrix addition is performed on the weighted gain matrices for all operating conditions to obtain an adaptive gain matrix, which is used to adjust the observation weights of the slow-timescale observer on the health parameters of electrical components.
[0061] Specifically, the observer gain matrix is calibrated individually for each operating condition category during the offline phase. The calibration process involves injecting measured data for that operating condition into the simulation environment as stimulation, with the weighted root mean square value of the observation error as the optimization objective. A particle swarm optimization algorithm is used to search for the optimal gain matrix parameters for that operating condition. The gain matrix parameters differ significantly across different operating condition categories. For example, under rapid acceleration, the battery internal resistance has a greater impact on the terminal voltage, therefore the gain element corresponding to the battery internal resistance in the gain matrix for this condition has a larger value. Conversely, under constant speed cruising, the current is smaller, and the impact of internal resistance is relatively weaker, resulting in smaller gain element values. Matrix multiplication multiplies the membership scalar with each element of the gain matrix. The resulting weighted gain matrix maintains the structure of the original gain matrix, but all elements are scaled according to the membership degree. Operating conditions with higher membership degrees have larger elements in the weighted gain matrix, contributing more significantly to the final fusion result.
[0062] Matrix addition adds the corresponding elements of the weighted gain matrices for all operating conditions one by one. Since the sum of all membership degrees equals one, the resulting adaptive gain matrix is a convex combination of the optimal gain matrices for each operating condition. Mathematically, this matrix is guaranteed to lie within the convex space spanned by the optimal gain matrices for each operating condition. The adaptive gain matrix dynamically adjusts according to the characteristics of the current operating condition. When the vehicle switches from a constant speed condition to a rapid acceleration condition, the membership degree for the rapid acceleration condition gradually increases, while the membership degree for the constant speed condition gradually decreases. The adaptive gain matrix smoothly transitions to the optimal gain configuration for the rapid acceleration condition. This continuous change avoids abrupt changes in the observer state estimation caused by sudden changes in the gain matrix.
[0063] An adaptive gain matrix is used to adjust the observation weights of slow-timescale observers for electrical component health parameters. The gain element for the battery internal resistance parameter in the gain matrix determines the extent to which the observer corrects the internal resistance estimate based on the terminal voltage residual. A larger gain element value indicates a faster tracking response to this parameter but weaker noise immunity; a smaller gain element value indicates a slower tracking response but smoother estimation results. The adaptive gain matrix automatically balances this trade-off based on operating conditions. Under high-current conditions, it increases the internal resistance observation gain to quickly capture internal resistance changes; under low-current conditions, it decreases the internal resistance observation gain to suppress measurement noise interference. This achieves dynamic optimization of the accuracy and robustness of health parameter estimation under different operating conditions, resolving the contradiction that traditional fixed-gain observers cannot simultaneously handle multiple operating conditions.
[0064] In one specific embodiment, step S2, establishing a fast timescale state observer, includes:
[0065] The fast state vector is defined to include the battery pack terminal voltage, the total battery pack current, the direct-axis component of the motor current, and the quadrature-axis component of the motor current.
[0066] Based on the battery equivalent circuit model and the motor dq axis mathematical model, establish the state transition matrix and control input matrix of the fast state vector, and construct the discrete state equation of the fast time-scale state observer.
[0067] A measurement matrix is established based on the voltage control signal and the current control signal, and the measurement equations of the fast timescale state observer are constructed.
[0068] The observer gain matrix is designed using the pole placement method, and an update equation for the fast state vector estimate is established to track the real-time operating state of the electrical control system.
[0069] Specifically, the fast state vector contains four state variables, all of which are key electrical quantities that directly affect the control performance of the electrical control system. The battery pack terminal voltage reflects the battery output capacity, the total battery pack current reflects the energy flow intensity, the direct-axis component of the motor current controls the magnetic field strength, and the quadrature-axis component of the motor current generates electromagnetic torque. These four variables constitute the core state space of the electrical control of the new energy vehicle power system. The state transition matrix describes the dynamic evolution of these state variables within a control cycle. The battery equivalent circuit model uses a first-order RC model to express the battery terminal voltage as the open-circuit voltage minus the ohmic internal resistance voltage drop and then minus the polarization internal resistance voltage drop. The motor dq-axis mathematical model expresses the stator voltage equation in a rotating coordinate system as the algebraic sum of the resistance voltage drop, the inductance voltage drop, and the back electromotive force. By linearizing these continuous-time differential equations near the operating point and discretizing them using the Euler method or the zero-order hold method, the state transition matrix of the discrete state equation is obtained. The matrix elements contain electrical parameters such as battery internal resistance, battery polarization resistance, and inductance, as well as the functional relationship of the sampling period. The control input matrix describes the driving effect of the d-axis voltage command and q-axis voltage command output by the motor controller on the state variables. This matrix associates the control input with the rate of change of the state variables, forming a complete discrete state equation.
[0070] The measurement matrix establishes a mapping between state variables and sensor measurements. Since the battery pack terminal voltage and total battery pack current can be directly measured, the rows corresponding to these two state variables in the measurement matrix are in identity matrix form. However, the dq-axis components of the motor current cannot be directly measured and need to be calculated from the three-phase currents using the Clarke-Park transformation. The measurement equation maps the state vector to a measured value vector through the measurement matrix. A measurement noise term is introduced into the measurement equation to represent the random error of the sensor. This noise term is assumed to be zero-mean Gaussian white noise, and its covariance matrix is obtained by offline statistical analysis of the fluctuation characteristics of sensor data. The measurement equation for the fast timescale state observer is a linear equation, allowing the observer to be implemented using the computationally efficient Luenberger observer framework.
[0071] The pole placement method designs the gain matrix by selecting the location of the observer's eigenvalues. The observer eigenvalues determine the convergence speed and dynamic response characteristics of the observation error. Smaller eigenvalue magnitudes result in faster convergence but greater sensitivity to measurement noise, while larger eigenvalue magnitudes lead to slower convergence but stronger robustness. In pole placement, the observer eigenvalues are placed within the unit circle with magnitudes smaller than the eigenvalues of the state transition matrix. This ensures that the observer convergence speed is faster than the system's dynamic change speed, while avoiding excessively small eigenvalues that could amplify noise. The update equation for the fast state vector estimate uses a predictive correction structure. First, the predicted state is calculated based on the state transition matrix and control input. Then, the predicted state is corrected using the gain matrix based on the residual between the measured value and the predicted measured value to obtain the final estimate. This update equation is executed once per control cycle, tracking the real-time changes in the electrical control system's state variables and providing accurate state feedback to the controller. Simultaneously, observation residuals are generated for sudden fault detection. When the observation residual exceeds a threshold, it indicates that the actual measured value deviates from the model's predicted value, suggesting an abnormality in the electrical component.
[0072] In one specific embodiment, step S4 involves performing trend analysis on the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop to determine electrical component performance degradation faults, including:
[0073] Establish a sliding time window to store historical sequences of estimated battery internal resistance parameters, estimated motor winding resistance parameters, and estimated power device on-state voltage drop parameters;
[0074] We fit the historical sequence with weighted least squares linear regression, and by constructing the design matrix and measurement vector, we solve for the regression coefficient vector and extract the degradation slope that characterizes the performance degradation rate of electrical components.
[0075] Calculate the normalized distances between the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop and the preset healthy boundary.
[0076] Determine whether the absolute value of the degradation slope exceeds the degradation rate threshold and whether the normalized distance is less than the safety margin. When both conditions are met, trigger the gradual fault warning flag for the performance degradation of electrical components.
[0077] Specifically, the sliding time window stores the health parameter estimates output by the slow-timescale observer in a first-in-first-out queue structure. The window length is set to a fixed number of observation periods. Whenever the slow observer completes a state update, the latest health parameter estimate enters the window, and the earliest estimate is removed. A fixed number of historical data points are always maintained within the window. The historical sequence records the evolution trajectory of battery internal resistance parameters, motor winding resistance parameters, and power device on-state voltage drop parameters over a period of time. These parameters show a slow upward or downward trend due to the aging and performance degradation of electrical components. By analyzing the changing trends of the historical sequence, it is possible to identify whether electrical components are in a stage of accelerated performance degradation.
[0078] Weighted least squares linear regression approximates the historical sequence as a linear function. The slope of the linear function reflects the rate of parameter change over time, i.e., the degradation rate. The first column of the design matrix, all 1s, corresponds to the intercept term of the linear function. The second column, with time indices, corresponds to the slope term. Each row of the design matrix is multiplied by a weight coefficient corresponding to the time point. Increasing weight coefficients over time ensure that recent data has a greater impact on the regression results than longer-term data, improving the sensitivity of trend analysis to parameter changes. The measurement vector consists of a sequence of estimated health parameters within the window, with each estimate multiplied by its corresponding weight coefficient. The regression coefficient vector is solved using the normal equation. The normal equation multiplies the transpose of the design matrix by the design matrix to obtain the coefficient matrix. Multiplying the transpose of the design matrix by the measurement vector yields the constant vector. The inverse of the coefficient matrix is then multiplied by the constant vector to obtain the regression coefficient vector. The second element of the regression coefficient vector is the degradation slope. A positive degradation slope indicates that health parameters increase over time, such as an increase in battery internal resistance. A negative degradation slope indicates that health parameters decrease over time, such as a decrease in the on-state voltage drop of power devices. The larger the absolute value of the slope, the faster the performance degradation.
[0079] The preset health boundaries are determined based on the design life and safety margin of electrical components. The upper limit of the health boundary for battery internal resistance is a certain multiple of the factory nominal value. The upper limit of the health boundary for motor winding resistance is set based on insulation class and temperature rise limits. The health boundary for power device on-state voltage drop is set according to the maximum rated value in the chip datasheet. The normalized distance calculates the difference between the current estimated health parameter value and the health boundary, and then divides it by the normal variation range of the health parameter to make the distances of health parameters with different dimensions comparable. The normalized distance value is between 0 and 1, and the smaller the value, the closer the health parameter is to the boundary and enter the risk zone.
[0080] The degradation rate threshold is set as the typical rate of change of health parameters during normal aging. When the absolute value of the degradation slope exceeds this threshold, it indicates that the electrical component is undergoing abnormal accelerated degradation rather than normal slow aging. The safety margin is set as the critical value of the normalized distance. When the normalized distance is less than this margin, it indicates that the health parameter has entered the warning range near the health boundary. The dual-condition criterion requires that both the degradation slope exceeding the threshold and the normalized distance being less than the margin be met simultaneously. This design avoids the limitations of a single-condition criterion. It does not trigger a warning if the degradation rate is fast but the parameter value has not yet approached the boundary, thus avoiding premature alarms. It also does not trigger a warning if the parameter value is close to the boundary but the degradation rate is slow, thus avoiding misjudging normal aging. Only when the electrical component is both in an accelerated degradation state and about to exceed the health boundary is the gradual fault warning sign triggered. This achieves accurate early identification of gradual faults such as battery aging, motor winding degradation, and power device performance degradation, providing vehicle operators with a predictive maintenance time window.
[0081] The above describes the real-time fault detection method for new energy vehicles in the embodiments of this application. The following describes the real-time fault detection system for new energy vehicles in the embodiments of this application. One embodiment of the real-time fault detection system for new energy vehicles in the embodiments of this application includes:
[0082] The acquisition module is used to acquire the voltage control signal and current control signal of the battery management system and the three-phase current control signal of the motor control system, and calculate the operating condition feature vector based on the voltage control signal, current control signal and control command;
[0083] The generation module is used to establish a fast time-scale state observer based on the voltage control signal and the current control signal, and to establish a slow time-scale observer based on the voltage control signal and the current control signal, taking the battery internal resistance parameter, the motor winding resistance parameter, and the power device on-state voltage drop parameter as extended states.
[0084] The calculation module is used to calculate the Mahalanobis distance between the operating condition feature vector and each preset operating condition cluster center, substitute the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each operating condition category, use the membership degree as a weight coefficient to perform weighted summation on the observer gain matrix corresponding to each operating condition category to obtain the adaptive gain matrix, and use the adaptive gain matrix to perform state correction on the slow time scale observer to obtain the estimated values of battery internal resistance parameters, motor winding resistance parameters, and power device on-state voltage drop parameters.
[0085] The determination module is used to determine sudden faults of electrical components by using the observation residuals of the fast timescale state observer, and to perform trend analysis on the estimated values of the battery internal resistance parameter, the estimated values of the motor winding resistance parameter, and the estimated values of the power device conduction voltage drop parameter to determine the performance degradation faults of electrical components, and generate fault detection results.
[0086] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the real-time fault detection method for new energy vehicles.
[0087] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0088] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a real-time fault detection device for new energy vehicles (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0089] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A real-time fault detection method for new energy vehicles, characterized in that, The method includes: Step S1: Collect the voltage control signal and current control signal of the battery management system and the three-phase current control signal of the motor control system, and calculate the operating condition feature vector based on the voltage control signal, current control signal and the three-phase current control signal of the motor control system. Step S2: Establish a fast time-scale state observer based on the voltage control signal and current control signal, including: defining a fast state vector containing battery pack terminal voltage, battery pack total current, motor current direct-axis component, and motor current quadrature-axis component; establishing the state transition matrix and control input matrix of the fast state vector based on the battery equivalent circuit model and the motor dq-axis mathematical model, and constructing the discrete state equation of the fast time-scale state observer; establishing a measurement matrix based on the voltage control signal and current control signal, and constructing the measurement equation of the fast time-scale state observer; designing the observer gain matrix using the pole placement method, and establishing the update equation of the fast state vector estimate for tracking the real-time operating state of the electrical control system; Based on the voltage control signal and current control signal, a slow-timescale observer is established that uses the battery internal resistance parameter, motor winding resistance parameter, and power device on-state voltage drop parameter as extended states. Step S3: Calculate the Mahalanobis distance between the operating condition feature vector and each preset operating condition cluster center. Substitute the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each operating condition category. Use the membership degree as a weighting coefficient to perform weighted summation on the observer gain matrix corresponding to each operating condition category to obtain the adaptive gain matrix. Use the adaptive gain matrix to perform state correction on the slow time scale observer to obtain the estimated values of battery internal resistance parameters, motor winding resistance parameters, and power device on-state voltage drop parameters. Step S4: Utilize the observation residuals of the fast timescale state observer to determine sudden faults in electrical components. Perform trend analysis on the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop to determine performance degradation faults in electrical components, generating fault detection results. This includes: establishing a sliding time window to store historical sequences of the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop; performing weighted least squares linear regression fitting on the historical sequences, solving for the regression coefficient vector by constructing a design matrix and measurement vector, and extracting the degradation slope characterizing the performance degradation rate of the electrical components; calculating the normalized distance between the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop and a preset health boundary; determining whether the absolute value of the degradation slope exceeds a degradation rate threshold and whether the normalized distance is less than a safety margin. When both conditions are met simultaneously, trigger a gradual fault warning flag for the performance degradation of the electrical components.
2. The real-time fault detection method for new energy vehicles according to claim 1, characterized in that, Step S1 includes: The total current of the battery pack is collected by a current sensor, and the terminal voltage of the battery pack is collected by a voltage sensor to obtain current control signals and voltage control signals. The three-phase stator current of the motor is collected by a three-phase current sensor to obtain the three-phase current control signal; Read the real-time vehicle speed, calculate the battery power as the product of the battery pack terminal voltage and the total battery pack current, calculate the vehicle acceleration as the difference between the current vehicle speed and the vehicle speed at the previous moment divided by the control cycle, perform Clarke-Park coordinate transformation on the three-phase current control signal to obtain the quadrature axis current component, and calculate the motor torque based on the quadrature axis current component, the number of motor pole pairs and the permanent magnet flux linkage. The battery power, real-time vehicle speed, vehicle acceleration, motor torque, and state of charge are constructed into a working condition feature vector, where the state of charge reflects the remaining battery capacity.
3. The real-time fault detection method for new energy vehicles according to claim 1, characterized in that, Step S3, which calculates the Mahalanobis distance between the working condition feature vector and each preset working condition cluster center, includes: Read the preset working condition cluster centers and the covariance matrix of each cluster; calculate the difference vector between the working condition feature vector and the i-th working condition cluster center; The difference vector is multiplied by the inverse of the covariance matrix of the i-th cluster, and then multiplied by the transpose of the difference vector. The square root of the result is then taken to obtain the Mahalanobis distance between the operating condition feature vector and the center of the i-th operating condition cluster, which is used to identify the current operating condition of the electrical control system.
4. The real-time fault detection method for new energy vehicles according to claim 3, characterized in that, In step S3, the Mahalanobis distance is substituted into the Gaussian membership function to calculate the membership degree of each working condition category, including: The Mahalanobis distance is squared to obtain the squared Mahalanobis distance value. The squared Mahalanobis distance value is divided by twice the fuzzification parameter. The result is negative and then exponentially calculated to obtain the exponential term of the i-th working condition category. The index terms of all operating condition categories are summed to obtain the total index term; the index term of the i-th operating condition category is divided by the total index term to obtain the membership degree of the i-th operating condition category, which is used to quantify the matching degree between the electrical control system and each typical operating condition.
5. The real-time fault detection method for new energy vehicles according to claim 4, characterized in that, In step S3, the membership degree is used as a weighting coefficient to perform a weighted summation of the observer gain matrices corresponding to each working condition category to obtain the adaptive gain matrix, including: Perform a scalar multiplication operation between the membership degree of the i-th working condition category and the observer gain matrix corresponding to the i-th working condition category to obtain the i-th weighted gain matrix; The adaptive gain matrix is obtained by performing matrix addition on the weighted gain matrices of all operating condition categories, and is used to adjust the observation weights of the slow timescale observer on the health parameters of electrical components.
6. A real-time fault detection system for new energy vehicles, characterized in that, For implementing the real-time fault detection method for new energy vehicles as described in any one of claims 1 to 5, the real-time fault detection system for new energy vehicles comprises: The acquisition module is used to acquire the voltage control signal and current control signal of the battery management system and the three-phase current control signal of the motor control system, and calculate the operating condition feature vector based on the voltage control signal, current control signal and the three-phase current control signal of the motor control system. The generation module is used to establish a fast-timescale state observer based on the voltage control signal and the current control signal. This includes: defining a fast state vector containing the battery pack terminal voltage, total battery pack current, direct-axis component of the motor current, and quadrature-axis component of the motor current; establishing the state transition matrix and control input matrix of the fast state vector based on the battery equivalent circuit model and the motor dq-axis mathematical model, and constructing the discrete state equation of the fast-timescale state observer; establishing a measurement matrix based on the voltage control signal and the current control signal, and constructing the measurement equation of the fast-timescale state observer; and designing the observer gain matrix using the pole placement method, and establishing the update equation for the estimated value of the fast state vector, used to track the real-time operating state of the electrical control system. Based on the voltage control signal and current control signal, a slow-timescale observer is established that uses the battery internal resistance parameter, motor winding resistance parameter, and power device on-state voltage drop parameter as extended states. The calculation module is used to calculate the Mahalanobis distance between the operating condition feature vector and each preset operating condition cluster center, substitute the Mahalanobis distance into the Gaussian membership function to calculate the membership degree of each operating condition category, use the membership degree as a weight coefficient to perform weighted summation on the observer gain matrix corresponding to each operating condition category to obtain the adaptive gain matrix, and use the adaptive gain matrix to perform state correction on the slow time scale observer to obtain the estimated values of battery internal resistance parameters, motor winding resistance parameters, and power device on-state voltage drop parameters. The judgment module is used to determine sudden faults of electrical components using the observation residuals of the fast timescale state observer. It performs trend analysis on the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop to determine performance degradation faults of the electrical components, generating fault detection results. This includes: establishing a sliding time window to store historical sequences of the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop; performing weighted least squares linear regression fitting on the historical sequences, solving for the regression coefficient vector by constructing a design matrix and measurement vector, and extracting the degradation slope characterizing the performance degradation rate of the electrical components; calculating the normalized distance between the estimated values of battery internal resistance, motor winding resistance, and power device on-state voltage drop and a preset health boundary; determining whether the absolute value of the degradation slope exceeds a degradation rate threshold and whether the normalized distance is less than a safety margin; and triggering a gradual fault warning flag for the performance degradation of the electrical components when both conditions are met simultaneously.
7. A real-time fault detection device for new energy vehicles, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the real-time fault detection method for new energy vehicles as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to execute the real-time fault detection method for new energy vehicles as described in any one of claims 1 to 5.