A method and device for detecting abnormal insulation resistance of electric vehicles
By using the insulation resistance anomaly detection model in electric vehicles and taking advantage of the difference characteristics between real-time sliding windows and historical data, the problems of difficulty in early fault identification and false alarms in existing technologies are solved, and accurate detection of insulation resistance anomalies in electric vehicles is achieved.
Patent Information
- Application Number
- CN202211722700.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing methods for detecting abnormal insulation resistance in electric vehicles cannot effectively identify early faults and are prone to false alarms or missed alarms. In particular, a large number of threshold adjustments are required under different operating conditions and vehicle models, and the debugging process is complicated.
An insulation resistance anomaly detection model is used to detect insulation resistance anomalies in electric vehicles in real time through the difference characteristics between real-time sliding window statistical indicators and historical statistical indicators. The model is trained using machine learning algorithms to identify common insulation anomalies and reduce false alarms or missed alarms.
It achieves early identification of insulation abnormalities in electric vehicles, significantly reduces false alarms or missed alarms, and improves the accuracy and reliability of detection.
Smart Images

Figure CN116047164B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of insulation resistance anomaly detection, and more specifically, to a method and device for detecting anomaly insulation resistance of an electric vehicle. Background Art
[0002] The electrical system in an electric vehicle is a complex, high-voltage system, and its insulation performance directly impacts the safety of occupants. Electrolyte leakage, insulation damage, and wiring harness bonding can lead to insulation failure, resulting in dangers such as electric shock and battery fire.
[0003] The insulation performance of electric vehicles is measured by insulation resistance, which is the resistance between the positive and negative leads of the power battery and the vehicle chassis. When there is no insulation fault, the insulation resistance value is in the megaohm range, but it decreases when an insulation fault occurs. The national standard "Safety Requirements for Power Batteries for Electric Vehicles" specifies the lower limit threshold for insulation resistance after safety testing. Currently, the industry generally uses threshold-based methods to identify insulation resistance anomalies.
[0004] Insulation resistance exhibits distinct distributions under different operating conditions (charging, high-voltage operation, and low-voltage operation). Existing insulation anomaly detection methods typically set different thresholds for different vehicle models and operating conditions, requiring extensive and repeated adjustments and verifications. Factors such as varying charging station models and the use of onboard electrical appliances further complicate the debugging process. Furthermore, threshold-based methods can only detect when insulation resistance deviates significantly from normal values, making them incapable of identifying early-stage faults. Furthermore, improper threshold settings can easily lead to false positives or missed detections. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a detection method and detection device for insulation resistance anomaly of electric vehicles, which performs real-time insulation resistance anomaly detection on the target vehicle through an insulation resistance anomaly detection model, and uses the difference between the real-time sliding window statistical indicators and the historical statistical indicators as a feature. It can fully reflect the difference between the real-time insulation resistance and the historical insulation resistance, identify common insulation anomalies, significantly reduce false alarms or missed alarms, and at the same time, realize early warning of insulation anomalies.
[0006] In a first aspect, an embodiment of the present application provides a method for detecting abnormal insulation resistance of an electric vehicle, the detection method comprising:
[0007] Acquire historical operating data of a target vehicle and perform data cleaning on the historical operating data to obtain target operating data; wherein the target operating data includes an insulation resistance value corresponding to each sampling time;
[0008] Segmenting the target operation data based on a plurality of sampling times in the target operation data according to a preset time scale to obtain a plurality of groups of segmented target operation data;
[0009] For each set of target operating data, generating a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve;
[0010] Using a preset time length as a sliding window length, and calculating a plurality of second statistical features within the sliding window from the actual operating data of the target vehicle frame by frame in a sliding window manner;
[0011] For each second statistical feature, determining a target first statistical feature having the same attribute as the second statistical feature from the multiple first statistical features of the previous set of target operating data that is temporally adjacent to the second statistical feature, and subtracting the target first statistical feature from the second statistical feature to obtain a difference feature;
[0012] The plurality of difference features are input into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has insulation anomaly at the current moment.
[0013] Furthermore, generating a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve, include:
[0014] Determining a plurality of resistance intervals based on the lengths of the resistance division intervals, and determining the number of insulation resistors within each resistance interval;
[0015] generating an initial insulation resistance distribution curve based on the multiple resistance intervals and the number of insulation resistors in each resistance interval; wherein the abscissa of the initial insulation resistance distribution curve represents each resistance interval, and the ordinate represents the number of insulation resistors in each resistance interval;
[0016] performing noise reduction processing on the initial insulation resistance distribution curve to obtain the target insulation resistance distribution curve;
[0017] Using a peak-finding algorithm on the target insulation resistance distribution curve, determining an insulation minimum peak among a plurality of peaks in the target insulation resistance distribution curve;
[0018] Multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are counted in the target insulation resistance distribution curve, and the multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are determined as multiple first statistical features in the set of target operating data.
[0019] Furthermore, the step of applying a peak-finding algorithm to the target insulation resistance distribution curve to determine a minimum insulation peak among a plurality of peaks in the target insulation resistance distribution curve includes:
[0020] Determining, from a plurality of points in the target insulation resistance distribution curve, a plurality of coordinate points whose ordinates are greater than both the ordinates of the left point and the right point, and taking each of the plurality of coordinate points as a peak point;
[0021] For each peak point, search leftward along the abscissa of the target insulation resistance distribution curve starting from the peak point to determine a first target point, and use the lowest point between the peak point and the first target point as the left valley point; wherein the first target point is a left boundary point or a point whose ordinate is greater than the ordinate of the peak point;
[0022] Starting from the peak point, search rightward along the abscissa of the target insulation resistance distribution curve to determine a second target point, and use the lowest point between the peak point and the second target point as the right valley point; wherein the second target point is a right boundary point or a point whose ordinate is greater than the ordinate of the peak point;
[0023] Calculating a first height difference based on the coordinates of the left trough point and the coordinates of the wave crest point, calculating a second height difference based on the coordinates of the right trough point and the coordinates of the wave crest point, and taking the smaller value between the first height difference and the second height difference as the protrusion of the peak corresponding to the wave crest point;
[0024] Each peak is screened according to its prominence, noise peaks are removed, and the peak on the leftmost side of the abscissa is determined as the minimum insulation peak in the target insulation resistance distribution curve.
[0025] Furthermore, the insulation resistance anomaly detection model is trained in the following manner:
[0026] Obtaining original operating data of a sample vehicle that has experienced insulation failure, and performing data cleaning on the original operating data to obtain historical operating sample data; wherein the historical operating sample data includes the insulation resistance value corresponding to each sampling time;
[0027] According to the preset time scale, segmenting the historical operation sample data based on multiple sampling times in the historical operation sample data to obtain multiple groups of segmented historical operation sample data;
[0028] For each set of historical operation sample data, generating an insulation resistance distribution sample curve based on multiple insulation resistance values in the set of historical operation sample data, and determining multiple first statistical sample features in the set of historical operation sample data according to the insulation resistance distribution sample curve;
[0029] Taking the preset time length as the sliding window length, calculating a plurality of second statistical sample features within the sliding window in the actual operation data of the sample vehicle frame by frame in a sliding window manner;
[0030] For each second statistical sample feature, determine a target first statistical sample feature having the same attribute as the second statistical sample feature from the multiple first statistical sample features of the previous set of historical running sample data that is temporally adjacent to the second statistical sample feature, and subtract the target first statistical sample feature from the second statistical sample feature to obtain a difference sample feature;
[0031] Obtaining a vehicle insulation signal of the sample vehicle during all sampling times, analyzing a temporal trend of the vehicle insulation signal, and marking an insulation abnormality state in the vehicle insulation signal as first label information; wherein the first label information indicates whether the sample vehicle is in an insulation abnormality state during all sampling times;
[0032] Associating the difference sample features with the first label information to obtain sample training data;
[0033] Multiple groups of the sample training data are input into a machine learning algorithm for training to obtain the insulation resistance anomaly detection model.
[0034] Furthermore, the step of inputting the plurality of sample training data sets into a machine learning algorithm for training to obtain the insulation resistance anomaly detection model includes:
[0035] Inputting multiple sets of the sample training data into the machine learning algorithm to determine second label information corresponding to each set of the sample training data; wherein the second label information is used to indicate whether the sample vehicle is in an abnormal insulation state during a sampling time corresponding to each set of the sample training data;
[0036] Comparing the first label information and the second label information corresponding to each of the difference sample features, and calculating the loss function of the original insulation resistance abnormality detection model in the current state;
[0037] The gradient descent method is adopted to continuously adjust the model parameters of the insulation resistance anomaly original detection model based on the loss function of the insulation resistance anomaly original detection model until the insulation resistance anomaly original detection model reaches a convergence state or the training reaches the iteration number limit, thereby obtaining the insulation resistance anomaly detection model.
[0038] In a second aspect, an embodiment of the present application further provides a device for detecting abnormal insulation resistance of an electric vehicle, the device comprising:
[0039] A data acquisition module is used to acquire historical operating data of a target vehicle and perform data cleaning on the historical operating data to obtain target operating data; wherein the target operating data includes an insulation resistance value corresponding to each sampling time;
[0040] a data segmentation module, configured to segment the target operation data based on a plurality of sampling times in the target operation data according to a preset time scale, to obtain a plurality of groups of segmented target operation data;
[0041] a first statistical feature determination module configured to generate, for each set of target operating data, a target insulation resistance distribution curve based on a plurality of insulation resistance values in the set of target operating data, and determine a plurality of first statistical features in the set of target operating data based on the target insulation resistance distribution curve;
[0042] A second statistical feature determination module is configured to calculate, frame by frame in a sliding window manner, a plurality of second statistical features within the sliding window from the actual operating data of the target vehicle, using a preset time length as the sliding window length;
[0043] a difference feature determination module configured to determine, for each second statistical feature, a target first statistical feature having the same attribute as the second statistical feature from the plurality of first statistical features of a previous set of target operating data that is temporally adjacent to the second statistical feature, and to obtain a difference feature by subtracting the target first statistical feature from the second statistical feature;
[0044] The anomaly detection module is used to input multiple difference features into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has insulation anomaly at the current moment.
[0045] Furthermore, when the first statistical feature determination module is used to generate a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determine multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve, the first statistical feature determination module is further used to:
[0046] Determining a plurality of resistance intervals based on the lengths of the resistance division intervals, and determining the number of insulation resistors within each resistance interval;
[0047] generating an initial insulation resistance distribution curve based on the multiple resistance intervals and the number of insulation resistors in each resistance interval; wherein the abscissa of the initial insulation resistance distribution curve represents each resistance interval, and the ordinate represents the number of insulation resistors in each resistance interval;
[0048] performing noise reduction processing on the initial insulation resistance distribution curve to obtain the target insulation resistance distribution curve;
[0049] Using a peak-finding algorithm on the target insulation resistance distribution curve, determining an insulation minimum peak among a plurality of peaks in the target insulation resistance distribution curve;
[0050] Multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are counted in the target insulation resistance distribution curve, and the multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are determined as multiple first statistical features in the set of target operating data.
[0051] Furthermore, when the first statistical feature determination module is used to use a peak-finding algorithm on the target insulation resistance distribution curve to determine the minimum insulation peak among multiple peaks in the target insulation resistance distribution curve, the first statistical feature determination module is further used to:
[0052] Determining, from a plurality of points in the target insulation resistance distribution curve, a plurality of coordinate points whose ordinates are greater than both the ordinates of the left point and the right point, and taking each of the plurality of coordinate points as a peak point;
[0053] For each peak point, search leftward along the abscissa of the target insulation resistance distribution curve starting from the peak point to determine a first target point, and use the lowest point between the peak point and the first target point as the left valley point; wherein the first target point is a left boundary point or a point whose ordinate is greater than the ordinate of the peak point;
[0054] Starting from the peak point, search rightward along the abscissa of the target insulation resistance distribution curve to determine a second target point, and use the lowest point between the peak point and the second target point as the right valley point; wherein the second target point is a right boundary point or a point whose ordinate is greater than the ordinate of the peak point;
[0055] Calculating a first height difference based on the coordinates of the left trough point and the coordinates of the wave crest point, calculating a second height difference based on the coordinates of the right trough point and the coordinates of the wave crest point, and taking the smaller value between the first height difference and the second height difference as the protrusion of the peak corresponding to the wave crest point;
[0056] Each peak is screened according to its prominence, noise peaks are removed, and the peak on the leftmost side of the abscissa is determined as the minimum insulation peak in the target insulation resistance distribution curve.
[0057] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned method for detecting abnormal insulation resistance of an electric vehicle are performed.
[0058] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is run by a processor, the computer program executes the steps of the above-mentioned method for detecting abnormal insulation resistance of an electric vehicle.
[0059] The present invention provides a method and apparatus for detecting an insulation resistance anomaly in an electric vehicle. First, historical operating data of a target vehicle is acquired and cleaned to obtain target operating data. Then, the target operating data is segmented based on multiple sampling times in the target operating data according to a preset time scale to obtain multiple groups of segmented target operating data. For each group of target operating data, a target insulation resistance distribution curve is generated based on multiple insulation resistance values in the group of target operating data, and multiple first statistical features in the group of target operating data are determined based on the target insulation resistance distribution curve. Multiple second statistical features within the sliding window of the actual operating data of the target vehicle are calculated frame by frame in a sliding window manner using a preset time length as the sliding window length. For each second statistical feature, a target first statistical feature having the same attribute as the second statistical feature is determined from the multiple first statistical features of the previous group of target operating data that is adjacent to the second statistical feature, and the target first statistical feature is subtracted from the second statistical feature to obtain a difference feature. Finally, the multiple difference features are input into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has an insulation anomaly within the current window time.
[0060] This application performs real-time insulation resistance anomaly detection on the target vehicle through an insulation resistance anomaly detection model, that is, detects whether there is insulation abnormality based on the real-time data uploaded by the vehicle. Based on the phenomenon that insulation abnormality usually deviates significantly from the historical distribution when it occurs, the difference between the real-time sliding window statistical indicators and the historical statistical indicators is used as a feature. It can fully reflect the difference between the real-time insulation resistance and the historical insulation resistance, identify common insulation abnormalities, significantly reduce false alarms or missed alarms, and at the same time, realize early warning of insulation abnormalities.
[0061] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0063] Figure 1 A flow chart of a method for detecting abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application;
[0064] Figure 2 This is one of the structural schematic diagrams of a device for detecting abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application;
[0065] Figure 3 This is a second structural diagram of a device for detecting abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work falls within the scope of protection of the present application.
[0068] First, the application scenarios to which this application is applicable are introduced. This application can be applied in the field of insulation resistance anomaly detection.
[0069] The electrical system in an electric vehicle is a complex, high-voltage system, and its insulation performance directly impacts the safety of occupants. Electrolyte leakage, insulation damage, and wiring harness bonding can lead to insulation failure, resulting in dangers such as electric shock and battery fire.
[0070] The insulation performance of electric vehicles is measured by insulation resistance, which is the resistance between the positive and negative leads of the power battery and the vehicle chassis. When there is no insulation fault, the insulation resistance value is in the megaohm range, but it decreases when an insulation fault occurs. The national standard "Safety Requirements for Power Batteries for Electric Vehicles" specifies the lower limit threshold for insulation resistance after safety testing. Currently, the industry generally uses threshold-based methods to identify insulation resistance anomalies.
[0071] Insulation resistance exhibits distinct distributions under different operating conditions (charging, high-voltage operation, and low-voltage operation). Existing insulation anomaly detection methods typically set different thresholds for different vehicle models and operating conditions, requiring extensive and repeated adjustments and verifications. Factors such as varying charging station models and the use of onboard electrical appliances further complicate the debugging process. Furthermore, threshold-based methods can only detect when insulation resistance deviates significantly from normal values, making them incapable of identifying early-stage faults. Furthermore, improper threshold settings can easily lead to false positives or missed detections.
[0072] Based on this, an embodiment of the present application provides a method for detecting insulation resistance anomalies in electric vehicles. By using an insulation resistance anomaly detection model, real-time insulation resistance anomaly detection is performed on the target vehicle, which can identify common insulation anomalies, significantly reduce false alarms or missed alarms, and achieve early warning of insulation anomalies.
[0073] See also Figure 1 , Figure 1 This is a flow chart of a method for detecting abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application. Figure 1 As shown in , the method for detecting abnormal insulation resistance of an electric vehicle provided by the embodiment of the present application includes:
[0074] S101, acquiring historical operating data of a target vehicle, and performing data cleaning on the historical operating data to obtain target operating data.
[0075] It should be noted that the target vehicle refers to the vehicle that requires insulation resistance anomaly detection. Historical data refers to the data generated by the target vehicle during operation. The target operation data includes the insulation resistance value corresponding to each sampling time.
[0076] Regarding step S101, in a specific implementation, historical operating data of the target vehicle is obtained and cleaned to remove invalid values to obtain target operating data, which includes the insulation resistance value of the target vehicle at each sampling time.
[0077] S102 : Segmenting the target operation data based on a plurality of sampling times in the target operation data according to a preset time scale to obtain a plurality of groups of segmented target operation data.
[0078] It should be noted that the preset time scale refers to a pre-set time scale for data segmentation. For example, the preset time scale can be set to one month, and this application does not make any specific limitation on this.
[0079] Regarding step S102, in the specific implementation, since the historical operating data all carry corresponding sampling times, the target operating data can be segmented according to the multiple sampling times in the target operating data. The target operating data can be segmented according to a preset time scale, such as by month, to obtain multiple groups of segmented target operating data.
[0080] S103 , for each set of target operating data, generating a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve.
[0081] It should be noted that the insulation resistance distribution curve refers to a curve generated based on multiple insulation resistance values and used to characterize the distribution of insulation resistance values. Statistical characteristics may include but are not limited to maximum value, minimum value, mean value, median value, standard deviation, skewness, kurtosis, etc.
[0082] Regarding the above-mentioned step S103, during the specific implementation, for each group of target operating data after segmentation, an insulation resistance distribution curve is generated based on multiple insulation resistance values in the group of target operating data, and multiple first statistical features in the group of target operating data are determined based on the generated insulation resistance distribution curve, such as maximum value, minimum value, mean value, median value, standard deviation, skewness, kurtosis, etc.
[0083] Specifically, with respect to the above step S103, generating a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve include:
[0084] Step 1031 : determining a plurality of resistance intervals based on the length of the resistance division interval, and determining the number of insulation resistors in each resistance interval.
[0085] It should be noted that the resistance interval length refers to the pre-set range used to divide the resistance value into intervals. For example, the resistance interval length can be set to 100, and this application does not specifically limit this. Resistance intervals are multiple intervals generated based on the resistance interval length. Continuing with the above embodiment, when the resistance interval length is 100, the resistance intervals are 0-100, 100-200, 200-300, and so on.
[0086] Regarding the above step 1031 , in a specific implementation, multiple resistance intervals are determined based on a preset resistance division interval length, and the number of insulation resistors in each resistance interval is determined.
[0087] Step 1032 : Generate an initial insulation resistance distribution curve based on the multiple resistance intervals and the number of insulation resistors in each resistance interval.
[0088] Here, the abscissa of the initial insulation resistance distribution curve represents each resistance interval, and the ordinate represents the number of insulation resistors in each resistance interval.
[0089] Regarding step 1032 , after determining the multiple resistance intervals and the number of insulation resistors in each resistance interval in step 1031 , an initial insulation resistance distribution curve is generated based on the multiple resistance intervals and the number of insulation resistors in each resistance interval.
[0090] Step 1033: Perform noise reduction processing on the initial insulation resistance distribution curve to obtain the target insulation resistance distribution curve.
[0091] Regarding the above step 1033, in the specific implementation, after the initial insulation resistance distribution curve is generated in step 1032, the initial insulation resistance distribution curve is subjected to noise reduction processing to obtain the target insulation resistance distribution curve. Here, the initial insulation resistance distribution curve can be subjected to noise reduction by methods such as moving average method or wavelet transform method. For example, taking the moving average method with a window of 3 as an example, for each point on the initial insulation resistance distribution curve, the y value of the first 3 points including the initial insulation resistance distribution curve is taken as y', and the sequence of points after transformation is (x1, y1'), (x2, y2'), (x3, y3'), (x4, y4') ... (x n-2 ,y n-2 ')、(x n-1 ,y n-1 ')、(x n ,y n '), where, y3'=(y1+y2+y3) / 3, y4'=(y2+y3+y4) / 3...y n '=(y n-2 +y n-1 +y n ) / 3.
[0092] Step 1034 : Using a peak-finding algorithm on the target insulation resistance distribution curve, determine a minimum insulation peak among multiple peaks in the target insulation resistance distribution curve.
[0093] Regarding step 1034, during specific implementation, since the target insulation resistance distribution curve may contain multiple peaks, a peak-finding algorithm is used to determine the minimum insulation peak among the multiple peaks in the target insulation resistance distribution curve. Here, during specific implementation, the peak-finding algorithm is first used to find all peaks in the target insulation resistance distribution curve, then the noise peaks are removed, and then the minimum insulation peak is found from the remaining peaks. The peak-finding algorithm can be a local maximum method (comparison method), a ridge method (such as the continuous wavelet transform, or CWT), etc. Currently, the most widely used are the local maximum method and the ridge method. For situations with low noise or high processing speed, the local maximum method can be used; for situations with high noise, the ridge method can be used.
[0094] Specifically, with respect to step 1034, the step of applying a peak-finding algorithm to the target insulation resistance distribution curve to determine the minimum insulation peak among multiple peaks in the target insulation resistance distribution curve includes:
[0095] Step 10341: Determine, from among the multiple points in the target insulation resistance distribution curve, multiple coordinate points whose ordinates are greater than both the ordinates of the left point and the right point, and use each of the multiple coordinate points as a peak point.
[0096] For the above step 10341, multiple coordinate points whose vertical coordinates are greater than the vertical coordinates of the left point and the right point are determined among the multiple points in the target insulation resistance distribution curve, that is, all points that are higher than the left and right adjacent points, that is, all points (xi,yi) that satisfy yi>yi-1 and yi>yi+1 are determined as peak points.
[0097] Step 10342: for each peak point, search leftward along the horizontal coordinate of the target insulation resistance distribution curve starting from the peak point to determine the first target point, and use the lowest point between the peak point and the first target point as the left valley point.
[0098] Here, the first target point is a left boundary point or a point whose ordinate is greater than the ordinate of the peak.
[0099] Regarding the above step 10342, in the specific implementation, for each peak point, starting from the peak point, search leftward along the horizontal coordinate of the target insulation resistance distribution curve to determine the first target point, and take the lowest point between the peak point and the first target point as the left valley point. Here, starting from the peak position, search leftward until the left boundary (x1, y1) or a point higher than the current peak is encountered, that is, y is satisfied. j >y i The point (x jL ,y jL ), with point (x jL ,y jL ) and point (x i ,y i ), which satisfies The point (x L ,y L ) as the left valley point.
[0100] Step 10343: Starting from the peak point, search rightward along the horizontal axis of the target insulation resistance distribution curve to determine a second target point, and use the lowest point between the peak point and the second target point as the right valley point.
[0101] Here, the second target point is a right boundary point or a point whose ordinate is greater than the ordinate of the peak.
[0102] Regarding the above step 10343, in the specific implementation, starting from the peak point, search to the right along the horizontal axis of the target insulation resistance distribution curve to determine the second target point, and the lowest point between the peak point and the second target point is taken as the right valley point. Here, starting from the peak position, search to the right until the right boundary (x n ,y n ) or a point higher than the current peak, that is, satisfying y j >y i The point (x jR ,y jR ), with point (x i ,y i ) and point (x jR ,y jR ), which satisfies The point (x R ,y R ) as the right trough point.
[0103] Step 10344, calculate the first height difference based on the coordinates of the left trough point and the coordinates of the peak point, calculate the second height difference based on the coordinates of the right trough point and the coordinates of the peak point, and use the smaller value between the first height difference and the second height difference as the protrusion of the peak corresponding to the peak point.
[0104] Regarding the above step 10344, in the specific implementation, after the left trough point and the right trough point are determined, the first height difference (i.e., y i -y L ), calculate the second height difference (i.e. y i -y R ). The smaller value between the first height difference and the second height difference is used as the protrusion of the peak corresponding to the peak point.
[0105] Step 10345 , screening each peak according to its prominence, removing noise peaks, and determining the peak on the leftmost side of the abscissa as the minimum insulation peak in the target insulation resistance distribution curve.
[0106] Regarding step 10345, in specific implementation, after determining the prominence of the peak corresponding to each peak point, each peak is screened based on its prominence, noise peaks are removed, and the peak on the leftmost side of the horizontal axis, i.e., the peak with the lowest insulation value, is determined as the minimum insulation peak in the target insulation resistance distribution curve. In specific implementation, after removing the noise peaks, the target insulation resistance distribution curve will have multiple peaks corresponding to different operating conditions. The prominence is related to the vehicle's operating time under different operating conditions. A larger insulation value indicates better insulation performance. In the event of an insulation fault, the insulation value is typically relatively small. Comparing the insulation distribution curve with the operating condition with the lowest insulation value can more reliably reflect insulation differences.
[0107] As an optional implementation method, when performing noise peak screening, all searched peaks can also be screened according to peak characteristics such as peak width, peak height, and peak distance to obtain the final target peak. In actual use, it is necessary to first perform a visual analysis of the peaks of some samples, and record the characteristic values such as the prominence of the target peak, summarize the threshold that can significantly distinguish the noise peak, and then screen according to the threshold combination of these characteristic values. Since peak width and peak height are greatly affected by the number of data frames, peak distance is mainly used to filter adjacent peaks that are too close. In most data cases, prominence can be used.
[0108] Step 1035: Count multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak in the target insulation resistance distribution curve, and determine the multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak as multiple first statistical features in the set of target operating data.
[0109] It should be noted that the upper and lower limits of the minimum peak refer to the range between the point at the left foot and the point at the right foot of the insulation minimum peak.
[0110] Regarding step 1035, in a specific implementation, after the minimum insulation peak in the target insulation resistance distribution curve is determined, various statistical characteristics of the insulation resistance within the upper and lower limits of the minimum insulation peak in the target insulation resistance distribution curve are calculated, such as the maximum value, minimum value, average value, median value, standard deviation, skewness, and kurtosis. The various statistical characteristics of the insulation resistance within the upper and lower limits of the minimum insulation peak are then determined as the various first statistical characteristics in the set of target operating data.
[0111] S104 , using a preset time length as a sliding window length, and calculating a plurality of second statistical features of the actual operating data of the target vehicle within the sliding window frame by frame in a sliding window manner.
[0112] It should be noted that the preset time length refers to the pre-set window length when calculating the second statistical feature using a sliding window method. For example, the preset time length can be pre-set to 10 minutes, with a step size of 1, and this application does not make any specific restrictions on this. The second statistical feature also includes, but is not limited to, maximum value, minimum value, mean value, median value, standard deviation, skewness, kurtosis, etc.
[0113] Regarding the above step S104, during the specific implementation, the target vehicle will continuously generate operating data during operation, and a preset time length is used as the window length, for example, a window length of 10 minutes, a step size of 1, and a plurality of second statistical features in the real-time operating data of the target vehicle are calculated frame by frame in a sliding window manner.
[0114] S105. For each second statistical feature, determine a target first statistical feature having the same attribute as the second statistical feature from the multiple first statistical features of the previous set of target operation data that is temporally adjacent to the second statistical feature, and subtract the target first statistical feature from the second statistical feature to obtain a difference feature.
[0115] Regarding the above step S105, during the specific implementation, for each second statistical feature, a target first statistical feature having the same attribute as the second statistical feature is determined from the multiple first statistical features of the previous set of target operation data that is adjacent to the second statistical feature in time, and the target first statistical feature is subtracted from the second statistical feature to obtain a difference feature. Here, in the above steps, the target operation data are grouped in chronological order, and each set of data has a set of first statistical features. Here, the set of first statistical features that is adjacent to the second statistical feature in time is determined to be subtracted. For example, if a second statistical feature is the maximum value and the sampling time is December, the previous set of target operation data that is adjacent to the second statistical feature in time is found, that is, the target operation data with a sampling time of November. The target first statistical feature that is also the maximum value attribute is determined from the multiple first statistical features of the target operation data with a sampling time of November. The target first statistical feature is subtracted from the second statistical feature to obtain a difference feature.
[0116] S106: Input the multiple difference features into a pre-trained insulation resistance abnormality detection model to determine whether the target vehicle has insulation abnormality at the current moment.
[0117] It should be noted that the insulation resistance anomaly detection model refers to a pre-trained model used to predict whether the target vehicle has insulation anomalies within the current window time.
[0118] Regarding the above step S106, in specific implementation, after obtaining multiple difference features, the difference features are input into a pre-trained insulation resistance abnormality detection model to determine whether the target vehicle has insulation abnormality at the current moment.
[0119] Specifically, according to the method for detecting an abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application, the abnormal insulation resistance detection model is trained in the following manner:
[0120] A: Obtain original operating data of sample vehicles that have experienced insulation failures, and perform data cleaning on the original operating data to obtain historical operating sample data.
[0121] It should be noted that the sample vehicle is a vehicle that has experienced an insulation failure. The original operating data is the operating data generated by the sample vehicle during its historical operation. The historical operating sample data includes the insulation resistance value corresponding to each sampling time.
[0122] Regarding step A above, during implementation, the original operating data of a sample vehicle that has experienced an insulation failure is obtained and cleaned to remove invalid values to obtain historical operating sample data. This historical operating sample data includes the insulation resistance value of the sample vehicle at each historical sample sampling time.
[0123] B: Segmenting the historical operation sample data based on multiple sampling times in the historical operation sample data according to the preset time scale to obtain multiple groups of segmented historical operation sample data.
[0124] Regarding step B above, during specific implementation, since the original operating data all carry corresponding historical sample sampling times, the historical operating sample data can be segmented according to the multiple sampling times in the historical operating sample data. The historical operating sample data can be segmented according to a preset time scale, such as by month, to obtain multiple groups of segmented historical operating sample data.
[0125] C: For each set of historical operation sample data, generate an insulation resistance distribution sample curve based on multiple insulation resistance values in the set of historical operation sample data, and determine multiple first statistical sample features in the set of historical operation sample data according to the insulation resistance distribution sample curve.
[0126] Regarding step C above, during specific implementation, for each set of historical operating sample data, an insulation resistance distribution sample curve is generated based on the multiple insulation resistance values in the set of historical operating sample data, and multiple first statistical sample features in the set of historical operating sample data are determined based on the insulation resistance distribution sample curve. Specifically, the method for determining the first statistical sample features here is the same as the method for determining the first statistical features in steps 1031-1035, and can achieve the same technical effects, and is not further described here.
[0127] D: Taking the preset time length as the sliding window length, calculate multiple second statistical sample features within the sliding window in the actual operation data of the sample vehicle frame by frame in a sliding window manner.
[0128] Regarding the above step D, in the specific implementation, a preset time length is used as the window length, for example, 10 minutes as a unit, 1 as a step length, and multiple second statistical sample features in the real-time operation data of the sample vehicle are calculated frame by frame in a sliding window manner.
[0129] E: For each second statistical sample feature, determine a target first statistical sample feature with the same attributes as the second statistical sample feature from the multiple first statistical sample features of the previous set of historical running sample data that are temporally adjacent to the second statistical sample feature, and subtract the target first statistical sample feature from the second statistical sample feature to obtain a difference sample feature.
[0130] For the above step E, during the specific implementation, for each second statistical sample feature, a target first statistical sample feature with the same attributes as the second statistical sample feature is determined from a plurality of first statistical sample features of the previous set of historical running sample data that are close in time to the second statistical sample feature, and the target first statistical sample feature is subtracted from the second statistical sample feature to obtain a differential sample feature.
[0131] F: Obtain the vehicle insulation signal of the sample vehicle during all sampling times, analyze the time-varying trend of the vehicle insulation signal, and mark the insulation abnormality state in the vehicle insulation signal as the first label information.
[0132] Here, the first tag information indicates whether the sample vehicle is in an insulation abnormality state during all sampling times.
[0133] In the specific implementation of step F above, the vehicle insulation signal of the sample vehicle is obtained during all sampling times, and the temporal trend of the vehicle insulation signal is analyzed. Any abnormal insulation state in the vehicle insulation signal is marked as the first tag information, indicating whether the sample vehicle was in an abnormal insulation state during all sampling times. For example, a normal state is marked as 0, and an abnormal state is marked as 1. Under normal circumstances, the insulation signal fluctuates slightly over time. Sudden drops can be considered abnormal, while no sudden drops can be considered normal.
[0134] G: Associating the difference sample features with the first label information to obtain sample training data.
[0135] H: Inputting multiple groups of the sample training data into a machine learning algorithm for training to obtain the insulation resistance anomaly detection model.
[0136] For the above steps G and H, in the specific implementation, the difference sample features obtained in step E are associated with the first label information in step F to obtain sample training data. Then, multiple groups of sample training data are input into the machine learning algorithm for training to obtain the insulation resistance anomaly detection model. Here, the machine learning algorithm is a supervised machine learning binary classification model, and the classification model can be logistic regression, lightGBM, etc. In situations where there are requirements for processing speed and interpretability, a logistic regression algorithm can be used. In situations where there are requirements for accuracy and general requirements for processing speed, algorithms such as lightGBM and neural networks can be used. In situations where there are requirements for processing speed and general requirements for accuracy and interpretability, algorithms such as linear support vector machines and naive Bayes can be used.
[0137] Regarding the above step H, in a specific implementation, the step of inputting multiple groups of sample training data into the original insulation resistance abnormality detection model and training the original insulation resistance abnormality detection model to obtain the insulation resistance abnormality detection model includes:
[0138] a: Inputting multiple groups of the sample training data into the machine learning algorithm to determine the second label information corresponding to each group of the sample training data.
[0139] The second label information is used to indicate whether the sample vehicle is in an abnormal insulation state during the sampling time corresponding to each set of the sample training data.
[0140] In the specific implementation of step a, multiple sets of sample training data are input into a machine learning algorithm, which then determines second label information corresponding to each set of sample training data. The second label information indicates whether the sample vehicle was in an insulation abnormality state during the sampling time corresponding to each set of sample training data.
[0141] b: Compare the first label information and the second label information corresponding to each of the difference sample features, and calculate the loss function of the original insulation resistance anomaly detection model in the current state.
[0142] c: Using the gradient descent method, based on the loss function of the original insulation resistance anomaly detection model, continuously adjust the model parameters of the original insulation resistance anomaly detection model until the original insulation resistance anomaly detection model reaches a convergence state or the training reaches the iteration limit, thereby obtaining the insulation resistance anomaly detection model.
[0143] It should be noted that a loss function maps the value of a random event or its related random variables to a non-negative real number to represent the "risk" or "loss" of the random event. In applications, loss functions are often used as learning criteria in conjunction with optimization problems, that is, solving and evaluating models by minimizing the loss function.
[0144] Take logistic regression as an example. Logistic regression assumes that the probability of a sample belonging to a certain class can be expressed by a function y Indicates. Where z is the linear function of all features x, and y converts z to the (0,1) interval to represent the probability that the sample belongs to a certain class. Whether the sample belongs to a certain class is determined based on whether y is greater than or less than 0.5. The training process of logistic regression is to fit the linear function z so that the classification of each sample is as correct as possible. "Classifying each sample as correctly as possible" is achieved through the loss function It represents the iterative process of training, that is, the process of minimizing the loss function. In each iteration, the parameter w is adjusted, the value of the loss function is calculated on all training samples, and the next iteration is performed until the loss function is small enough.
[0145] Regarding the above step b, in the specific implementation, it is assumed that there are n difference sample features, that is, the x corresponding to the sample training data i is The corresponding w is (w1,w2,w3…w n ), z is When using the gradient descent method to train the original detection model of insulation resistance anomaly, first randomly initialize w, such as (0.1, 0.8, 0.2…0.3), set the learning rate η, such as 0.1, and set the number of iterations n_iter, such as 1000; for each sample training data i, calculate p i ,y i , calculate the value of the loss function J(w), for each component w j , calculate the loss function relative to w j The partial derivative of Update w j for After updating all components of w, calculate p again for each sample training data i i ,y i , calculate the value of the loss function J(w), calculate each component w j The new partial derivative is updated; it is iterated until the loss function changes close to 0, or the number of iterations n_iter is reached, and the insulation resistance anomaly detection model can be obtained.
[0146] A method for detecting an abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application includes: first, acquiring historical operating data of a target vehicle and performing data cleaning on the historical operating data to obtain target operating data; then, segmenting the target operating data based on multiple sampling times in the target operating data according to a preset time scale to obtain multiple groups of segmented target operating data; generating a target insulation resistance distribution curve for each group of target operating data based on multiple insulation resistance values in the group of target operating data, and determining multiple first statistical features in the group of target operating data based on the target insulation resistance distribution curve; calculating multiple second statistical features within the sliding window of the actual operating data of the target vehicle frame by frame in a sliding window manner using a preset time length as the sliding window length; for each second statistical feature, determining a target first statistical feature having the same attribute as the second statistical feature from the multiple first statistical features of the previous group of target operating data adjacent to the second statistical feature, and subtracting the target first statistical feature from the second statistical feature to obtain a difference feature; finally, inputting the multiple difference features into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has an insulation anomaly within the current window time.
[0147] This application performs real-time insulation resistance anomaly detection on the target vehicle through an insulation resistance anomaly detection model, that is, detects whether there is insulation abnormality based on the real-time data uploaded by the vehicle. Based on the phenomenon that insulation abnormality usually deviates significantly from the historical distribution when it occurs, the difference between the real-time sliding window statistical indicators and the historical statistical indicators is used as a feature. It can fully reflect the difference between the real-time insulation resistance and the historical insulation resistance, identify common insulation abnormalities, significantly reduce false alarms or missed alarms, and at the same time, realize early warning of insulation abnormalities.
[0148] See also Figure 2 and Figure 3 , Figure 2 This is one of the structural diagrams of a device for detecting abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application. Figure 3 This is a second structural diagram of a device for detecting abnormal insulation resistance of an electric vehicle provided in an embodiment of the present application. Figure 2 As shown in , the detection device 200 includes:
[0149] The data acquisition module 201 is used to acquire historical operating data of the target vehicle and perform data cleaning on the historical operating data to obtain target operating data; wherein the target operating data includes the insulation resistance value corresponding to each sampling time;
[0150] A data segmentation module 202 is configured to segment the target operation data based on a plurality of sampling times in the target operation data according to a preset time scale to obtain a plurality of groups of segmented target operation data;
[0151] a first statistical feature determination module 203 for generating, for each set of target operating data, a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data based on the target insulation resistance distribution curve;
[0152] A second statistical feature determination module 204 is configured to calculate, frame by frame, a plurality of second statistical features within a sliding window of the actual operating data of the target vehicle using a sliding window method with a preset time length as the sliding window length;
[0153] The difference feature determination module 205 is configured to determine, for each second statistical feature, a target first statistical feature having the same attribute as the second statistical feature from the plurality of first statistical features of the previous set of target operating data that is temporally adjacent to the second statistical feature, and to subtract the target first statistical feature from the second statistical feature to obtain a difference feature.
[0154] The anomaly detection module 206 is configured to input the plurality of difference features into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has an insulation anomaly at the current moment.
[0155] Furthermore, when the first statistical feature determination module 203 is used to generate a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and to determine multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve, the first statistical feature determination module 203 is further used to:
[0156] Determining a plurality of resistance intervals based on the lengths of the resistance division intervals, and determining the number of insulation resistors within each resistance interval;
[0157] generating an initial insulation resistance distribution curve based on the multiple resistance intervals and the number of insulation resistors in each resistance interval; wherein the abscissa of the initial insulation resistance distribution curve represents each resistance interval, and the ordinate represents the number of insulation resistors in each resistance interval;
[0158] performing noise reduction processing on the initial insulation resistance distribution curve to obtain the target insulation resistance distribution curve;
[0159] Using a peak-finding algorithm on the target insulation resistance distribution curve, determining an insulation minimum peak among a plurality of peaks in the target insulation resistance distribution curve;
[0160] Multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are counted in the target insulation resistance distribution curve, and the multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are determined as multiple first statistical features in the set of target operating data.
[0161] Furthermore, when the first statistical feature determination module 203 is configured to use a peak-finding algorithm on the target insulation resistance distribution curve to determine the minimum insulation peak among multiple peaks in the target insulation resistance distribution curve, the first statistical feature determination module 203 is further configured to:
[0162] Determining, from a plurality of points in the target insulation resistance distribution curve, a plurality of coordinate points whose ordinates are greater than both the ordinates of the left point and the right point, and taking each of the plurality of coordinate points as a peak point;
[0163] For each peak point, search leftward along the abscissa of the target insulation resistance distribution curve starting from the peak point to determine a first target point, and use the lowest point between the peak point and the first target point as the left valley point; wherein the first target point is a left boundary point or a point whose ordinate is greater than the ordinate of the peak point;
[0164] Starting from the peak point, search rightward along the abscissa of the target insulation resistance distribution curve to determine a second target point, and use the lowest point between the peak point and the second target point as the right valley point; wherein the second target point is a right boundary point or a point whose ordinate is greater than the ordinate of the peak point;
[0165] Calculating a first height difference based on the coordinates of the left trough point and the coordinates of the wave crest point, calculating a second height difference based on the coordinates of the right trough point and the coordinates of the wave crest point, and taking the smaller value between the first height difference and the second height difference as the protrusion of the peak corresponding to the wave crest point;
[0166] Each peak is screened according to its prominence, noise peaks are removed, and the peak on the leftmost side of the abscissa is determined as the minimum insulation peak in the target insulation resistance distribution curve.
[0167] like Figure 2 As shown in , the detection device 200 includes a model training module 207, and the model training module 207 is used to:
[0168] Obtaining original operating data of a sample vehicle that has experienced insulation failure, and performing data cleaning on the original operating data to obtain historical operating sample data; wherein the historical operating sample data includes the insulation resistance value corresponding to each sampling time;
[0169] According to the preset time scale, segmenting the historical operation sample data based on multiple sampling times in the historical operation sample data to obtain multiple groups of segmented historical operation sample data;
[0170] For each set of historical operation sample data, generating an insulation resistance distribution sample curve based on multiple insulation resistance values in the set of historical operation sample data, and determining multiple first statistical sample features in the set of historical operation sample data according to the insulation resistance distribution sample curve;
[0171] Taking the preset time length as the sliding window length, calculating a plurality of second statistical sample features within the sliding window in the actual operation data of the sample vehicle frame by frame in a sliding window manner;
[0172] For each second statistical sample feature, determine a target first statistical sample feature having the same attribute as the second statistical sample feature from the multiple first statistical sample features of the previous set of historical running sample data that is temporally adjacent to the second statistical sample feature, and subtract the target first statistical sample feature from the second statistical sample feature to obtain a difference sample feature;
[0173] Obtaining a vehicle insulation signal of the sample vehicle during all sampling times, analyzing a temporal trend of the vehicle insulation signal, and marking an insulation abnormality state in the vehicle insulation signal as first label information; wherein the first label information indicates whether the sample vehicle is in an insulation abnormality state during all sampling times;
[0174] Associating the difference sample features with the first label information to obtain sample training data;
[0175] Multiple groups of the sample training data are input into a machine learning algorithm for training to obtain the insulation resistance anomaly detection model.
[0176] Furthermore, when the model training module 207 is used to input multiple groups of the sample training data into a machine learning algorithm for training to obtain the insulation resistance abnormality detection model, the model training module 207 is also used to:
[0177] Inputting multiple sets of the sample training data into the machine learning algorithm to determine second label information corresponding to each set of the sample training data; wherein the second label information is used to indicate whether the sample vehicle is in an abnormal insulation state during a sampling time corresponding to each set of the sample training data;
[0178] Comparing the first label information and the second label information corresponding to each of the difference sample features, and calculating the loss function of the original insulation resistance abnormality detection model in the current state;
[0179] The gradient descent method is adopted to continuously adjust the model parameters of the insulation resistance anomaly original detection model based on the loss function of the insulation resistance anomaly original detection model until the insulation resistance anomaly original detection model reaches a convergence state or the training reaches the iteration number limit, thereby obtaining the insulation resistance anomaly detection model.
[0180] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in FIG, the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0181] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 The steps of the method for detecting abnormal insulation resistance of an electric vehicle in the method embodiment shown are specifically implemented in accordance with the method embodiment and will not be described in detail here.
[0182] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of the method for detecting abnormal insulation resistance of an electric vehicle in the method embodiment shown are specifically implemented in accordance with the method embodiment and will not be described in detail here.
[0183] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0184] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0185] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0187] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0188] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0189] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-mentioned embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. These modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for detecting abnormal insulation resistance of an electric vehicle, characterized in that: The detection method comprises: Acquire historical operating data of a target vehicle and perform data cleaning on the historical operating data to obtain target operating data; wherein the target operating data includes an insulation resistance value corresponding to each sampling time; Segmenting the target operation data based on a plurality of sampling times in the target operation data according to a preset time scale to obtain a plurality of groups of segmented target operation data; For each set of target operating data, generating a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve; Using a preset time length as a sliding window length, and calculating a plurality of second statistical features within the sliding window from the actual operating data of the target vehicle frame by frame in a sliding window manner; For each second statistical feature, determining a target first statistical feature having the same attribute as the second statistical feature from the multiple first statistical features of the previous set of target operating data that is temporally adjacent to the second statistical feature, and subtracting the target first statistical feature from the second statistical feature to obtain a difference feature; Inputting multiple difference features into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has insulation anomaly at the current moment; Generating a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determining multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve, includes: Determining a plurality of resistance intervals based on the lengths of the resistance division intervals, and determining the number of insulation resistors within each resistance interval; generating an initial insulation resistance distribution curve based on the multiple resistance intervals and the number of insulation resistors in each resistance interval; wherein the abscissa of the initial insulation resistance distribution curve represents each resistance interval, and the ordinate represents the number of insulation resistors in each resistance interval; performing noise reduction processing on the initial insulation resistance distribution curve to obtain the target insulation resistance distribution curve; Using a peak-finding algorithm on the target insulation resistance distribution curve, determining an insulation minimum peak among a plurality of peaks in the target insulation resistance distribution curve; Multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are counted in the target insulation resistance distribution curve, and the multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are determined as multiple first statistical features in the set of target operating data.
2. The detection method according to claim 1, wherein The step of applying a peak-finding algorithm to the target insulation resistance distribution curve to determine a minimum insulation peak among a plurality of peaks in the target insulation resistance distribution curve includes: Determining, from a plurality of points in the target insulation resistance distribution curve, a plurality of coordinate points whose ordinates are greater than both the ordinates of the left point and the right point, and taking each of the plurality of coordinate points as a peak point; For each peak point, search leftward along the abscissa of the target insulation resistance distribution curve starting from the peak point to determine a first target point, and use the lowest point between the peak point and the first target point as the left valley point; wherein the first target point is a left boundary point or a point whose ordinate is greater than the ordinate of the peak point; Starting from the peak point, search rightward along the abscissa of the target insulation resistance distribution curve to determine a second target point, and use the lowest point between the peak point and the second target point as the right valley point; wherein the second target point is a right boundary point or a point whose ordinate is greater than the ordinate of the peak point; Calculating a first height difference based on the coordinates of the left trough point and the coordinates of the wave crest point, calculating a second height difference based on the coordinates of the right trough point and the coordinates of the wave crest point, and taking the smaller value between the first height difference and the second height difference as the protrusion of the peak corresponding to the wave crest point; Each peak is screened according to its prominence, noise peaks are removed, and the peak on the leftmost side of the abscissa is determined as the minimum insulation peak in the target insulation resistance distribution curve.
3. The detection method according to claim 1, wherein The insulation resistance anomaly detection model is trained in the following way: Obtaining original operating data of a sample vehicle that has experienced insulation failure, and performing data cleaning on the original operating data to obtain historical operating sample data; wherein the historical operating sample data includes the insulation resistance value corresponding to each sampling time; According to the preset time scale, segmenting the historical operation sample data based on multiple sampling times in the historical operation sample data to obtain multiple groups of segmented historical operation sample data; For each set of historical operation sample data, generating an insulation resistance distribution sample curve based on multiple insulation resistance values in the set of historical operation sample data, and determining multiple first statistical sample features in the set of historical operation sample data according to the insulation resistance distribution sample curve; Taking the preset time length as the sliding window length, calculating a plurality of second statistical sample features within the sliding window in the actual operation data of the sample vehicle frame by frame in a sliding window manner; For each second statistical sample feature, determine a target first statistical sample feature having the same attribute as the second statistical sample feature from the multiple first statistical sample features of the previous set of historical running sample data that is temporally adjacent to the second statistical sample feature, and subtract the target first statistical sample feature from the second statistical sample feature to obtain a difference sample feature; Obtaining a vehicle insulation signal of the sample vehicle during all sampling times, analyzing a temporal trend of the vehicle insulation signal, and marking an insulation abnormality state in the vehicle insulation signal as first label information; wherein the first label information indicates whether the sample vehicle is in an insulation abnormality state during all sampling times; Associating the difference sample features with the first label information to obtain sample training data; Multiple groups of the sample training data are input into a machine learning algorithm for training to obtain the insulation resistance anomaly detection model.
4. The detection method according to claim 3, characterized in that The step of inputting the plurality of sample training data sets into a machine learning algorithm for training to obtain the insulation resistance anomaly detection model comprises: Inputting multiple sets of the sample training data into the machine learning algorithm to determine second label information corresponding to each set of the sample training data; wherein the second label information is used to indicate whether the sample vehicle is in an abnormal insulation state during a sampling time corresponding to each set of the sample training data; Comparing the first label information and the second label information corresponding to each of the difference sample features, and calculating the loss function of the original insulation resistance abnormality detection model in the current state; The gradient descent method is adopted to continuously adjust the model parameters of the insulation resistance anomaly original detection model based on the loss function of the insulation resistance anomaly original detection model until the insulation resistance anomaly original detection model reaches a convergence state or the training reaches the iteration number limit, thereby obtaining the insulation resistance anomaly detection model.
5. A device for detecting abnormal insulation resistance of an electric vehicle, characterized in that: The detection device comprises: A data acquisition module is used to acquire historical operating data of a target vehicle and perform data cleaning on the historical operating data to obtain target operating data; wherein the target operating data includes an insulation resistance value corresponding to each sampling time; a data segmentation module, configured to segment the target operation data based on a plurality of sampling times in the target operation data according to a preset time scale, to obtain a plurality of groups of segmented target operation data; a first statistical feature determination module configured to generate, for each set of target operating data, a target insulation resistance distribution curve based on a plurality of insulation resistance values in the set of target operating data, and determine a plurality of first statistical features in the set of target operating data based on the target insulation resistance distribution curve; A second statistical feature determination module is configured to calculate, frame by frame in a sliding window manner, a plurality of second statistical features within the sliding window from the actual operating data of the target vehicle, using a preset time length as the sliding window length; a difference feature determination module configured to determine, for each second statistical feature, a target first statistical feature having the same attribute as the second statistical feature from the plurality of first statistical features of a previous set of target operating data that is temporally adjacent to the second statistical feature, and to obtain a difference feature by subtracting the target first statistical feature from the second statistical feature; An anomaly detection module, configured to input multiple difference features into a pre-trained insulation resistance anomaly detection model to determine whether the target vehicle has an insulation anomaly at the current moment; When the first statistical feature determination module is used to generate a target insulation resistance distribution curve based on multiple insulation resistance values in the set of target operating data, and determine multiple first statistical features in the set of target operating data according to the target insulation resistance distribution curve, the first statistical feature determination module is further used to: Determining a plurality of resistance intervals based on the lengths of the resistance division intervals, and determining the number of insulation resistors within each resistance interval; generating an initial insulation resistance distribution curve based on the multiple resistance intervals and the number of insulation resistors in each resistance interval; wherein the abscissa of the initial insulation resistance distribution curve represents each resistance interval, and the ordinate represents the number of insulation resistors in each resistance interval; performing noise reduction processing on the initial insulation resistance distribution curve to obtain the target insulation resistance distribution curve; Using a peak-finding algorithm on the target insulation resistance distribution curve, determining an insulation minimum peak among a plurality of peaks in the target insulation resistance distribution curve; Multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are counted in the target insulation resistance distribution curve, and the multiple statistical features of the insulation resistance within the upper and lower limits of the insulation minimum peak are determined as multiple first statistical features in the set of target operating data.
6. The detection device according to claim 5, characterized in that When the first statistical feature determination module is used to use a peak-finding algorithm on the target insulation resistance distribution curve to determine the minimum insulation peak among multiple peaks in the target insulation resistance distribution curve, the first statistical feature determination module is further used to: Determining, from a plurality of points in the target insulation resistance distribution curve, a plurality of coordinate points whose ordinates are greater than both the ordinates of the left point and the right point, and taking each of the plurality of coordinate points as a peak point; For each peak point, search leftward along the abscissa of the target insulation resistance distribution curve starting from the peak point to determine a first target point, and use the lowest point between the peak point and the first target point as the left valley point; wherein the first target point is a left boundary point or a point whose ordinate is greater than the ordinate of the peak point; Starting from the peak point, search rightward along the abscissa of the target insulation resistance distribution curve to determine a second target point, and use the lowest point between the peak point and the second target point as the right valley point; wherein the second target point is a right boundary point or a point whose ordinate is greater than the ordinate of the peak point; Calculating a first height difference based on the coordinates of the left trough point and the coordinates of the wave crest point, calculating a second height difference based on the coordinates of the right trough point and the coordinates of the wave crest point, and taking the smaller value between the first height difference and the second height difference as the protrusion of the peak corresponding to the wave crest point; Each peak is screened according to its prominence, noise peaks are removed, and the peak on the leftmost side of the abscissa is determined as the minimum insulation peak in the target insulation resistance distribution curve.
7. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the processor is running, the machine-readable instructions execute the steps of the method for detecting abnormal insulation resistance of an electric vehicle as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting abnormal insulation resistance of an electric vehicle as claimed in any one of claims 1 to 4 are executed.
Citation Information
Patent Citations
Training method and device for voltage difference anomaly detection model of vehicle battery pack
CN115169580A
Insulation diagnostic system and insulation diagnostic method
US20220221501A1