Method and device for testing wire harness voltage of new energy automobile
By collecting and analyzing the voltage data of the wire harness of new energy vehicles, combining KNN clustering analysis and fault prediction model, timely detection of hidden faults of the wire harness is achieved, solving the problem of incomplete fault monitoring in the existing technology, and improving the accuracy of fault monitoring.
Patent Information
- Application Number
- CN202510124635.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to detect and feedback potential faults in new energy vehicle wiring harnesses in a timely manner, resulting in incomplete fault monitoring.
By collecting the interference-free harness voltage and actual harness voltage, fluctuation calculations are performed to obtain voltage fluctuation parameters; using KNN clustering analysis to cluster the harness voltage data; combining the pre-trained fault prediction model, the prediction error and voltage change rate are calculated. When the prediction error is greater than the voltage fluctuation parameter and the voltage change rate is greater than the voltage fluctuation parameter, it is determined that the harness has a fault.
Accurate and timely detection of hidden faults of wire harnesses in new energy vehicles is achieved, the accuracy of wire harness fault monitoring is improved, and the problem of insufficient identification of hidden faults based on the monitoring methods based on resistance and voltage values in the prior art is compensated.
Smart Images

Figure CN119556197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy vehicles, and in particular to a method and device for testing the voltage of a wiring harness of a new energy vehicle. Background Art
[0002] At present, the wiring harness of new energy vehicles is an important bridge connecting the battery, motor control unit and various wiring harnesses. Its operating status is directly related to the safety of the entire vehicle. In order to ensure the safe operation of new energy vehicles, fault monitoring and diagnosis of wiring harnesses has become an important direction of current research. Existing wiring harness monitoring technologies are mainly divided into two methods: active monitoring and passive monitoring. Active monitoring uses sensors for real-time detection and fault diagnosis, while passive monitoring relies on changes in resistance, voltage and current values to evaluate the wiring harness status.
[0003] In one prior art, a fault is determined by detecting changes in the resistance value of the wiring harness. When the conductivity of the current transmitted inside the wiring harness is affected, the resistance value will change accordingly. This technical method collects the resistance value, calculates and compares the deviation between the normal voltage value and the fault voltage value, and thus determines whether the wiring harness has a short circuit or open circuit fault. If the resistance value exceeds the preset threshold range, it is determined to be a fault. This monitoring method based on resistance and voltage values has a high detection capability for obvious wiring harness short circuit and open circuit problems.
[0004] The existing technology is unable to detect and feedback such potential faults in a timely manner, resulting in incomplete fault monitoring. Summary of the invention
[0005] The present invention provides a method and device for testing the voltage of a wiring harness of a new energy vehicle, so as to accurately and timely detect the problem of hidden faults in the wiring harness of the new energy vehicle and improve the accuracy of wiring harness fault monitoring.
[0006] In the first aspect, in order to solve the above technical problems, the present invention provides a method for testing the voltage of a wiring harness of a new energy vehicle, comprising: Collect interference-free harness voltage and harness voltage; Performing fluctuation calculation based on the non-interference harness voltage and the harness voltage to obtain a voltage fluctuation parameter; Performing KNN cluster analysis on the harness voltage to obtain cluster analysis data; Inputting the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate; When the prediction error is greater than the voltage fluctuation parameter, and the voltage change rate is greater than the voltage fluctuation parameter, it is determined that a wiring harness failure occurs.
[0007] Preferably, performing fluctuation calculation according to the interference-free harness voltage and the harness voltage to obtain voltage fluctuation parameters includes: Performing a matrix construction operation according to the non-interference beam voltage and the beam voltage to obtain an adjacency matrix and a degree matrix; Performing matrix difference calculation on the degree matrix and the adjacency matrix to obtain a Laplace matrix; According to the Laplace matrix, performing eigenvalue and eigenvector decomposition operations to obtain eigenvalues and eigenvectors; Calculating fluctuation parameters according to the eigenvalue and the eigenvector to obtain voltage fluctuation parameters; Among them, the voltage fluctuation parameter is calculated according to the following formula: In the formula, is the voltage fluctuation parameter; is the maximum eigenvalue; is the minimum eigenvalue; For the eigenvalues; For the The characteristic vector of the voltage sampling points; For the The characteristic vector of the voltage sampling points.
[0008] Preferably, performing KNN cluster analysis on the harness voltage to obtain cluster analysis data includes: Performing data set construction and division operations on the wiring harness voltage to obtain training data and test data; Based on a preset number of neighbors, KNN cluster analysis is performed on the training data and the test data to obtain cluster analysis data.
[0009] Preferably, the data set construction and division operation is performed on the wiring harness voltage to obtain training data and test data, including: Sampling the wiring harness voltages in time sequence, extracting parameters of each set of wiring harness voltages, and obtaining wiring harness parameters; The harness parameters are standardized and divided into training data and test data in proportion, wherein the training data is used for model training and the test data is used for model verification.
[0010] Preferably, the performing KNN cluster analysis on the training data and the test data based on a preset number of neighbors to obtain cluster analysis data includes: Calculate the distance between each data point in the training data and the test data to obtain the Euclidean distance; Based on a preset number of neighbors, select the nearest neighbor point of each data point according to the Euclidean distance; A cluster classification voting operation is performed on the training data and the test data to obtain cluster analysis data corresponding to the nearest neighboring points.
[0011] Preferably, the training process of the fault prediction model includes: Obtain historical voltage fluctuation coefficient, historical interference-free harness voltage and historical harness voltage; Based on the spectral graph theory method, the historical non-interference harness voltage and the historical harness voltage are subjected to convolution discrete Fourier transform to obtain a non-interference characteristic spectrum and a voltage characteristic spectrum; Performing a function construction operation according to the non-interference characteristic spectrum, the voltage characteristic spectrum and the historical voltage fluctuation coefficient to obtain a voltage fluctuation function; An initial fault prediction model is constructed according to the voltage fluctuation function, and the initial fault prediction model is trained based on the cluster analysis data as input data to obtain a trained signal screening model.
[0012] Preferably, the step of constructing an initial fault prediction model according to the voltage fluctuation function, and training the initial fault prediction model based on the cluster analysis data as input data to obtain a trained signal screening model comprises: Initializing cluster analysis data in the signal screening model; Calculating a prediction error between the cluster analysis data and preset analysis data according to the voltage fluctuation function; Calculating adjacent slope changes of the cluster analysis data; When the voltage fluctuation function converges to a preset threshold or the number of training times reaches a preset training threshold, the training is determined to be completed, and a trained signal screening model is obtained.
[0013] In a second aspect, the present invention provides a device for testing the voltage of a wiring harness of a new energy vehicle, comprising: Voltage acquisition module, used to collect interference-free harness voltage and harness voltage; A parameter calculation module, used for performing fluctuation calculation according to the non-interference harness voltage and the harness voltage to obtain a voltage fluctuation parameter; A cluster analysis module, used for performing KNN cluster analysis on the harness voltage to obtain cluster analysis data; A model training module, used for inputting the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate; The fault determination module is used to determine that a fault occurs in the wiring harness when the prediction error is greater than the voltage fluctuation parameter and the voltage change rate is greater than the voltage fluctuation parameter.
[0014] In a third aspect, the present invention further provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned methods for testing the wiring harness voltage of a new energy vehicle when executing the computer program.
[0015] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for testing the wiring harness voltage of a new energy vehicle.
[0016] The present invention discloses a method for testing the wiring harness voltage of a new energy vehicle. The voltage fluctuation parameter is obtained by collecting the interference-free wiring harness voltage and the actual wiring harness voltage, performing fluctuation calculation. The wiring harness voltage data is clustered by using KNN cluster analysis, and the prediction error and voltage change rate are calculated in combination with a pre-trained fault prediction model. When the prediction error is greater than the voltage fluctuation parameter, and the voltage change rate is greater than the wiring harness voltage fluctuation parameter, the wiring harness fault can be effectively determined.
[0017] Specifically, the present invention performs matrix construction operations on the undisturbed harness voltage and the actual harness voltage to obtain the adjacency matrix and degree matrix, and uses the spectral graph theory method to calculate the Laplace matrix, and further calculates the voltage fluctuation parameters by decomposing the eigenvalues and eigenvectors. This method can quantitatively analyze the voltage fluctuation characteristics and is suitable for detecting hidden faults such as harness aging and looseness, making up for the problem that the monitoring method based on resistance value and voltage value in the prior art is insufficient in identifying hidden faults.
[0018] In addition, the present invention extracts features from harness voltage data through the KNN cluster analysis method, specifically including constructing and dividing a data set for harness voltage data to obtain training data and test data; based on a preset number of neighbors, calculating the Euclidean distance between data points and selecting the nearest neighbor point, performing cluster classification operations, and obtaining cluster analysis data. This step can extract the dynamic features of harness voltage, help identify hidden harness faults, and improve the accuracy of harness fault monitoring.
[0019] Furthermore, the present invention combines the historical undisturbed harness voltage, the historical voltage fluctuation coefficient and the historical harness voltage to construct a fault prediction model, and comprehensively determines the harness fault state by calculating the prediction error and voltage change rate of the cluster analysis data. The fault prediction model is trained based on the supervised learning method, can fit the voltage fluctuation parameters, and has high robustness in monitoring dynamic voltage changes and harness conductivity changes.
[0020] In summary, the present invention can accurately and timely detect hidden faults in wiring harnesses of new energy vehicles, thereby improving the accuracy of wiring harness fault monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic flow chart of a method for testing the voltage of a wiring harness of a new energy vehicle provided by the first embodiment of the present invention; Figure 2 It is a schematic diagram of the structure of a testing device for wiring harness voltage of a new energy vehicle provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] Reference Figure 1 The first embodiment of the present invention provides a method for testing the voltage of a wiring harness of a new energy vehicle, comprising the following steps: S11, collecting the interference-free harness voltage and harness voltage; S12, performing fluctuation calculation according to the non-interference harness voltage and the harness voltage to obtain a voltage fluctuation parameter; S13, performing KNN cluster analysis on the harness voltage to obtain cluster analysis data; S14, inputting the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate; S15, when the prediction error is greater than the voltage fluctuation parameter, and the voltage change rate is greater than the voltage fluctuation parameter, it is determined that the wiring harness is faulty.
[0024] In step S11, it is necessary to collect the interference-free harness voltage and harness voltage, including: First, the voltage sensors arranged at the key nodes of the wiring harness of new energy vehicles are used to collect the voltage data of the wiring harness in real time. The wiring harness voltage data includes the non-interference wiring harness voltage and the wiring harness voltage under actual working conditions. The non-interference wiring harness voltage refers to the standard voltage value measured under constant current input conditions when the wiring harness is in a fault-free state, which is mainly used to construct the initial state quantity of the wiring harness; the wiring harness voltage refers to the dynamic voltage data actually measured during the operation of the new energy vehicle, which reflects the real-time changes of the voltage under the working state.
[0025] Secondly, to ensure the integrity and accuracy of the collected data, the sampling frequency of the sensor is set to a fixed value so that several sampling points can be obtained per second to form a continuous voltage change curve. The interference-free harness voltage and harness voltage are recorded in time series for subsequent calculations. During the collection process, for the sampling points of the interference-free harness voltage and harness voltage, the stability and anti-interference of the data must be guaranteed to avoid data deviations caused by external environmental factors or sensor accuracy.
[0026] Then, the collected interference-free harness voltage and harness voltage data are normalized to remove abnormal data points. The normalized interference-free harness voltage is used as the initial state quantity for subsequent fluctuation calculation and feature extraction; the harness voltage data is used as dynamic data input for subsequent voltage change rate analysis and fault prediction model training. The normalization method includes standard deviation normalization or minimum-maximum value normalization of the voltage value to eliminate the influence of different working conditions on the voltage amplitude and ensure the reliability of the calculation results. The embodiments of the present invention are not limited to this.
[0027] Through the above steps, the interference-free harness voltage and harness voltage can be accurately collected, providing reliable basic data for fluctuation calculation, feature extraction and fault prediction in subsequent steps.
[0028] In step S12, it is necessary to perform fluctuation calculation based on the interference-free harness voltage and the harness voltage to obtain voltage fluctuation parameters, including: First, according to the collected interference-free harness voltage and harness voltage data, a matrix construction operation is performed to construct the adjacency matrix A and the degree matrix D. Among them, the adjacency matrix A is a matrix used to quantify the voltage correlation between sampling points, and its elements Calculated by the following formula: in, and Respectively and The voltage value of the sampling point, is the correlation scale parameter, which is used to control the sensitivity of voltage differences. The degree matrix D is a diagonal matrix of the adjacency matrix, whose diagonal elements are Representation Node The specific calculation is: Specifically, the degree matrix represents the sum of the connection weights between a sampling point and all other sampling points, which is used to measure the global intensity of voltage fluctuations.
[0029] Next, the degree matrix D is interpolated with the adjacency matrix A to obtain the Laplace matrix L, which is calculated as follows: Specifically, the Laplacian matrix It is an important matrix in graph theory methods, which can reflect the global change pattern of the undisturbed harness voltage and harness voltage. Its elements represent the difference between the voltage change points and the overall fluctuation relationship. The calculation of the Laplace matrix provides a mathematical basis for the subsequent eigendecomposition.
[0030] Then, the Laplacian matrix Perform decomposition operations on eigenvalues and eigenvectors to calculate eigenvalues and the eigenvector Among them, the eigenvalue Describes the frequency characteristics of voltage fluctuations and reflects the intensity of voltage changes in different modes; the characteristic vector It is used to represent the distribution state of each sampling point in a specific fluctuation mode. Through the decomposition of eigenvalues and eigenvectors, the main mode of harness voltage fluctuation and its corresponding influence range can be extracted.
[0031] Furthermore, according to the calculated eigenvalues and the eigenvector , calculate the fluctuation parameters and obtain the voltage fluctuation parameters. The voltage fluctuation parameters are used to quantify the The sampling point and The parameter of the voltage fluctuation correlation between sampling points is calculated as follows: In the formula, is the voltage fluctuation parameter; is the maximum eigenvalue; is the minimum eigenvalue; For the eigenvalues; For the The characteristic vector of the voltage sampling points; For the The characteristic vector of the voltage sampling points.
[0032] Specifically, the voltage fluctuation parameters are calculated to quantify the voltage fluctuation correlation between the sampling points, which can help evaluate the stability or variation of the voltage.
[0033] Finally, the calculated voltage fluctuation parameters are used as quantitative indicators of the fluctuation characteristics of the wiring harness voltage to provide input data for the subsequent voltage change rate analysis, cluster analysis, and training of fault prediction models.
[0034] In step S13, it is necessary to perform KNN cluster analysis on the harness voltage to obtain cluster analysis data, including: First, the data set of the collected harness voltage data is constructed and divided. Specifically, the harness voltage data is sampled in chronological order and divided into multiple continuous time periods. The data points in each time period are arranged in sequence according to the time interval, and the key parameters are extracted, including harness voltage, harness current, voltage fluctuation parameter, current fluctuation parameter, harness voltage prediction value, fault advance and fault time. These parameters can describe the dynamic characteristics of the harness under different working conditions and form a parameter set with time series characteristics.
[0035] Next, the extracted harness parameter set is standardized to eliminate the dimension and amplitude differences between different parameters, ensuring the accuracy of cluster analysis and the comparability of data. The standardization processing methods include mean normalization and minimum-maximum normalization. For example, for harness voltage , the standardized processing can be expressed as: or in, and Respectively represent the minimum and maximum values of the voltage data, and Represent the mean and standard deviation of voltage data respectively. After standardized data, the values of all parameters can be distributed in the same range, effectively avoiding the excessive influence of some parameters on the clustering results due to their large value range.
[0036] After the standardization process is completed, the data set is divided into training data and test data in proportion. The training data is used to build the KNN clustering analysis model, and the test data is used to verify the effect of the model. The division ratio is preferably 8:2 or 7:3 to ensure the adequacy of the training data and the representativeness of the test data.
[0037] Then, based on the preset number of neighbors , perform KNN cluster analysis on the training data and test data. Specifically, first calculate the Euclidean distance between data points. The Euclidean distance formula is as follows: in, Represents data points and data points The distance between and Represents data points and data points No. eigenvalues, is the feature dimension. Euclidean distance is used to quantify the similarity between data points. The smaller the distance, the more similar the features of the two data points are.
[0038] Next, based on the Euclidean distance calculation result, the K nearest neighboring points of each data point are selected to form a neighbor set. For each data point, a voting operation is performed based on the classification labels in its neighbor set, and finally the classification label with the most votes is assigned to the data point to complete the classification of the data point. For example, for a data point P, if there are 3 points in its neighbor set that belong to category A and 2 points that belong to category B, then the data point P is classified as category A.
[0039] After all data points are classified, cluster analysis data is obtained. Cluster analysis data includes the classification label of each data point and the similarity measure between it and its neighbor set. The classification label reflects the cluster category of the data point, while the similarity measure can quantify the distance distribution between the data point and its neighbors.
[0040] Preferably, for the dynamic characteristics of the harness voltage, the clustering effect can be optimized by adjusting the number of neighbors K. A smaller K value (such as K=3 to K=5) can capture the local characteristics of the data points and is suitable for high-resolution dynamic change analysis; while a larger K value (such as K=10 to K=15) can enhance the stability of clustering and is suitable for global characteristic analysis.
[0041] Through the above KNN clustering analysis operation, the harness voltage data can be classified into different categories according to the characteristic distribution, revealing the pattern characteristics and dynamic trends of the voltage data. The clustering analysis data can effectively describe the change law of the harness voltage and provide accurate input data for the subsequent fault prediction model, especially when dealing with complex hidden faults (such as harness aging, looseness, etc.), which can improve the accuracy and real-time performance of fault monitoring.
[0042] In step S14, the cluster analysis data needs to be input into the pre-trained fault prediction model to obtain the prediction error and voltage change rate, including: First, the cluster analysis data obtained in step S13 is used as the input of the fault prediction model, and the cluster analysis data includes the classification label of the harness voltage, the similarity measure between adjacent data points, and the dynamic characteristic parameters of the harness voltage. The input data needs to be standardized to ensure the consistency of the parameters with the fault prediction model, so as to improve the processing efficiency and calculation accuracy of the model.
[0043] In the fault prediction model, the prediction error and voltage change rate are calculated by processing cluster analysis data. The specific implementation includes the calculation of prediction error and voltage change rate: Specifically, in the calculation of the prediction error, the wiring harness voltage classification label in the cluster analysis data is compared with the standard voltage data under normal operating conditions preset in the model. Based on the deviation between the actual voltage value and the predicted voltage value, the prediction error is calculated using the following formula: in, represents the prediction error, The fault prediction model predicts Voltage value, The actual measured Voltage value, is the total number of sampling points. The larger the prediction error, the greater the degree to which the actual voltage deviates from the normal state and the greater the possibility of failure. By calculating the prediction error of each data point, the difference between the cluster analysis data and the model expectation can be quantified.
[0044] Specifically, in the calculation of the voltage change rate, the adjacent voltage sampling points in the input cluster analysis data are processed to extract the voltage change rate between adjacent points. The calculation formula is: in, Indicates The sampling point and The voltage change rate between sampling points, and are the voltage values of adjacent sampling points, and are sampling time points respectively. By calculating the voltage change rate between consecutive sampling points, the fluctuation trend of the harness voltage can be reflected and the abnormal characteristics in the dynamic change of voltage can be captured. The voltage change rate is an important indicator used by the model to determine whether the voltage fluctuation exceeds the normal range.
[0045] Preferably, the training process of the fault prediction model includes: First, it is necessary to prepare historical data, that is, to obtain the historical voltage fluctuation coefficient, the historical interference-free harness voltage and the historical harness voltage. The historical interference-free harness voltage refers to the voltage reference value of the harness in a fault-free state, and the historical harness voltage refers to the dynamic voltage value measured in the actual operating state. These historical data serve as the basis for model training and can reflect the characteristics of the harness in normal and abnormal states.
[0046] Next, based on the spectral graph theory method, the historical non-interference harness voltage and the historical harness voltage are convoluted and discrete Fourier transformed to extract the non-interference characteristic spectrum and voltage characteristic spectrum. The non-interference characteristic spectrum represents the ideal spectrum distribution of the harness voltage, and the voltage characteristic spectrum represents the actual spectrum distribution, which provides a basis for constructing the voltage fluctuation function. In the specific implementation, the voltage signal is discretely transformed using the following formula: in, For the frequency components, For the The voltage value of the sampling point, is the total number of sampling points.
[0047] Next, based on the extracted non-interference characteristic spectrum, voltage characteristic spectrum and historical voltage fluctuation coefficient, a voltage fluctuation function is constructed to describe the dynamic change characteristics of the harness voltage. The expression of the voltage fluctuation function is: in, is the voltage fluctuation function, and are eigenvalues and eigenvectors respectively, is the noise term. Through this function, the fluctuation of the wiring harness voltage can be mathematically modeled.
[0048] In a specific embodiment, the fault prediction model is initialized according to the voltage fluctuation function. The cluster analysis data is used as input, the prediction error and voltage change rate of each group of data points are calculated, and compared with the data under the preset normal state, and the model parameters are gradually adjusted. Through iterative optimization, the following objective function is minimized: in, is a loss function used to measure the accuracy of the model prediction results. The training process continues until the loss function converges to the preset threshold or the training round reaches the maximum limit, and the trained fault prediction model is output.
[0049] Specifically, during the model training process, when the prediction error of the voltage fluctuation function converges to the set threshold, or the training round reaches the preset value, the model training is determined to be completed, and the final trained signal screening model is output. This model can be used to process cluster analysis data in real time, calculate the prediction error and voltage change rate, and provide a basis for subsequent fault judgment.
[0050] It should be noted that the preset prediction error threshold is used to measure the accuracy of the model output to ensure that the fault prediction model is robust and reliable in practical applications. Specifically, the setting of the prediction error threshold needs to be combined with historical data and experimental verification results. First, based on the historical harness voltage and cluster analysis data under fault-free conditions, the average error range under normal operating conditions is calculated. For example, by performing error statistics on multiple sets of harness data, the mean value is obtained. and standard deviation The preset prediction error threshold can be taken as , to cover 99.7% of the normal operation data range. Secondly, according to the model performance evaluation in the experiment, the prediction error threshold is adjusted to meet the needs of the application scenario. For example, for sensitive scenarios (such as critical wiring harnesses in high-speed operation), the threshold can be appropriately lowered to improve the sensitivity of fault prediction; for ordinary scenarios (such as low-speed or non-critical wiring harnesses), the threshold can be appropriately relaxed to reduce the false alarm rate.
[0051] It should be noted that the preset number of training times is used to limit the training process of the fault prediction model to prevent over-training from causing overfitting of the model. Specifically, the setting of the number of training times depends on the scale of training data, model complexity, and the convergence speed of the training algorithm. First, according to the number of samples in the training data, and feature dimensions , determine the minimum number of training times required for the model to converge in theory . The estimation formula is: in, Indicates the training step length. Secondly, through experimental evaluation, observe the downward trend of the model loss function during training. When the change in the training loss function (such as the difference between two adjacent iterations) is less than the set convergence threshold (like ), it can be judged that the model has basically converged. At this time, record the actual number of training times , and 1.5 times of is used as the upper limit of the preset training times to ensure that the model has sufficient learning ability and avoid unnecessary iterative calculations.
[0052] In step S15, when the prediction error is greater than the voltage fluctuation parameter and the voltage change rate is greater than the voltage fluctuation parameter, it is determined that the wiring harness is faulty, including: First, the prediction error obtained in step S14 is compared with the voltage fluctuation parameter. The voltage fluctuation parameter is a fluctuation index calculated based on the undisturbed harness voltage and the harness voltage through Laplace spectrum decomposition, which is used to quantify the voltage variation range under normal operating conditions and the voltage fluctuation correlation between each sampling point. When the prediction error is greater than the voltage fluctuation parameter, it means that the current predicted voltage has exceeded the normal voltage fluctuation range, indicating that there is an abnormality in the harness.
[0053] Secondly, based on the voltage change rate obtained in step S14, the dynamic change trend of adjacent voltage sampling points is analyzed. The voltage change rate is compared with the voltage fluctuation parameter, and the voltage fluctuation parameter includes the fluctuation change rate. The maximum value of the fluctuation change rate represents the maximum allowable change rate of the wiring harness voltage under normal operating conditions; if the voltage change rate exceeds the maximum allowable change rate, it indicates that the wiring harness voltage fluctuates violently and is related to potential faults.
[0054] Finally, based on the above two judgment conditions, when the prediction error is greater than the voltage fluctuation parameter, and the voltage change rate is greater than the voltage fluctuation parameter, it is determined that the wiring harness is faulty.
[0055] At this time, an alarm signal is sent to the system based on the fault detection result, and the time point of the fault, the predicted error value and the voltage change rate are recorded for subsequent maintenance and analysis.
[0056] The following describes the working process of the present invention using a common scenario as an example. Figure 2 , which is Figure 1 Schematic diagram of the working scenario of the method.
[0057] During the driving process of a new energy vehicle, the vehicle accelerates from a stationary state to a high-speed driving state, and the battery management system (BMS) transmits current to the power motor controller (MCU) through the wiring harness. High-precision sensors arranged at key nodes of the wiring harness collect voltage and current data of the wiring harness in real time. Taking the main wiring harness from the BMS to the MCU as an example, the sensor records the interference-free wiring harness voltage. and harness voltage in operating state The data is uploaded to the central control unit (VCU) in real time. In actual scenarios, these data are transmitted at a sampling frequency of thousands of times per second, forming a voltage data stream with time continuity.
[0058] Specifically, the VCU first collects the interference-free harness voltage and wiring harness voltage Perform fluctuation analysis. VCU constructs the adjacency matrix and degree matrix of the harness voltage data, obtains the Laplace matrix through matrix difference calculation, and decomposes its eigenvalues and eigenvectors. Taking a certain sampling period of the main harness as an example, the calculated eigenvalues and eigenvectors are further substituted into the voltage fluctuation parameter calculation formula to calculate the voltage fluctuation parameters. , which is used to characterize the fluctuation characteristics of the harness under the current operating state. For example, when there is no load, the fluctuation parameter It is usually small (0.001∼0.005), but the fluctuation parameter will increase under load fluctuations or abnormal conditions.
[0059] After completing the calculation of the fluctuation parameters, the VCU extracts features from the harness voltage data, including key indicators such as harness voltage value, current value, voltage fluctuation parameters, current fluctuation parameters, and predicted values. Taking 8 sets of voltage data sampled per second as the unit, the parameters are extracted to construct the training data and test data sets. Subsequently, based on the preset number of neighbors K=5, the VCU performs KNN clustering analysis on the extracted data sets. The specific implementation includes calculating the Euclidean distance of each set of data, selecting the 5 nearest neighbor data points, and determining the clustering category of each set of data through a voting mechanism. For example, if 3 points in the neighbor classification results of a group of data points are classified as "normal" and 2 points are classified as "abnormal", then the group of data is classified as "normal".
[0060] After clustering is completed, the VCU inputs the cluster classification results and feature parameters obtained from the analysis into the pre-trained fault prediction model. The model calculates the prediction error and voltage change rate by processing the input data. For example, in a certain sampling period, the difference between the actual voltage value and the model prediction value is used to calculate the prediction error. At the same time, the voltage change rate is calculated by analyzing the change trend of adjacent voltage sampling points. These data are used to determine whether there is an abnormality in the operation status of the wiring harness.
[0061] In the fault prediction stage, the VCU compares the calculated prediction error and voltage change rate with the preset thresholds. For example, the voltage fluctuation parameter threshold of the system is 0.05\rho_{\text{threshold}} = 0.05, and the voltage change rate threshold is 0.02. When the prediction error of a certain period is greater than 0.05 and the voltage change rate is greater than 0.02, the system immediately determines that there is a fault in the wiring harness and sends an alarm message to the driver through the vehicle display. Taking a certain sampling as an example, the VCU detected a prediction error of 0.08 and a voltage change rate of 0.03, both of which exceeded the threshold range. The system determined that the wiring harness had aging or poor contact.
[0062] When the fault conditions are met, the VCU records the fault information in the vehicle's fault log, including the time of the fault, specific voltage fluctuation parameters, predicted error value, and voltage change rate. At the same time, the system sends a fault alarm to the driver through the vehicle's dashboard or on-board display, reminding the driver to go to the repair center for inspection as soon as possible. For example, the dashboard will display a prompt message "The wiring harness voltage is abnormal, please repair it as soon as possible", and the voice prompt will be combined to improve the visualization and audibility of the alarm.
[0063] Through the implementation of the above-mentioned specific application scenarios, the present invention can monitor the wiring harness voltage in real time during the operation of new energy vehicles, accurately diagnose hidden faults and sudden faults, and promptly remind the driver before the fault reaches the threshold, effectively improving the safety of vehicle operation and the accuracy of wiring harness fault detection.
[0064] In summary, the present invention discloses a method for testing the wiring harness voltage of a new energy vehicle. By collecting the interference-free wiring harness voltage and the actual wiring harness voltage, the fluctuation calculation is performed to obtain the voltage fluctuation parameter. The wiring harness voltage data is clustered using KNN cluster analysis, and the prediction error and voltage change rate are calculated in combination with the pre-trained fault prediction model. When the prediction error is greater than the voltage fluctuation parameter, and the voltage change rate is greater than the wiring harness voltage fluctuation parameter, the wiring harness fault can be effectively determined.
[0065] Specifically, the present invention performs matrix construction operations on the undisturbed harness voltage and the actual harness voltage to obtain the adjacency matrix and degree matrix, and uses the spectral graph theory method to calculate the Laplace matrix, and further calculates the voltage fluctuation parameters by decomposing the eigenvalues and eigenvectors. This method can quantitatively analyze the voltage fluctuation characteristics and is suitable for detecting hidden faults such as harness aging and looseness, making up for the problem that the monitoring method based on resistance value and voltage value in the prior art is insufficient in identifying hidden faults.
[0066] In addition, the present invention extracts features from harness voltage data through the KNN cluster analysis method, specifically including constructing and dividing a data set for harness voltage data to obtain training data and test data; based on a preset number of neighbors, calculating the Euclidean distance between data points and selecting the nearest neighbor point, performing cluster classification operations, and obtaining cluster analysis data. This step can extract the dynamic features of harness voltage, help identify hidden harness faults, and improve the accuracy of harness fault monitoring.
[0067] Furthermore, the present invention combines the historical undisturbed harness voltage, the historical voltage fluctuation coefficient and the historical harness voltage to construct a fault prediction model, and comprehensively determines the harness fault state by calculating the prediction error and adjacent voltage change rate of the cluster analysis data. The fault prediction model is trained based on the supervised learning method, can fit the voltage fluctuation parameters, and has high robustness in monitoring dynamic voltage changes and harness conductivity changes.
[0068] In summary, the present invention can accurately and timely detect hidden faults in wiring harnesses of new energy vehicles, thereby improving the accuracy of wiring harness fault monitoring.
[0069] Reference Figure 2 The second embodiment of the present invention provides a testing device for the wiring harness voltage of a new energy vehicle, comprising: Voltage acquisition module, used to collect interference-free harness voltage and harness voltage; A parameter calculation module, used for performing fluctuation calculation according to the non-interference harness voltage and the harness voltage to obtain a voltage fluctuation parameter; A cluster analysis module, used for performing KNN cluster analysis on the harness voltage to obtain cluster analysis data; A model training module, used for inputting the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate; The fault determination module is used to determine that a fault occurs in the wiring harness when the prediction error is greater than the voltage fluctuation parameter and the voltage change rate is greater than the voltage fluctuation parameter.
[0070] Preferably, the voltage acquisition module is used to acquire the interference-free harness voltage and harness voltage; Preferably, the parameter calculation module is used to perform fluctuation calculation according to the interference-free harness voltage and the harness voltage to obtain voltage fluctuation parameters, including: The performing fluctuation calculation according to the interference-free harness voltage and the harness voltage to obtain the voltage fluctuation parameter includes: Performing a matrix construction operation according to the non-interference beam voltage and the beam voltage to obtain an adjacency matrix and a degree matrix; Performing matrix difference calculation on the degree matrix and the adjacency matrix to obtain a Laplace matrix; According to the Laplace matrix, performing eigenvalue and eigenvector decomposition operations to obtain eigenvalues and eigenvectors; Calculating fluctuation parameters according to the eigenvalue and the eigenvector to obtain voltage fluctuation parameters; Among them, the voltage fluctuation parameter is calculated according to the following formula: In the formula, is the voltage fluctuation parameter; is the maximum eigenvalue; is the minimum eigenvalue; For the eigenvalues; For the The characteristic vector of the voltage sampling points; For the The characteristic vector of the voltage sampling points.
[0071] Preferably, the cluster analysis module is used to perform KNN cluster analysis on the harness voltage to obtain cluster analysis data, including: The performing KNN cluster analysis on the harness voltage to obtain cluster analysis data includes: Performing data set construction and division operations on the wiring harness voltage to obtain training data and test data; Based on a preset number of neighbors, KNN cluster analysis is performed on the training data and the test data to obtain cluster analysis data.
[0072] The data set construction and division operation is performed on the wiring harness voltage to obtain training data and test data, including: Sampling the wiring harness voltages in time sequence, extracting parameters of each set of wiring harness voltages, and obtaining wiring harness parameters; The harness parameters are standardized and divided into training data and test data in proportion, wherein the training data is used for model training and the test data is used for model verification.
[0073] The performing KNN cluster analysis on the training data and the test data based on the preset number of neighbors to obtain cluster analysis data includes: Calculate the distance between each data point in the training data and the test data to obtain the Euclidean distance; Based on a preset number of neighbors, select the nearest neighbor point of each data point according to the Euclidean distance; A cluster classification voting operation is performed on the training data and the test data to obtain cluster analysis data corresponding to the nearest neighboring points.
[0074] Preferably, the model training module is used to input the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate, including: The training process of the fault prediction model includes: Obtain historical voltage fluctuation coefficient, historical interference-free harness voltage and historical harness voltage; Based on the spectral graph theory method, the historical non-interference harness voltage and the historical harness voltage are subjected to convolution discrete Fourier transform to obtain a non-interference characteristic spectrum and a voltage characteristic spectrum; Performing a function construction operation according to the non-interference characteristic spectrum, the voltage characteristic spectrum and the historical voltage fluctuation coefficient to obtain a voltage fluctuation function; An initial fault prediction model is constructed according to the voltage fluctuation function, and the initial fault prediction model is trained based on the cluster analysis data as input data to obtain a trained signal screening model.
[0075] The step of constructing an initial fault prediction model according to the voltage fluctuation function, and training the initial fault prediction model based on the cluster analysis data as input data to obtain a trained signal screening model includes: Initializing cluster analysis data in the signal screening model; Calculating a prediction error between the cluster analysis data and preset analysis data according to the voltage fluctuation function; Calculating adjacent slope changes of the cluster analysis data; When the voltage fluctuation function converges to a preset threshold or the number of training times reaches a preset training threshold, the training is determined to be completed, and a trained signal screening model is obtained.
[0076] Preferably, the fault determination module is used to determine that a fault occurs in the wiring harness when the prediction error is greater than the voltage fluctuation parameter and the voltage change rate is greater than the voltage fluctuation parameter.
[0077] It should be noted that the testing device for the wiring harness voltage of a new energy vehicle provided in an embodiment of the present invention is used to execute all the process steps of the testing method for the wiring harness voltage of a new energy vehicle in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and therefore will not be repeated here.
[0078] The embodiment of the present invention also provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a cluster analysis program. When the processor executes the computer program, the steps in the above-mentioned various new energy vehicle wiring harness voltage test method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the cluster analysis module.
[0079] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0080] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0081] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0082] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0083] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0084] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0085] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for testing the voltage of wiring harness of new energy vehicles, characterized in that include: Collect interference-free harness voltage and harness voltage; Performing fluctuation calculation based on the non-interference harness voltage and the harness voltage to obtain a voltage fluctuation parameter; Performing KNN cluster analysis on the harness voltage to obtain cluster analysis data; Inputting the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate; When the prediction error is greater than the voltage fluctuation parameter, and the voltage change rate is greater than the voltage fluctuation parameter, it is determined that a wiring harness failure occurs.
2. The method for testing the wiring harness voltage of a new energy vehicle according to claim 1, characterized in that: The performing fluctuation calculation according to the interference-free harness voltage and the harness voltage to obtain the voltage fluctuation parameter includes: Performing a matrix construction operation according to the non-interference beam voltage and the beam voltage to obtain an adjacency matrix and a degree matrix; Performing matrix difference calculation on the degree matrix and the adjacency matrix to obtain a Laplace matrix; According to the Laplace matrix, an eigenvalue and an eigenvector decomposition operation is performed to obtain an eigenvalue and an eigenvector; Calculating fluctuation parameters according to the eigenvalue and the eigenvector to obtain voltage fluctuation parameters; Among them, the voltage fluctuation parameter is calculated according to the following formula: In the formula, is the voltage fluctuation parameter; is the maximum eigenvalue; is the minimum eigenvalue; For the eigenvalues; For the The characteristic vector of the voltage sampling points; For the The characteristic vector of the voltage sampling points.
3. The method for testing the wiring harness voltage of a new energy vehicle according to claim 1, characterized in that: The performing KNN cluster analysis on the harness voltage to obtain cluster analysis data includes: Performing data set construction and division operations on the wiring harness voltage to obtain training data and test data; Based on a preset number of neighbors, KNN cluster analysis is performed on the training data and the test data to obtain cluster analysis data.
4. The method for testing the wiring harness voltage of a new energy vehicle according to claim 3, characterized in that: The data set construction and division operation is performed on the wiring harness voltage to obtain training data and test data, including: Sampling the wiring harness voltages in time sequence, extracting parameters of each set of wiring harness voltages, and obtaining wiring harness parameters; The harness parameters are standardized and divided into training data and test data in proportion, wherein the training data is used for model training and the test data is used for model verification.
5. The method for testing the wiring harness voltage of a new energy vehicle according to claim 3, characterized in that: The performing KNN cluster analysis on the training data and the test data based on the preset number of neighbors to obtain cluster analysis data includes: Calculate the distance between each data point in the training data and the test data to obtain the Euclidean distance; Based on a preset number of neighbors, select the nearest neighbor point of each data point according to the Euclidean distance; A cluster classification voting operation is performed on the training data and the test data to obtain cluster analysis data corresponding to the nearest neighboring points.
6. The method for testing the wiring harness voltage of a new energy vehicle according to claim 1, characterized in that: The training process of the fault prediction model includes: Obtain historical voltage fluctuation coefficient, historical interference-free harness voltage and historical harness voltage; Based on the spectral graph theory method, the historical non-interference harness voltage and the historical harness voltage are subjected to convolution discrete Fourier transform to obtain a non-interference characteristic spectrum and a voltage characteristic spectrum; Performing a function construction operation according to the non-interference characteristic spectrum, the voltage characteristic spectrum and the historical voltage fluctuation coefficient to obtain a voltage fluctuation function; An initial fault prediction model is constructed according to the voltage fluctuation function, and the initial fault prediction model is trained based on the cluster analysis data as input data to obtain a trained signal screening model.
7. The method for testing the wiring harness voltage of a new energy vehicle according to claim 6, characterized in that: The step of constructing an initial fault prediction model according to the voltage fluctuation function, and training the initial fault prediction model based on the cluster analysis data as input data to obtain a trained signal screening model includes: Initializing cluster analysis data in the signal screening model; Calculating a prediction error between the cluster analysis data and preset analysis data according to the voltage fluctuation function; Calculating adjacent slope changes of the cluster analysis data; When the voltage fluctuation function converges to a preset threshold or the number of training times reaches a preset training threshold, the training is determined to be completed, and a trained signal screening model is obtained.
8. A test device for the wiring harness voltage of a new energy vehicle, characterized in that: include: Voltage acquisition module, used to collect interference-free harness voltage and harness voltage; A parameter calculation module, used for performing fluctuation calculation according to the non-interference harness voltage and the harness voltage to obtain a voltage fluctuation parameter; A cluster analysis module, used for performing KNN cluster analysis on the harness voltage to obtain cluster analysis data; A model training module, used for inputting the cluster analysis data into a pre-trained fault prediction model to obtain a prediction error and a voltage change rate; The fault determination module is used to determine that a fault occurs in the wiring harness when the prediction error is greater than the voltage fluctuation parameter and the voltage change rate is greater than the voltage fluctuation parameter.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method for testing the wiring harness voltage of a new energy vehicle as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the method for testing the wiring harness voltage of a new energy vehicle as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Gear power propagation digital twinborn model construction method
CN115310227A
Communication network fault diagnosis method and system, electronic equipment and storage medium
CN115580526A
Automobile wire harness parameter performance test method and test system
CN117471227A
Power station cluster division method and device, electronic equipment and storage medium
CN118520321A
Cited By
A high voltage wiring harness durability prediction method and system
CN119738668A
Sampling wire harness detection method and system of power battery
CN120847535A