Method, system, electronic device and vehicle for measuring insulation resistance of vehicle
By fitting the voltage-time function relationship of the insulation detection resistance in electric vehicles, the problems of inaccurate and time-consuming insulation resistance measurement in the existing technology are solved, fast and accurate insulation resistance measurement is achieved, and vehicle operation safety is improved.
Patent Information
- Application Number
- CN202510129836.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-02-05
AI Technical Summary
Existing electric vehicle insulation resistance measurement methods produce inaccurate measurement results in harsh environments and extreme conditions, and the measurement time is long and inefficient, which cannot ensure passenger safety.
By fitting the functional relationship between the positive electrode-to-ground voltage and the negative electrode-to-ground voltage and time when the insulation detection resistor is not connected and when it is connected, the least squares method is used for polynomial fitting to quickly obtain the voltage stability value, reduce manual intervention, and improve measurement accuracy and automation.
It achieves accurate and fast insulation resistance measurement in harsh environments and extreme conditions, improves measurement accuracy and efficiency, ensures the stability and applicability of measurement results, timely detects vehicle insulation problems, and improves vehicle operation safety.
Smart Images

Figure CN119959805B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management systems, and in particular to a method and system for calculating the insulation resistance of a vehicle, an electronic device, and a vehicle. Background Art
[0002] Battery Electric Vehicles (BEVs) are vehicles that use an onboard battery as a power source, with an electric motor driving the wheels. They meet various standards, including road traffic and safety regulations. Given their relatively low environmental impact, BEVs are widely viewed as promising.
[0003] However, because electric vehicles are equipped with high-voltage onboard batteries, the insulation performance of the entire vehicle is reduced, which directly affects the safety of passengers. Therefore, ensuring the insulation status of electric vehicles is crucial. Currently, the insulation status of vehicles is usually monitored in real time by a battery management system (BMS). The BMS usually uses an unbalanced bridge circuit method to measure the insulation resistance of the entire vehicle. This involves connecting resistors in parallel between the positive and negative electrodes of the battery and the ground, sampling the voltage values before and after the parallel connection, and then calculating the insulation resistance between the positive and negative electrodes based on circuit principles.
[0004] However, electric vehicles face harsh operating environments during driving, such as vibration, high temperature, high humidity, and corrosive gases. Under extreme conditions, such as sudden acceleration or braking, the power battery's insulation resistance detection circuit may be severely disturbed, resulting in inaccurate insulation resistance measurements. For example, existing insulation resistance measurement methods use arithmetic mean filtering to process data collected by the detection circuit. However, if the system is disturbed or the data collection accuracy is insufficient, accurate insulation resistance measurements cannot be made, thus failing to ensure passenger safety.
[0005] Furthermore, in electric vehicles, Y-capacitors exist between the positive and negative poles of the battery and the vehicle body ground. When resistors are added in parallel to the battery's positive and negative circuits, the resistors and Y-capacitors form an RC charge-discharge circuit, which can lead to voltage instability. To accurately measure the voltage before and after the parallel resistor, it's necessary to wait for the voltage to stabilize, making the measurement process time-consuming. Furthermore, the insulation value calculation and necessary sampling and filtering further extend the insulation resistance measurement time. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide a method, system, electronic device and vehicle for measuring vehicle insulation resistance, so as to solve the problems of inaccurate measurement results, long time and low efficiency in existing insulation resistance measurement methods.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A method for measuring the insulation resistance of a vehicle comprises the following steps:
[0009] S1, when the insulation detection resistor R3 is not connected to the insulation resistance detection circuit, collecting the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the first duration of time when the insulation detection resistor R3 is not connected according to a preset period;
[0010] S2. When the first duration is greater than a preset time, it is determined that the equivalent capacitor charge and discharge are not completed, and then, based on the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the first preset number of times when the insulation detection resistor R3 is not connected and the corresponding time, a first functional relationship between the positive electrode-to-ground voltage and time and a second functional relationship between the negative electrode-to-ground voltage and time are obtained when the insulation detection resistor R3 is not connected;
[0011] S3, according to the first functional relationship, starting from the first duration, and calculating the estimated value of the positive electrode-to-ground voltage according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated i-1th first positive electrode to ground voltage estimate; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimate is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the estimated value of the j-1th first negative electrode-to-ground voltage calculated, j ≥ 1, j is a positive integer;
[0012] S4. When the insulation detection resistor R3 is connected to the insulation resistance detection circuit, the positive electrode-to-ground voltage stability value U1′ and the negative electrode-to-ground voltage stability value U2′ of the insulation detection resistor R3 are obtained according to the method of S1 to S3;
[0013] S5. Calculate the vehicle insulation resistance based on the insulation detection resistance R3, the positive pole-to-ground voltage stability value U1, the negative pole-to-ground voltage stability value U2, the positive pole-to-ground voltage stability value U1′, and the negative pole-to-ground voltage stability value U2′.
[0014] According to the above technical means, the voltage-time function relationship when the insulation detection resistor is connected or not can be obtained more accurately through fitting, and there is no need to filter any collected values, which effectively improves the measurement accuracy of the insulation resistance; when it is determined that the equivalent capacitance charging and discharging is not complete, the voltage stability value can be quickly obtained by curve fitting the voltage and time data of a preset number of times, shortening the time required for measurement; the entire measurement process involves collecting data according to a preset period, automatically calculating the voltage estimation value and the stability value, reducing manual intervention and improving the degree of automation; the voltage stability value is determined by comparing the difference between two consecutive voltage estimation values, ensuring the stability of the measurement results; this method is not only applicable to the case where the insulation detection resistor is not connected, but also to the case where it is connected, and has good applicability; accurate insulation resistance measurement helps to timely detect vehicle insulation problems, thereby improving the safety of vehicle operation.
[0015] Preferably, in S2 and S4, AI curve fitting is adopted, and the AI curve fitting adopts the least square method, takes time as the independent variable and voltage as the dependent variable, and performs k-order polynomial fitting to obtain a polynomial function as shown in formula (I):
[0016] f(t)=a0+a1*t+a2*t 2 +…+a k *t k (I)
[0017] In formula (I), a0, a1, a2...a k is the coefficient, k represents the number of sampling times, f(t) represents the voltage, and t represents the time corresponding to the voltage sampling;
[0018] The least squares method finds the best function matching of the actual sampling points by minimizing the sum of squares of the errors, as shown in formula (II):
[0019]
[0020] Substituting formula (I) into formula (II) yields formula (III):
[0021]
[0022] By formula (III) a0, a1, a2...a k Find the partial derivative and set equation (III) to 0 to solve a0, a1, a2…a k , i=1,2,3,......,n,n is a positive integer, t i Indicates the time corresponding to the i-th voltage acquisition, u i represents the voltage collected for the i-th time;
[0023] Among them, when the actual sampling point is the sampling point of the positive electrode-to-ground voltage stable value U1, the first functional relationship obtained by solving is shown in Formula (IV); when the actual sampling point is the sampling point of the negative electrode-to-ground voltage stable value U2, the second functional relationship obtained by solving is shown in Formula (V); when the actual sampling point is the sampling point of the positive electrode-to-ground voltage stable value U1′, the third functional relationship obtained by solving is shown in Formula (VI); when the actual sampling point is the sampling point of the negative electrode-to-ground voltage stable value U2′, the fourth functional relationship obtained by solving is shown in Formula (VII);
[0024] f1(t)=a 01 +a 11 *t+a 21 *t 2 +…+a k1 *t k (IV)
[0025] f2(t)=a 02 +a 12 *t+a 22 *t 2 +…+a k2 *t k (V)
[0026] f1′(t)=a′ 01 +a′ 11 *t+a′ 21 *t 2 +…+a′ k1 *t k (VI)
[0027] f2′(t)=a′ 02 +a′ 12 *t+a′ 22 *t 2 +…+a′ k2 *t k (VII);
[0028] Among them, in formula (IV), formula (V), formula (VI) and formula (VII), a 01 、a 11 、a 21 …a k1 、a 02 、a 12 、a 22 …a k2 , a′ 01 , a′ 11 , a′ 21 …a′ k1 , a′ 02 , a′ 12 , a′ 22…a′ k2 is the coefficient; k represents the number of sampling times; f1(t) represents the voltage collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1; a k1 represents the time when the voltage is collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1; f2(t) represents the voltage collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2; a k2 represents the time when the voltage is collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2; f1′(t) represents the voltage collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1′; a′ k1 represents the time when the voltage is collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1′; f2′(t) represents the voltage collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2′; a′ k2 Indicates the time corresponding to the voltage collection when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2′.
[0029] Preferably, if the insulation state changes during the measurement process, the measurement method further includes:
[0030] When the insulation detection resistor R3 is not connected, the actual sampling point of the positive-to-ground voltage stability value U1 is substituted into formula (IV) to obtain the function f1 未接入 (t); When the insulation detection resistor R3 is disconnected again after being connected, the actual sampling point of the positive electrode to ground voltage stable value U1 is substituted into formula (IV) to solve the function f1 再次未接入 (t);
[0031] comparison function f1 未接入 (t) and f1 再次未接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected after being connected and recalculated.
[0032] When function f1 未接入 (t) and f1 再次未接入 (t) The difference between the minimum value and the maximum value is less than or equal to the set difference, then the function f1 未接入 (t) and f1 再次未接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, then connect the insulation detection resistor R3 and then disconnect it and recalculate until the function f1 未接入 (t) and f1 再次未R入 (t) all satisfy monotonicity.
[0033] Preferably, when the insulation detection resistor R3 is not connected, the actual sampling point of the negative electrode to ground voltage stability value U2 is substituted into the formula (V) to solve the function f2 未接入 (t); When the insulation detection resistor R3 is disconnected again after being connected, the actual sampling point of the negative electrode to ground voltage stability value U2 is substituted into formula (V) to solve the function f2 再次未接入 (t);
[0034] comparison function f2 未接入 (t) and f2 再次未接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected after being connected and recalculated.
[0035] When function f2 未接入 (t) and f2 再次未接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then the function f2 未接入 (t) and f2 再次未接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, then connect the insulation detection resistor R3 and then disconnect it and recalculate until the function f2 未接入 (t) and f2 再次未接入 (t) all satisfy monotonicity.
[0036] Preferably, when the insulation detection resistor R3 is connected, the actual sampling point of the positive electrode to ground voltage stability value U1′ is substituted into formula (VI) to solve the function f1′ 接入 (t); When the insulation detection resistor R3 is disconnected and then connected again, the actual sampling point of the positive electrode to ground voltage stable value U1′ is substituted into formula (VI) to solve the function f1′ 再次接入 (t);
[0037] Comparison function f1′ 接入 (t) and f1′ 再次接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected and then connected again to recalculate.
[0038] When the function f1′ 接入 (t) and f1′ 再次接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f1′ 接入 (t) and f1′ 再次接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, disconnect the insulation detection resistor R3 and then connect it again and recalculate until the function f1′ 接入 (t) and f1′再次接入 (t) all satisfy monotonicity.
[0039] Preferably, when the insulation detection resistor R3 is connected, the actual sampling point of the negative electrode to ground voltage stability value U2′ is substituted into formula (VII) to obtain the function f2′ 接入 (t); When the insulation detection resistor R3 is disconnected and then connected again, the actual sampling point of the negative electrode to ground voltage stable value U2′ is substituted into formula (VII) to solve the function f2′ 再次接入 (t);
[0040] Comparison function f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected and then connected again to recalculate.
[0041] When the function f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f2′ 接入 (t) and f2′ 再次接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, disconnect the insulation detection resistor R3 and then connect it again and recalculate until the function f2′ 接入 (t) and f2′ 再次接入 (t) all satisfy monotonicity.
[0042] Preferably, when the insulation detection resistor R3 is switched from being connected to being disconnected from the insulation resistance detection circuit, U1 increases and U2 decreases, and the measurement method includes the following steps:
[0043] 1) Collect the positive pole to ground voltage U1[N-1] and the negative pole to ground voltage U2[N-1] at every preset period. When the number of collections reaches N times, calculate the average value U1 of the collected N positive pole to ground voltages U1[N-1] AVR And the average value U2 of the N-times negative pole to ground voltage U2[N-1] AVR , calculate the absolute value of the positive voltage to ground ΔU1[n]=|U1[n]-U1 AVR |, the absolute value of the negative voltage to ground ΔU2[n]=|U2[n]-U2 AVR When either the absolute value ΔU1[n] of the positive electrode voltage to ground or the absolute value ΔU2[n] of the negative electrode voltage to ground is greater than or equal to a second preset voltage, it is determined that the capacitor charge and discharge are not completed; wherein N represents the number of acquisitions, the value of N is a positive integer, and n is an array subscript, n=N-1;
[0044] 2) Continue to collect the positive electrode to ground voltage U1[N-1] and the negative electrode to ground voltage U2[N-1] every preset period, and calculate and update the average value U1 of the positive electrode to ground voltage after each collection. AVR and the average value of the negative pole voltage to ground U2 AVR , and the corresponding absolute value of the positive electrode-to-ground voltage ΔU1[n] and the absolute value of the negative electrode-to-ground voltage ΔU2[n], if the first duration in which the insulation detection resistor R3 is not connected is greater than the preset time, and any one of the absolute value of the positive electrode-to-ground voltage ΔU1[n] and the absolute value of the negative electrode-to-ground voltage ΔU2[n] is greater than or equal to a second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0045] 3) performing AI curve fitting on the positive electrode-to-ground voltage and the negative electrode-to-ground voltage for the first preset number of times collected when the insulation detection resistor R3 is not connected and the corresponding time, respectively, to obtain a first functional relationship between the positive electrode-to-ground voltage and time, and a second functional relationship between the negative electrode-to-ground voltage and time;
[0046] 4) According to the first functional relationship, the first duration is used as the initial time, and the positive electrode voltage to ground estimation value is calculated according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the calculated estimated value of the j-1th first negative electrode-to-ground voltage, j ≥ 1, and j is a positive integer.
[0047] Preferably, in step 1), when the absolute values ΔU1[n] of all the positive electrode-to-ground voltages and the absolute values ΔU2[n] of all the negative electrode-to-ground voltages are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1 of the positive electrode-to-ground voltage is used as the reference voltage. AVR As the positive electrode to ground voltage stable value U1, the average value of the negative electrode to ground voltage U2AVR As the negative pole to ground voltage stable value U2.
[0048] Preferably, in step 2), during the process of continuing to collect the positive electrode to ground voltage U1[N-1] and the negative electrode to ground voltage U2[N-1], if the first duration during which the insulation detection resistor R3 is not connected is less than or equal to the preset time, and the absolute values of all the positive electrode to ground voltages ΔU1[n] and the absolute values of all the negative electrode to ground voltages ΔU2[n] are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1 of the positive electrode to ground voltage is calculated to be updated. AVR As the positive electrode to ground voltage stable value U1, to calculate the updated average value U2 of the negative electrode to ground voltage AVR As the negative pole to ground voltage stable value U2.
[0049] Preferably, when the insulation detection resistor R3 is switched from being disconnected to being connected to the insulation resistance detection circuit, U1 decreases and U2 increases, and the measurement method includes the following steps:
[0050] 1) Collect the positive pole-to-ground voltage U1′[N-1] and the negative pole-to-ground voltage U2′[N-1] at every preset period. When the number of collections reaches N times, calculate the average value U1′ of the N collected positive pole-to-ground voltages U1′[N-1] AVR and the average value U2′ of the N-times negative pole-to-ground voltage U2′[N-1] AVR , calculate the absolute value of the positive electrode to ground voltage ΔU1′[n]=|U1′[n]-U1′ AVR |, the absolute value of the negative pole voltage to ground ΔU2′[n]=|U2′[n]-U2′ AVR When either the absolute value ΔU1′[n] of the positive electrode voltage to ground or the absolute value ΔU2′[n] of the negative electrode voltage to ground is greater than or equal to a second preset voltage, it is determined that the capacitor charge and discharge are not completed, wherein N represents the number of acquisitions, the value of N is a positive integer, and n is the array subscript, n=N-1, i.e., n=0 for the first sampling, n=1 for the second sampling, and so on;
[0051] 2) Continue to collect the positive electrode to ground voltage U1′[N-1] and the negative electrode to ground voltage U2′[N-1] once every preset period, and calculate and update the average value U1′ of the positive electrode to ground voltage after each collection. AVR and the average value of the negative electrode voltage to ground U2′ AVR, and the corresponding absolute value ΔU1′[n] of the positive electrode-to-ground voltage and the absolute value ΔU2′[n] of the negative electrode-to-ground voltage. If the second duration of the connection of the insulation detection resistor R3 is greater than the preset time, and any one of the absolute value ΔU1′[n] of the positive electrode-to-ground voltage and the absolute value ΔU2′[n] of the negative electrode-to-ground voltage is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0052] 3) performing AI curve fitting on the positive and negative electrode-to-ground voltages and the negative electrode-to-ground voltages collected for a second preset number of times when the insulation detection resistor R3 is connected, and the corresponding time, to obtain a third functional relationship between the positive electrode-to-ground voltage and time, and a fourth functional relationship between the negative electrode-to-ground voltage and time;
[0053] 4) According to the third functional relationship, the second duration is used as the initial time, and the positive electrode-to-ground voltage estimation value is calculated according to the preset period until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive-to-ground voltage stability value U1′ connected as the insulation detection resistor R3, where U1′ j is the estimated value of the jth second positive electrode to ground voltage, U1′ j-1 is the calculated j-1 second positive electrode to ground voltage estimate value; according to the fourth functional relationship, the second duration is used as the initial time and the negative electrode to ground voltage estimate value is calculated according to the preset period until the obtained U2′ j -U2′ j-1 When the voltage is less than the first preset voltage, U2′ j The negative pole to ground voltage stability value U2′ connected as the insulation detection resistor R3, where U2′ j is the estimated value of the j-th second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode-to-ground voltage, j ≥ 1, and j is a positive integer.
[0054] Preferably, in step 1), when the absolute values of all the positive electrode-to-ground voltages ΔU1′[n] and the absolute values of all the negative electrode-to-ground voltages ΔU2′[n] are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1′ of the positive electrode-to-ground voltage is used as the reference voltage. AVR As the positive electrode to ground voltage stable value U1 ', the average value U2' of the negative electrode to ground voltage AVR As the negative pole to ground voltage stable value U2 '.
[0055] Preferably, in step 2), during the process of continuing to collect the positive electrode to ground voltage U1′[N-1] and the negative electrode to ground voltage U2′[N-1], if the second duration of the insulation detection resistor R3 access is less than or equal to the preset time, and the absolute values of all the positive electrode to ground voltages ΔU1′[n] and the absolute values of all the negative electrode to ground voltages ΔU2′[n] are less than the second preset voltage, it is determined that the capacitor charging and discharging is completed, and the updated average value of the positive electrode to ground voltage U1′ is calculated. AVR As the positive electrode to ground voltage stable value U1 ', to calculate the updated negative electrode to ground voltage average value U2 ' AVR As the negative pole to ground voltage stable value U2 '.
[0056] The present invention further provides a system for implementing the vehicle insulation resistance measurement method of the present invention, comprising:
[0057] Insulation resistance detection circuit;
[0058] A data acquisition module is used to collect, according to a preset period, the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the first duration of the insulation detection resistor R3 not being connected when the insulation detection resistor R3 is not connected, and the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the second duration of the insulation detection resistor R3 being connected when the insulation detection resistor R3 is connected;
[0059] A fitting module: used to determine that the equivalent capacitor charge and discharge are not completed when the first duration is greater than the preset time, and then fit the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the first preset number of times when the insulation detection resistor R3 is not connected and the corresponding time, respectively, to obtain a first functional relationship between the positive electrode-to-ground voltage and time when the insulation detection resistor R3 is not connected, and a second functional relationship between the negative electrode-to-ground voltage and time; and used to determine that the equivalent capacitor charge and discharge are not completed when the second duration is greater than the preset time, and then fit the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the second preset number of times when the insulation detection resistor R3 is connected and the corresponding time, respectively, to obtain a third functional relationship between the positive electrode-to-ground voltage and time when the insulation detection resistor R3 is connected, and a fourth functional relationship between the negative electrode-to-ground voltage and time;
[0060] Voltage estimation and stable value calculation module: used to calculate the positive electrode to ground voltage estimation value according to the first functional relationship with the first duration as the initial time according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the calculated j-1th first negative electrode to ground voltage estimate value; according to the third functional relationship, the second duration is used as the initial time and the positive electrode to ground voltage estimate value is calculated according to the preset period until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive-to-ground voltage stability value U1′ connected as the insulation detection resistor R3, where U1′ j is the estimated value of the jth second positive electrode to ground voltage, U1′ j-1 is the calculated j-1 second positive electrode to ground voltage estimate value; according to the fourth functional relationship, the second duration is used as the initial time and the negative electrode to ground voltage estimate value is calculated according to the preset period until the obtained U2′ j -U2′ j-1 When the voltage is less than the first preset voltage, U2′ j The negative pole to ground voltage stability value U2′ connected as the insulation detection resistor R3, where U2′ j is the estimated value of the j-th second negative electrode voltage to ground, U2′ j-1 is the estimated value of the j-1th second negative electrode voltage to ground obtained by calculation; j ≥ 1, j is a positive integer;
[0061] Insulation resistance calculation module: used to calculate the vehicle insulation resistance based on the insulation detection resistor R3, the positive pole to ground voltage stable value U1, the negative pole to ground voltage stable value U2, the positive pole to ground voltage stable value U1′ and the negative pole to ground voltage stable value U2′.
[0062] Preferably, the system further comprises:
[0063] Time control unit: used to control the sampling period of the insulation resistance detection circuit and record the duration of whether the insulation detection resistor R3 is connected or not;
[0064] User interface module: used to display the insulation resistance measurement results and provide user interaction functions, such as starting measurement, stopping measurement, viewing historical data, etc.;
[0065] Control logic unit: responsible for coordinating the entire system, including starting measurements, processing data, calculating results, and responding to user interface instructions;
[0066] Storage module: used to save measurement data and historical records for analysis and backtracking;
[0067] Safety protection mechanism: Ensures that during the measurement process, the system can safely handle the vehicle's electrical system to avoid damage to the vehicle or operators.
[0068] Preferably, the insulation resistance detection circuit includes: a first voltage-dividing resistor R1 and a second voltage-dividing resistor R2 for voltage acquisition, an insulation detection resistor R3 and an insulation detection relay K1, Rp and Rn are equivalent models of the insulation resistance to be detected (i.e., the first equivalent insulation resistance Rp and the second equivalent insulation resistance Rn), and Cp and Cn are equivalent models of Y capacitors (i.e., the first equivalent Y capacitor Cp and the second equivalent Y capacitor Cn).
[0069] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the vehicle insulation resistance calculation method described in the present invention when executing the computer program.
[0070] The present invention also provides a vehicle, comprising the electronic device of the present invention.
[0071] Beneficial effects of the present invention:
[0072] The vehicle insulation resistance measurement method of the present invention can more accurately obtain the voltage-time function relationship when the insulation detection resistor is connected or not through fitting, and does not require filtering of any collected values, effectively improving the measurement efficiency and accuracy of the insulation resistance; when it is determined that the equivalent capacitance charging and discharging is not complete, the voltage stability value can be quickly obtained by curve fitting the voltage and time data of a preset number of times, shortening the time required for measurement; the entire measurement process involves collecting data according to a preset period, automatically calculating the voltage estimation value and the stability value, reducing manual intervention and improving the degree of automation; the voltage stability value is determined by comparing the difference between two consecutive voltage estimation values, ensuring the stability of the measurement result; this method is not only applicable to the case where the insulation detection resistor is not connected, but also to the case where it is connected, and has good applicability; accurate insulation resistance measurement helps to timely discover vehicle insulation problems, thereby improving the safety of vehicle operation, and has promotion and application value in the field of battery management system technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 A first flow chart of the method for calculating vehicle insulation resistance of the present invention;
[0074] Figure 2It is a structural diagram of the insulation resistance detection circuit;
[0075] Figure 3 Schematic diagram of the voltage change of U1 / U2 when K1 switch is switched;
[0076] Figure 4 A second flow chart of the method for calculating vehicle insulation resistance of the present invention;
[0077] Figure 5 Schematic diagram of the system reaching a stable state when t≤2000ms;
[0078] Figure 6 The first schematic diagram is when t≤2000ms and the system has not reached a stable state;
[0079] Figure 7 The second schematic diagram is when t≤2000ms and the system has not reached a stable state;
[0080] Figure 8 This is a schematic diagram of voltage changes (U1 end) under normal conditions;
[0081] Figure 9 This is a schematic diagram of voltage changes (U1 end) under abnormal conditions;
[0082] Figure 10 Schematic diagram of voltage change (U1 end) when the insulation state changes. DETAILED DESCRIPTION
[0083] The following describes the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art will readily appreciate the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments, and the various details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are intended only to illustrate the present invention and are not intended to limit the scope of protection of the present invention.
[0084] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.
[0085] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details.
[0086] The present invention aims to disclose a method, system, electronic device and vehicle for measuring the insulation resistance of a vehicle, so as to solve the problems of inaccurate measurement results, long measurement time and low efficiency in existing insulation resistance measurement methods.
[0087] Among them, such as Figure 1 As shown, a method for measuring the insulation resistance of a vehicle includes the following steps:
[0088] S1, when the insulation detection resistor R3 is not connected to the insulation resistance detection circuit, collecting the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the first duration of time when the insulation detection resistor R3 is not connected according to a preset period;
[0089] S2. When the first duration is greater than the preset time, it is determined that the equivalent capacitor charge and discharge are not completed, and then a first functional relationship between the positive electrode-to-ground voltage and the negative electrode-to-ground voltage and the corresponding time are respectively fitted according to the first preset number of times collected when the insulation detection resistor R3 is not connected, to obtain a first functional relationship between the positive electrode-to-ground voltage and the time, and a second functional relationship between the negative electrode-to-ground voltage and the time when the insulation detection resistor R3 is not connected;
[0090] S3, according to the first functional relationship, starting from the first duration, and calculating the estimated value of the positive electrode voltage to ground according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the estimated value of the j-1th first negative electrode-to-ground voltage calculated, j ≥ 1, j is a positive integer;
[0091] S4. When the insulation detection resistor R3 is connected to the insulation resistance detection circuit, the positive electrode-to-ground voltage stability value U1′ and the negative electrode-to-ground voltage stability value U2′ of the insulation detection resistor R3 are obtained according to the method of S1 to S3;
[0092] S5. Calculate the vehicle insulation resistance based on the insulation detection resistance R3, the positive pole-to-ground voltage stability value U1, the negative pole-to-ground voltage stability value U2, the positive pole-to-ground voltage stability value U1′, and the negative pole-to-ground voltage stability value U2′.
[0093] The corresponding time is a first duration during which the insulation detection resistor R3 is not connected when the positive electrode-to-ground voltage and the negative electrode-to-ground voltage are collected for a corresponding number of times.
[0094] Exemplarily, the insulation detection resistor R3 may be a single resistor, or may be composed of multiple resistors connected in series or in parallel.
[0095] In some embodiments, in S2 and S4, AI curve fitting is used. The AI curve fitting adopts the least square method, takes time as the independent variable and voltage as the dependent variable, and performs k-order polynomial fitting to obtain the polynomial function as shown in formula (I):
[0096] f(t)=a0+a1*t+a2*t 2 +…+a k *t k (I)
[0097] In formula (I), a0, a1, a2...a k is a coefficient, k represents the number of sampling times, f(t) represents the voltage, and t represents the time corresponding to the voltage sampling. The voltage f(t) is the voltage of the positive and negative electrodes relative to ground when the insulation detection resistor R3 is connected or not. The time t is the duration of the insulation detection resistor R3 being connected or not when the positive and negative electrodes relative to ground voltages are sampled for the corresponding number of times.
[0098] The least squares method finds the best function matching of the actual sampling points by minimizing the sum of squares of the errors, as shown in formula (II):
[0099]
[0100] Substituting formula (I) into formula (II) yields formula (III):
[0101]
[0102] Where i = 1, 2, 3, ..., n.
[0103] By formula (III) a0, a1, a2...a k Find the partial derivative and set equation (III) to 0 to solve a0, a1, a2…a k , i=1, 2, 3, ..., n, n is a positive integer, t i Indicates the time corresponding to the i-th voltage acquisition, u i represents the voltage collected for the i-th time;
[0104] Among them, when the actual sampling point is the sampling point of the positive electrode-to-ground voltage stable value U1, the first functional relationship obtained by solving is shown in Formula (IV); when the actual sampling point is the sampling point of the negative electrode-to-ground voltage stable value U2, the second functional relationship obtained by solving is shown in Formula (V); when the actual sampling point is the sampling point of the positive electrode-to-ground voltage stable value U1′, the third functional relationship obtained by solving is shown in Formula (VI); when the actual sampling point is the sampling point of the negative electrode-to-ground voltage stable value U2′, the fourth functional relationship obtained by solving is shown in Formula (VII);
[0105] f1(t)=a 01 +a 11 *t+a 21 *t 2 +…+a k1 *t k (IV)
[0106] f2(t)=a 02 +a 12 *t+a 22 *t 2 +…+a k2 *t k (V)
[0107] f1′(t)=a′ 01 +a′ 11 *t+a′ 21 *t 2 +…+a′ k1 *t k (VI)
[0108] f2′(t)=a′ 02 +a′ 12 *t+a′ 22 *t 2 +…+a′ k2 *t k (VII);
[0109] Among them, in formula (IV), formula (V), formula (VI) and formula (VII), a 01 、a 11 、a 21 …a k1 、a 02 、a 12 、a 22 …a k2 , a′ 01 , a′ 11 , a′ 21 …a′ k1 , a′ 02 , a′ 12 , a′ 22…a′ k2 is the coefficient; k represents the number of sampling times; f1(t) represents the voltage collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1; a k1 represents the time when the voltage is collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1; f2(t) represents the voltage collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2; a k2 represents the time when the voltage is collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2; f1′(t) represents the voltage collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1′; a′ k1 represents the time when the voltage is collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1′; f2′(t) represents the voltage collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2′; a′ k2 Indicates the time corresponding to the voltage collection when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2′.
[0110] In some embodiments, if the insulation state changes during the measurement process, the measurement method further includes:
[0111] When the insulation detection resistor R3 is not connected, the actual sampling point of the positive-to-ground voltage stability value U1 is substituted into equation (IV) to obtain the function f1 未接入 (t); When the insulation detection resistor R3 is disconnected again after being connected, the actual sampling point of the positive electrode to ground voltage stable value U1 is substituted into formula (IV) to solve the function f1 再次未接入 (t);
[0112] comparison function f1 未接入 (t) and f1 再次未接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected after being connected and recalculated. The set difference can be set according to the actual situation.
[0113] When function f1 未接入 (t) and f1 再次未接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f1 未接入 (t) and f1 再次未接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, then connect the insulation detection resistor R3 and then disconnect it and recalculate until the function f1 未接入 (t) and f1 再次未接入 (t) all satisfy monotonicity.
[0114] In some embodiments, if the insulation state changes during the measurement process, the measurement method further includes, when the insulation detection resistor R3 is not connected, substituting the actual sampling point of the negative electrode to ground voltage stable value U2 into formula (V) to solve the function f2 未接入 (t); When the insulation detection resistor R3 is disconnected again after being connected, the actual sampling point of the negative electrode to ground voltage stability value U2 is substituted into formula (V) to solve the function f2 再次未接入 (t);
[0115] comparison function f2 未接入 (t) and f2 再次未接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected after being connected and recalculated.
[0116] When function f2 未接入 (t) and f2 再次未接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f2 未接入 (t) and f2 再次未接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, then connect the insulation detection resistor R3 and then disconnect it and recalculate until the function f2 未接入 (t) and f2 再次未接入 (t) all satisfy monotonicity.
[0117] In some embodiments, if the insulation state changes during the measurement process, the measurement method further includes, when the insulation detection resistor R3 is connected, substituting the actual sampling point of the positive electrode to ground voltage stable value U1′ into formula (VI) to solve the function f1′ 接入 (t); When the insulation detection resistor R3 is disconnected and then connected again, the actual sampling point of the positive electrode to ground voltage stable value U1′ is substituted into formula (VI) to solve the function f1′ 再次接入 (t);
[0118] Comparison function f1′ 接入 (t) and f1′ 再次接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected and then connected again to recalculate.
[0119] When the function f1′ 接入 (t) and f1′ 再次接入 (t) The difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f1′ 接入 (t) and f1′ 再次接入(t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, disconnect the insulation detection resistor R3 and then connect it again and recalculate until the function f1′ 接入 (t) and f1′ 再次接入 (t) all satisfy monotonicity.
[0120] In some embodiments, if the insulation state changes during the measurement process, the measurement method further includes, when the insulation detection resistor R3 is connected, substituting the actual sampling point of the negative electrode to ground voltage stable value U2′ into equation (VII) to solve for the function f2′ 接入 (t); When the insulation detection resistor R3 is disconnected and then connected again, the actual sampling point of the negative electrode to ground voltage stable value U2′ is substituted into formula (VII) to solve the function f2′ 再次接入 (t);
[0121] Comparison function f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected and then connected again to recalculate.
[0122] When the function f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f2′ 接入 (t) and f2′ 再次接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, disconnect the insulation detection resistor R3 and then connect it again and recalculate until the function f2′ 接入 (t) and f2′ 再次接入 (t) all satisfy monotonicity.
[0123] like Figure 2 As shown, referring to the national standard method, the insulation resistance detection circuit includes: a first voltage-dividing resistor R1 and a second voltage-dividing resistor R2 for voltage acquisition, an insulation detection resistor R3 and an insulation detection switch K1, Rp and Rn are the insulation resistance equivalent models to be detected (i.e., the first equivalent insulation resistance Rp and the second equivalent insulation resistance Rn), and Cp and Cn are Y capacitor equivalent models (i.e., the first equivalent Y capacitor Cp and the second equivalent Y capacitor Cn).
[0124] Where Rp is the equivalent insulation resistance of the main positive terminal to the low-voltage ground, Cp is the equivalent Y-capacitor of the main positive terminal to the low-voltage ground, Rn is the equivalent insulation resistance of the main negative terminal to the low-voltage ground, and Cn is the equivalent Y-capacitor of the main negative terminal to the low-voltage ground. In this application, the insulation resistance of the negative terminal to the ground is less than the insulation resistance of the positive terminal to the ground, that is, Rn < Rp.
[0125] When the K1 switch is off, the resistor R3 is not connected to the circuit, U1 is the voltage between the positive terminal of the battery (BAT+) and the ground, and U2 is the voltage between the negative terminal of the battery (BAT-) and the ground.
[0126] When the K1 switch is closed, the resistor R3 is connected to the circuit, U1′ is the voltage between the positive terminal of the battery (BAT+) and the ground, and U2′ is the voltage between the negative terminal of the battery (BAT-) and the ground.
[0127] According to the national standard, the insulation resistance Rn = R3*((U2′ / U2)-(U1′ / U1)).
[0128] When the K1 switch is switched, the connected resistance value changes. Due to the influence of the charging and discharging of the equivalent capacitance Cp / Cn, the voltage across the corresponding Rn / Rp tends to stabilize after a period of delay, such as Figure 3 As shown, when the equivalent capacitance Cp / Cn is charged and discharged and the system is in a stable state, the data U1 and U2 collected are used for calculation to ensure the authenticity of the insulation resistance.
[0129] The existing national standard method for calculating insulation resistance is a calculation method based on an ideal model. The prerequisite for accurately calculating the insulation resistance using the national standard method is that U1, U2, U1′, and U2′ used in the calculation must reach a stable state. In actual applications, when the K1 switch is switched, due to the influence of the charging and discharging of the equivalent capacitance Cp / Cn, the voltage across the corresponding Rn / Rp tends to stabilize after a delay. The larger the insulation resistance value, the longer the corresponding equivalent capacitance charges, and the longer the acquisition time. Due to the influence of voltage acquisition accuracy, the voltage acquisition process of U1 and U2 may contain individual data with large errors, which affects the insulation resistance calculation. Therefore, the present application provides a method for measuring the insulation resistance of electric vehicles. By fitting the collected data, the insulation resistance can be quickly calculated, the reliability of the vehicle can be improved, and the safety of the vehicle can be ensured.
[0130] In some embodiments, in the insulation resistance detection circuit, when K1 is disconnected, that is, when the insulation detection resistor R3 changes from being connected to being disconnected from the insulation resistance detection circuit, U1 increases and U2 decreases. The measurement method includes the following steps:
[0131] 1) Collect the positive pole to ground voltage U1[N-1] and the negative pole to ground voltage U2[N-1] at every preset period. When the number of collections reaches N times, calculate the average value U1 of the collected N positive pole to ground voltages U1[N-1] AVR And the average value U2 of the N-times negative pole to ground voltage U2[N-1] AVR , calculate the absolute value of the positive voltage to ground ΔU1[n]=|U1[n]-U1 AVR |, the absolute value of the negative voltage to ground ΔU2[n]=|U2[n]-U2 AVRWhen either the absolute value ΔU1[n] of the positive electrode voltage relative to ground or the absolute value ΔU2[n] of the negative electrode voltage relative to ground is greater than or equal to a second preset voltage, it is determined that the capacitor charge and discharge are not complete; wherein N represents the number of acquisitions, the value of N is a positive integer, and n is an array subscript, n=N-1;
[0132] 2) Continue to collect the positive pole-to-ground voltage U1[N-1] and the negative pole-to-ground voltage U2[N-1] every preset period, and calculate and update the average value U1 of the positive pole-to-ground voltage after each collection. AVR And the average value of the negative pole to ground voltage U2 AVR , and the corresponding absolute value of the positive electrode-to-ground voltage ΔU1[n] and the absolute value of the negative electrode-to-ground voltage ΔU2[n], if the first duration in which the insulation detection resistor R3 is not connected is greater than the preset time, and any one of the absolute value of the positive electrode-to-ground voltage ΔU1[n] and the absolute value of the negative electrode-to-ground voltage ΔU2[n] is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0133] 3) performing AI curve fitting on the positive electrode-to-ground voltage and the negative electrode-to-ground voltage for the first preset number of times collected when the insulation detection resistor R3 is not connected and the corresponding time, respectively, to obtain a first functional relationship between the positive electrode-to-ground voltage and time, and a second functional relationship between the negative electrode-to-ground voltage and time;
[0134] 4) According to the first functional relationship, the estimated value of the positive electrode-to-ground voltage is calculated by incrementing the first duration as the initial time according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the calculated estimated value of the j-1th first negative electrode voltage to ground.
[0135] In some embodiments, in step 1), when the absolute values of all positive electrode-to-ground voltages ΔU1[n] and the absolute values of all negative electrode-to-ground voltages ΔU2[n] are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value of the positive electrode-to-ground voltage U1 is used as the value. AVR As the positive pole to ground voltage stable value U1, the negative pole to ground voltage average value U2 AVR As the negative pole to ground voltage stable value U2.
[0136] In some embodiments, in step 2), during the process of continuing to collect the positive electrode-to-ground voltage U1[N-1] and the negative electrode-to-ground voltage U2[N-1], if the first duration during which the insulation detection resistor R3 is not connected is less than or equal to the preset time, and the absolute values ΔU1[n] of all the positive electrode-to-ground voltages and the absolute values ΔU2[n] of all the negative electrode-to-ground voltages are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1 of the positive electrode-to-ground voltage is calculated to be updated. AVR As the positive pole to ground voltage stable value U1, to calculate the updated negative pole to ground voltage average value U2 AVR As the negative pole to ground voltage stable value U2.
[0137] For example, Figure 4 As shown, in the insulation resistance detection circuit, when K1 is disconnected, that is, when the insulation detection resistor R3 changes from being connected to the circuit to being disconnected, U1 increases and U2 decreases. The measurement method includes the following steps:
[0138] 1) The positive-to-ground voltage U1[N-1] (i.e. Figure 2 The voltage of BAT+ to ground) and the negative voltage to ground U2[N-1] (i.e. Figure 2 The collected values are stored in U1
[200] and U2
[200] . For example, the first sampling voltage value is cached in U1[0] and U2[0], and the Nth sampling voltage value is cached in U1[N-1] and U2[N-1]. The first duration t1 of the K1 disconnection state is recorded. N =10ms*N;
[0139] When the number of acquisitions N reaches 50, calculate the average value U1 of all the positive electrode to ground voltages U1[N-1] acquired AVR , and calculate the average value U2 of all the negative pole-to-ground voltages U2[N-1] collected AVR , then calculate the absolute value of the positive voltage to ground ΔU1[n]=|U1[n]-U1 AVR |, the absolute value of the negative voltage to ground ΔU2[n]=|U2[n]-U2 AVR|; When the absolute value of the positive electrode voltage to ground ΔU1[n] and the absolute value of the negative electrode voltage to ground ΔU2[n] are both less than the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are completed; then the average value of the positive electrode voltage to ground U1 AVR As the positive pole to ground voltage stable value U1, the negative pole to ground voltage average value U2 AVR As the negative electrode to ground voltage stable value U2; in this embodiment, the second preset voltage is 3V; wherein N represents the number of acquisitions, the value of N is a positive integer, and n represents the array subscript, n = N-1, that is, n = 0 for the first sampling, n = 1 for the second sampling, and so on;
[0140] 2) When any one of the absolute value of the positive electrode to ground voltage ΔU1[n] and the absolute value of the negative electrode to ground voltage ΔU2[n] is greater than or equal to the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are not completed; continue to collect the positive electrode to ground voltage U1[N-1] and the negative electrode to ground voltage U2[N-1] every 10ms, put the collected values into U1
[200] and U2
[200] , and calculate and update the average value U1 of the positive electrode to ground voltage after each collection. AVR And the average value of the negative pole to ground voltage U2 AVR , and the corresponding absolute value of the positive electrode voltage to ground ΔU1[n] and the absolute value of the negative electrode voltage to ground ΔU2[n], if the first duration of the insulation detection resistor R3 not being connected is less than or equal to the preset time, when the calculated updated absolute value of the positive electrode voltage to ground ΔU1[n] and the absolute value of the negative electrode voltage to ground ΔU2[n] are both less than the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are complete, such as Figure 5 As shown; then calculate the updated average value of the positive pole to ground voltage U1 AVR As the positive pole to ground voltage stable value U1, to calculate the updated negative pole to ground voltage average value U2 AVR As the negative electrode to ground voltage stability value U2; wherein, the preset time is 2000ms, which is equivalent to 200 acquisition times;
[0141] 3) If the first duration during which the insulation detection resistor R3 is not connected is greater than the preset time, and any one of the updated absolute value of the positive electrode voltage to ground ΔU1[n] and the absolute value of the negative electrode voltage to ground ΔU2[n] is still greater than or equal to the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are not completed, such as Figure 6 and Figure 7As shown; then, the positive electrode-to-ground voltage U1
[200] collected for the first 200 times (i.e., the first preset number of times) when the insulation detection resistor R3 is not connected and the corresponding time are fitted with the AI curve to obtain the first functional relationship between the positive electrode-to-ground voltage and time, that is, the first 200 discrete data collected are fitted into the first functional relationship f1(t); the negative electrode-to-ground voltage U2
[200] collected for the first 200 times and the corresponding time are fitted with the AI curve to obtain the second functional relationship between the negative electrode-to-ground voltage and time, that is, the first 200 discrete data collected are fitted into the second functional relationship f2(t);
[0142] In this embodiment, the least squares method is used and the calculation method is as follows:
[0143] (t1,u1),(t2,u2)……(t n ,u n ), represents the actual sampling point of U1 in the coordinate system, t represents time, and u represents voltage, and is substituted into formula (IV) to obtain the following n sets of equations:
[0144] ......
[0146]
[0147] The least squares method finds the best function matching of the actual sampling point by minimizing the sum of squares of the errors. Substituting the above n sets of equations into formula (II) yields:
[0148]
[0149] ……………………
[0150]
[0151] The above equations can be summarized as follows:
[0152]
[0153] ………………
[0154]
[0155] The above equation can be expressed as a matrix:
[0156]
[0157] Solve the above equations to obtain the parameters a0, a1, a2…a k , thus solving the first functional relationship f1(t); similarly solving the second functional relationship f2(t);
[0158] 4) According to the first functional relationship f1(t), the first duration (in this embodiment, the first duration is 2000 ms) is used as the initial time, and the periodic increment (in this embodiment, the increment is 10 ms) is performed, and the corresponding positive-to-ground voltage estimate is calculated until the difference between the subsequent positive-to-ground voltage estimate U1[tn] and the previous positive-to-ground voltage estimate U1[tn-1] is less than the first preset voltage. Then, the subsequent positive-to-ground voltage estimate U1[tn] is used as the positive-to-ground voltage stable value U1 when the insulation detection resistor R3 is not connected; that is, ΔU1[t]=U1[tn]-U1[tn-1], until ΔU1[t]<the first preset voltage, U1[tn] is assigned to U1 for calculating the insulation resistance, where ΔU1[t] represents the difference between the subsequent positive-to-ground voltage estimate U1[tn] and the previous positive-to-ground voltage estimate U1[tn-1], and the first preset voltage is 0.3V;
[0159] According to the second functional relationship f2(t), the first duration (in this embodiment, the first duration is 2000 ms) is used as the initial time, and the periodic increment (in this embodiment, the increment is 10 ms) is performed, and the corresponding negative pole-to-ground voltage estimate is calculated until the difference between the subsequent negative pole-to-ground voltage estimate U2[tn] and the previous negative pole-to-ground voltage estimate U2[tn-1] is less than the first preset voltage. Then, the subsequent negative pole-to-ground voltage estimate U2[tn] is used as the negative pole-to-ground voltage stable value U2 when the insulation detection resistor R3 is not connected; that is, ΔU2[t]=U2[tn]-U2[tn-1], until ΔU2[t] is less than the first preset voltage, U2[tn] is assigned to U2 for calculating the insulation resistance, where ΔU2[t] represents the difference between the subsequent negative pole-to-ground voltage estimate U2[tn] and the previous negative pole-to-ground voltage estimate U2[tn-1], and the first preset voltage is 0.3V.
[0160] 5) If the insulation state changes during the measurement process, an incorrect calculation result will be obtained. The corrective measures are as follows:
[0161] (1) When K1 is disconnected for the first time, that is, the insulation detection resistor R3 is not connected, the function f1 is generated 未接入 (t), f2 未接入 (t), let K1 be disconnected for the second time, that is, the insulation detection resistor R3 is disconnected again after being connected, and generate function f1 再次未接入 (t), f2 再次未接入 (t); compare two functions f1 未接入 (t) and f1 再次未接入 (t) The difference between the minimum and maximum values, and f2 未接入 (t) and f2 再次未接入(t) The difference between the minimum value and the maximum value; if the difference between the minimum value and the maximum value is greater than the set difference, the switch state needs to be switched. Even if the insulation detection resistor R3 is connected and then disconnected and recalculated, the voltage change under normal conditions is as follows: Figure 8 As shown, the voltage changes in abnormal conditions are as follows Figure 9 As shown;
[0162] (2) By function f1 未接入 (t), f1 再次未接入 (t), f2 未接入 (t) and f2 再次未接入 (t) The monotonicity of the function can be determined by taking the derivative; if one of them does not meet the monotonicity, the insulation detection resistor R3 is connected and then disconnected and the calculation is repeated until the function f1 未接入 (t), f1 再次未接入 (t), f2 未接入 (t) and f2 再次未接入 (t) all satisfy monotonicity.
[0163] like Figure 10 The function f1 is shown in the disconnected K1 state. 再次未接入 If (t) does not satisfy monotonicity, it is necessary to switch the switch state and recalculate.
[0164] In some embodiments, in the insulation resistance detection circuit, when K1 is closed and the insulation detection resistor R3 is switched from being disconnected to being connected to the insulation resistance detection circuit, U1 decreases and U2 increases. The measurement method includes the following steps:
[0165] 1) Collect the positive pole-to-ground voltage U1′[N-1] and the negative pole-to-ground voltage U2′[N-1] at every preset period. When the number of collections reaches N times, calculate the average value U1′ of the N collected positive pole-to-ground voltages U1′[N-1] AVR and the average value U2′ of the N-times negative pole-to-ground voltage U2′[N-1] AVR , calculate the absolute value of the positive electrode to ground voltage ΔU1′[n]=|U1′[n]-U1′ AVR |, the absolute value of the negative pole voltage to ground ΔU2′[n]=|U2′[n]-U2′ AVR When either the absolute value ΔU1′[n] of the positive electrode voltage relative to ground or the absolute value ΔU2′[n] of the negative electrode voltage relative to ground is greater than or equal to a second preset voltage, it is determined that the capacitor charge and discharge are not complete; wherein N represents the number of acquisitions, the value of N is a positive integer, and n is an array subscript, n=N-1;
[0166] 2) Continue to collect the positive pole-to-ground voltage U1′[N-1] and the negative pole-to-ground voltage U2′[N-1] once every preset period, and calculate and update the average value U1′ of the positive pole-to-ground voltage after each collection. AVR and the average value of the negative pole voltage to ground U2′ AVR , and the corresponding absolute value of the positive electrode-to-ground voltage ΔU1′[n] and the absolute value of the negative electrode-to-ground voltage ΔU2′[n], if the second duration of the connection of the insulation detection resistor R3 is greater than the preset time, and any one of the absolute value of the positive electrode-to-ground voltage ΔU1′[n] and the absolute value of the negative electrode-to-ground voltage ΔU2′[n] is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0167] 3) performing AI curve fitting based on the collected positive-pole-to-ground voltage and negative-pole-to-ground voltage for the first second preset number of times when the insulation detection resistor R3 is connected and the corresponding time, respectively, to obtain a third functional relationship between the positive-pole-to-ground voltage and time, and a fourth functional relationship between the negative-pole-to-ground voltage and time;
[0168] 4) According to the third functional relationship, the second duration is used as the initial time, and the positive electrode-to-ground voltage estimation value is calculated according to the preset period until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive-to-ground voltage stability value U1′ connected as the insulation detection resistor R3, where U1′ j is the estimated value of the jth second positive electrode to ground voltage, U1′ j-1 is the calculated j-1 second positive electrode to ground voltage estimate value; according to the fourth functional relationship, the negative electrode to ground voltage estimate value is calculated by incrementing the second duration as the initial time according to the preset period until the obtained U2′ j -U2′ j-1 When the voltage is less than the first preset voltage, U2′ j The negative pole to ground voltage stability value U2′ connected as the insulation detection resistor R3, where U2′ j is the estimated value of the j-th second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode voltage to ground.
[0169] In some embodiments, in step 1), when the absolute values of all positive electrode-to-ground voltages ΔU1′[n] and the absolute values of all negative electrode-to-ground voltages ΔU2′[n] are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1′ of the positive electrode-to-ground voltage is used as the value of the negative electrode-to-ground voltage. AVR As the positive electrode to ground voltage stable value U1 ', the negative electrode to ground voltage average value U2 ' AVRAs the negative pole to ground voltage stable value U2 '.
[0170] In some embodiments, in step 2), during the process of continuing to collect the positive electrode to ground voltage U1′[N-1] and the negative electrode to ground voltage U2′[N-1], if the second duration of the insulation detection resistor R3 being connected is less than or equal to the preset time, and the absolute values ΔU1′[n] of all positive electrode to ground voltages and the absolute values ΔU2′[n] of all negative electrode to ground voltages are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the updated average value U1′ of the positive electrode to ground voltage is calculated. AVR As the positive electrode to ground voltage stable value U1', to calculate the updated negative electrode to ground voltage average value U2' AVR As the negative pole to ground voltage stable value U2 '.
[0171] For example, Figure 4 As shown, in the insulation resistance detection circuit, when K1 is closed, that is, when the insulation detection resistor R3 is switched from being disconnected to being connected to the insulation resistance detection circuit, U1 decreases and U2 increases. The measurement method includes the following steps:
[0172] 1) The positive-to-ground voltage U1′[N-1] (i.e. Figure 2 The voltage of BAT+ to ground) and the negative voltage to ground U2′[N-1] (i.e. Figure 2 The collected values are stored in U1′
[200] and U2′
[200] . For example, the first sampling voltage value is cached in U1′[0] and U2′[0], and the Nth sampling voltage value is cached in U1′[N-1] and U2′[N-1]. The second duration t2 of the closed state of K1 is recorded. N =10ms*N;
[0173] When the number of acquisitions N reaches 50, calculate the average value U1′ of all the positive electrode to ground voltages U1′[N-1] acquired AVR , and calculate the average value U2′ of all the negative pole-to-ground voltages U2′[N-1] collected AVR , then calculate the absolute value of the positive electrode to ground voltage ΔU1′[n]=|U1′[n]-U1′ AVR |, the absolute value of the negative pole voltage to ground ΔU2′[n]=|U2′[n]-U2′ AVR |; When the absolute value of the positive electrode voltage to ground ΔU1′[n] and the absolute value of the negative electrode voltage to ground ΔU2′[n] are both less than the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are completed; then the average value of the positive electrode voltage to ground U1′ AVR As the positive electrode to ground voltage stable value U1 ', the negative electrode to ground voltage average value U2 ' AVRAs the negative electrode to ground voltage stable value U2'; in this embodiment, the second preset voltage is 3V; wherein N represents the number of acquisitions, the value of N is a positive integer, and n represents the array subscript, n = N-1, that is, n = 0 for the first sampling, n = 1 for the second sampling, and so on;
[0174] 2) When either the absolute value of the positive electrode-to-ground voltage ΔU1′[n] or the absolute value of the negative electrode-to-ground voltage ΔU2′[n] is greater than or equal to the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are not completed; the positive electrode-to-ground voltage U1′[N-1] and the negative electrode-to-ground voltage U2′[N-1] are continuously collected every 10ms, and the collected values are stored in U1′
[200] and U2′
[200] , and the average value U1′ of the positive electrode-to-ground voltage is calculated and updated after each collection. AVR and the average value of the negative pole voltage to ground U2′ AVR , and the corresponding absolute value of the positive electrode to ground voltage ΔU1′[n] and the absolute value of the negative electrode to ground voltage ΔU2′[n], if the second duration of the insulation detection resistor R3 being connected is less than or equal to the preset time, when the calculated updated absolute value of the positive electrode to ground voltage ΔU1′[n] and the absolute value of the negative electrode to ground voltage ΔU2′[n] are both less than the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are complete; then the updated average value of the positive electrode to ground voltage U1′ is calculated. AVR As the positive electrode to ground voltage stable value U1', to calculate the updated negative electrode to ground voltage average value U2' AVR As the negative electrode to ground voltage stability value U2'; wherein, the preset time is 2000ms, that is, the number of collection times is 200 times;
[0175] 3) If the second duration of the connection of the insulation detection resistor R3 is greater than the preset time, and any one of the absolute value of the positive electrode-to-ground voltage ΔU1′[n] and the absolute value of the negative electrode-to-ground voltage ΔU2′[n] calculated and updated is still greater than or equal to the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn are not completed; then, the positive electrode-to-ground voltage U1′
[200] collected for the first 200 times (i.e., the second preset number of times) when the insulation detection resistor R3 is connected is fitted with the corresponding time through the AI curve to obtain a third functional relationship between the positive electrode-to-ground voltage and the corresponding time, that is, the first 200 discrete data collected are fitted into the functional relationship f1′(t); and the negative electrode-to-ground voltage U2′
[200] collected for the first 200 times and the corresponding time are fitted with the AI curve to obtain a fourth functional relationship between the negative electrode-to-ground voltage and the corresponding time, that is, the first 200 discrete data collected are fitted into the functional relationship f2′(t);
[0176] In this embodiment, the least squares method is used and the calculation method is as follows:
[0177] (t'1,u'1),(t'2,u'2)……(t' n ,u' n ), represents the actual sampling point of U1′ in the n-pair coordinate system, t represents time, and u represents voltage. Substitute it into formula (VI), and the subsequent calculation method is the same as the first functional relationship f1(t), so as to obtain the third functional relationship f1′(t); similarly, the fourth functional relationship f2′(t) is obtained.
[0178] 4) According to the third functional relationship f1′(t), the second duration (in this embodiment, the second duration is 2000ms) is used as the initial time, and the corresponding positive electrode to ground voltage estimation value is incremented periodically (in this embodiment, the increment is 10ms) until the difference between the next positive electrode to ground voltage estimation value U1′[tn] and the previous positive electrode to ground voltage estimation value U1′[tn-1] is less than the first preset voltage, then the next positive electrode to ground voltage estimation value U1′[tn-1] is used as the initial time. n] as the positive electrode to ground voltage stable value U1′ connected to the insulation detection resistor R3; that is, ΔU1′[t]=U1′[tn]-U1′[tn-1], until ΔU1′[t]<the first preset voltage, U1′[tn] is assigned to U1′ for calculating the insulation resistance, where ΔU1′[t] represents the difference between the subsequent positive electrode to ground voltage estimated value U1′[tn] and the previous positive electrode to ground voltage estimated value U1′[tn-1], and the first preset voltage is 0.3V;
[0179] According to the third functional relationship f2′(t), the second duration (in this embodiment, the second duration is 2000ms) is used as the initial time, and the corresponding negative electrode-to-ground voltage estimation value is incremented periodically (in this embodiment, the increment is 10ms) until the difference between the next negative electrode-to-ground voltage estimation value U2′[tn] and the previous negative electrode-to-ground voltage estimation value U2′[tn-1] is less than the first preset voltage. Then, the next negative electrode-to-ground voltage estimation value U2′[tn ] is used as the stable value of the negative pole-to-ground voltage U2′ connected to the insulation detection resistor R3; that is, ΔU2′[t]=U2′[tn]-U2′[tn-1], until ΔU2′[t]<the first preset voltage, U2′[tn] is assigned to U2′ for calculating the insulation resistance, where ΔU2′[t] represents the difference between the subsequent estimated value U2′[tn] of the negative pole-to-ground voltage and the previous estimated value U2′[tn-1] of the negative pole-to-ground voltage, and the first preset voltage is 0.3V;
[0180] 5) If the insulation state changes during the measurement process, an incorrect calculation result will be obtained. The corrective measures are as follows:
[0181] (1) When K1 is closed for the first time, that is, when the insulation detection resistor R3 is connected, the function relationship f1′ is generated. 接入 (t), f2′接入 (t), let K1 be closed for the second time, that is, when the insulation detection resistor R3 is disconnected and connected again, the function relationship f1′ is generated. 再次接入 (t), f2′ 再次接入 (t); compare two functions f1′ 接入 (t) and f1′ 再次接入 (t) The difference between the minimum and maximum values, and f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum and maximum values; if the difference between the minimum and maximum values is greater than the set difference, the switch state needs to be switched, even if the insulation detection resistor R3 is disconnected and then connected again for recalculation;
[0182] (2) When function f2′ 接入 (t) and f2′ 再次接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then f1′ 接入 (t), f1′ 再次接入 (t), f2′ 接入 (t), f2′ 再次接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, it is necessary to switch the switch state, even if the insulation detection resistor R3 is disconnected and then connected again and recalculated until the function f2′ 接入 (t) and f2′ 再次接入 (t) all satisfy monotonicity.
[0183] In some embodiments, a system for implementing the vehicle insulation resistance calculation method in the above embodiment is further provided, comprising:
[0184] Insulation resistance detection circuit;
[0185] A data acquisition module is used to collect, according to a preset period, the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the first duration of the insulation detection resistor R3 not being connected when the insulation detection resistor R3 is not connected, and the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the second duration of the insulation detection resistor R3 being connected when the insulation detection resistor R3 is connected;
[0186] A fitting module: used to determine that the equivalent capacitor charge and discharge are not completed when the first duration is greater than the preset time, and to obtain a first functional relationship between the positive electrode-to-ground voltage and the negative electrode-to-ground voltage when the insulation detection resistor R3 is not connected and the time by fitting the collected positive electrode-to-ground voltage and the negative electrode-to-ground voltage for the first preset number of times and the corresponding time, and to determine that the equivalent capacitor charge and discharge are not completed when the second duration is greater than the preset time, and to obtain a third functional relationship between the positive electrode-to-ground voltage and the time and the negative electrode-to-ground voltage when the insulation detection resistor R3 is connected and the time by fitting the collected positive electrode-to-ground voltage and the negative electrode-to-ground voltage for the second preset number of times and the corresponding time, respectively;
[0187] Voltage estimation and stable value calculation module: used to calculate the positive electrode to ground voltage estimation value according to the first functional relationship with the first duration as the initial time according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth positive electrode to ground voltage, U1 j-1 is the calculated j-1th positive electrode to ground voltage estimate; according to the second functional relationship, the negative electrode to ground voltage estimate is calculated by incrementing the first duration as the initial time according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the calculated j-1th first negative electrode to ground voltage estimate value; according to the third functional relationship, the second duration is used as the initial time and the positive electrode to ground voltage estimate value is calculated according to the preset period until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive-to-ground voltage stability value U1′ connected as the insulation detection resistor R3, where U1′ j is the estimated value of the jth second positive electrode to ground voltage, U1′ j-1 is the calculated j-1 second positive electrode to ground voltage estimate value; according to the fourth functional relationship, the negative electrode to ground voltage estimate value is calculated by incrementing the second duration as the initial time according to the preset period until the obtained U2′ j-U2′ j-1 When the voltage is less than the first preset voltage, U2′ j The negative pole to ground voltage stability value U2′ connected as the insulation detection resistor R3, where U2′ j is the estimated value of the j-th second negative electrode voltage to ground, U2′ j-1 is the estimated value of the j-1th second negative electrode voltage to ground obtained by calculation; j ≥ 1, j is a positive integer;
[0188] Insulation resistance calculation module: used to calculate the vehicle insulation resistance based on the insulation detection resistor R3, the positive pole to ground voltage stable value U1, the negative pole to ground voltage stable value U2, the positive pole to ground voltage stable value U1′ and the negative pole to ground voltage stable value U2′.
[0189] In some embodiments, the system further includes:
[0190] Time control unit: used to control the sampling period of the insulation resistance detection circuit and record the duration of whether the insulation detection resistor R3 is connected or not;
[0191] User interface module: used to display the insulation resistance measurement results and provide user interaction functions, such as starting measurement, stopping measurement, viewing historical data, etc.;
[0192] Control logic unit: responsible for coordinating the entire system, including starting measurements, processing data, calculating results, and responding to user interface instructions;
[0193] Storage module: used to save measurement data and historical records for analysis and backtracking;
[0194] Safety protection mechanism: Ensures that during the measurement process, the system can safely handle the vehicle's electrical system to avoid damage to the vehicle or operators.
[0195] In some embodiments, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for measuring the vehicle insulation resistance in any of the above embodiments are implemented.
[0196] In some embodiments, a vehicle is also provided, comprising the electronic device according to any of the above embodiments.
[0197] In summary, the vehicle insulation resistance measurement method of the present invention can more accurately obtain the voltage-time function relationship when the insulation detection resistor is connected or not through AI curve fitting, and there is no need to filter any collected values, which effectively improves the measurement efficiency and accuracy of the insulation resistance; when it is determined that the equivalent capacitance charging and discharging is not completed, the voltage stability value can be quickly obtained by curve fitting the voltage and time data of a preset number of times, shortening the time required for measurement; the entire measurement process involves collecting data according to a preset period, automatically calculating the voltage estimation value and the stability value, reducing manual intervention and improving the degree of automation; the voltage stability value is determined by comparing the difference between two consecutive voltage estimation values, ensuring the stability of the measurement results; this method is not only applicable to the case where the insulation detection resistor is not connected, but also to the case where it is connected, and has good applicability; accurate insulation resistance measurement helps to timely discover vehicle insulation problems, thereby improving the safety of vehicle operation, and has promotion and application value in the field of battery management system technology.
[0198] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, any equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be encompassed by the claims of this application.
Claims
1. A method for calculating vehicle insulation resistance, characterized in that: The following steps are involved: S1, when the insulation detection resistor R3 is not connected to the insulation resistance detection circuit, collecting the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the first duration of time when the insulation detection resistor R3 is not connected according to a preset period; S2. When the first duration is greater than a preset time, it is determined that the equivalent capacitor charge and discharge are not completed, and then, based on the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the first preset number of times when the insulation detection resistor R3 is not connected and the corresponding time, a first functional relationship between the positive electrode-to-ground voltage and time and a second functional relationship between the negative electrode-to-ground voltage and time are obtained when the insulation detection resistor R3 is not connected; S3, according to the first functional relationship, starting from the first duration, and calculating the estimated value of the positive electrode-to-ground voltage according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the estimated value of the j-1th first negative electrode-to-ground voltage calculated, j ≥ 1, j is a positive integer; S4. When the insulation detection resistor R3 is connected to the insulation resistance detection circuit, the positive electrode-to-ground voltage stability value U1′ and the negative electrode-to-ground voltage stability value U2′ of the insulation detection resistor R3 are obtained according to the method of S1 to S3; S5. Calculate the vehicle insulation resistance based on the insulation detection resistance R3, the positive pole-to-ground voltage stability value U1, the negative pole-to-ground voltage stability value U2, the positive pole-to-ground voltage stability value U1′, and the negative pole-to-ground voltage stability value U2′.
2. The calculation method according to claim 1, characterized in that: In S2 and S4, AI curve fitting is adopted. The AI curve fitting adopts the least square method, takes time as the independent variable and voltage as the dependent variable, and performs k-order polynomial fitting to obtain the polynomial function as shown in formula (I): f(t)=a0+a1*t+a2*t 2 +…+a k *t k (Ⅰ) In formula (I), a0, a1, a2...a k is the coefficient, k represents the number of sampling times, f(t) represents the voltage, and t represents the time corresponding to the voltage sampling; The least squares method seeks the best function matching of the actual sampling points by minimizing the sum of squares of the errors, as shown in formula (II): Substituting formula (I) into formula (II) yields formula (III): Through formula (III) a0, a1, a2…a k Find the partial derivative and set equation (III) to 0 to solve a0, a1, a2…a k , i=1,2,3,......,n,n is a positive integer, t i Indicates the time corresponding to the i-th voltage acquisition, u i represents the voltage collected for the i-th time; Among them, when the actual sampling point is the sampling point of the positive electrode-to-ground voltage stable value U1, the first functional relationship obtained by solving is shown in formula (IV); when the actual sampling point is the sampling point of the negative electrode-to-ground voltage stable value U2, the second functional relationship obtained by solving is shown in formula (V); when the actual sampling point is the sampling point of the positive electrode-to-ground voltage stable value U1′, the third functional relationship obtained by solving is shown in formula (VI); when the actual sampling point is the sampling point of the negative electrode-to-ground voltage stable value U2′, the fourth functional relationship obtained by solving is shown in formula (VII); f1(t)=a 01 +a 11 *t+a 21 *t 2 +…+a k1 *t k (Ⅳ) f2(t)=a 02 +a 12 *t+a 22 *t 2 +…+a k2 *t k (Ⅴ) f1'(t)=a' 01 +a' 11 *t+a' 21 *t 2 +…+a' k1 *t k (Ⅵ) f2'(t)=a' 02 +a' 12 *t+a' 22 *t 2 +…+a' k2 *t k (Ⅶ); Among them, in formula (IV), formula (V), formula (VI) and formula (VII), a 01 、a 11 、a 21 …a k1 、a 02 、a 12 、a 22 …a k2 、a' 01 、a' 11 、a' 21 …a' k1 、a' 02 、a' 12 、a' 22 …a' k2 is the coefficient; k represents the number of sampling times; f1(t) represents the voltage collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1; a k1 represents the time when the voltage is collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1; f2(t) represents the voltage collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2; a k2 represents the time when the voltage is collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2; f1'(t) represents the voltage collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1'; a' k1 represents the time when the voltage is collected when the actual sampling point is the sampling point of the positive electrode to ground voltage stable value U1'; f2'(t) represents the voltage collected when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2'; a' k2 Indicates the time corresponding to the voltage collection when the actual sampling point is the sampling point of the negative electrode to ground voltage stable value U2′.
3. The calculation method according to claim 2, characterized in that: If the insulation state changes during the measurement process, the measurement method also includes: When the insulation detection resistor R3 is not connected, the actual sampling point of the positive-to-ground voltage stability value U1 is substituted into equation (IV) to obtain the function f1 未接入 (t); When the insulation detection resistor R3 is disconnected again after being connected, the actual sampling point of the positive electrode to ground voltage stable value U1 is substituted into formula (IV) to solve the function f1 再次未接入 (t); comparison function f1 未接入 (t) and f1 再次未接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected after being connected and recalculated. When function f1 未接入 (t) and f1 再次未接入 (t) The difference between the minimum value and the maximum value is less than or equal to the set difference, then the function f1 未接入 (t) and f1 再次未接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, then connect the insulation detection resistor R3 and then disconnect it and recalculate until the function f1 未接入 (t) and f1 再次未接入 (t) all satisfy monotonicity; And / or, when the insulation detection resistor R3 is not connected, the actual sampling point of the negative electrode to ground voltage stability value U2 is substituted into formula (V) to solve the function f2 未接入 (t); When the insulation detection resistor R3 is disconnected again after being connected, the actual sampling point of the negative electrode to ground voltage stability value U2 is substituted into formula (V) to solve the function f2 再次未接入 (t); comparison function f2 未接入 (t) and f2 再次未接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected after being connected and recalculated. When function f2 未接入 (t) and f2 再次未接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then the function f2 未接入 (t) and f2 再次未接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, then connect the insulation detection resistor R3 and then disconnect it and recalculate until the function f2 未接入 (t) and f2 再次未接入 (t) all satisfy monotonicity; And / or, when the insulation detection resistor R3 is connected, the actual sampling point of the positive electrode to ground voltage stability value U1′ is substituted into equation (VI) to solve the function f1′ 接入 (t); When the insulation detection resistor R3 is disconnected and then connected again, the actual sampling point of the positive electrode to ground voltage stable value U1′ is substituted into formula (VI) to solve the function f1′ 再次接入 (t); Comparison function f1′ 接入 (t) and f1′ 再次接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected and then connected again to recalculate. When the function f1′ 接入 (t) and f1′ 再次接入 (t) If the difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f1′ 接入 (t) and f1′ 再次接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, disconnect the insulation detection resistor R3 and then connect it again and recalculate until the function f1′ 接入 (t) and f1′ 再次接入 (t) all satisfy monotonicity; And / or, when the insulation detection resistor R3 is connected, the actual sampling point of the negative electrode to ground voltage stability value U2′ is substituted into equation (VII) to solve the function f2′ 接入 (t); When the insulation detection resistor R3 is disconnected and then connected again, the actual sampling point of the negative electrode to ground voltage stable value U2′ is substituted into formula (VII) to solve the function f2′ 再次接入 (t); Comparison function f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum and maximum values. If the difference between the minimum and maximum values is greater than the set difference, the insulation detection resistor R3 is disconnected and then connected again to recalculate. When the function f2′ 接入 (t) and f2′ 再次接入 (t) The difference between the minimum value and the maximum value is less than or equal to the set difference, then for function f2′ 接入 (t) and f2′ 再次接入 (t) Derivative to determine the monotonicity of the function; if one of them does not meet the monotonicity, disconnect the insulation detection resistor R3 and then connect it again and recalculate until the function f2′ 接入 (t) and f2′ 再次接入 (t) all satisfy monotonicity.
4. The calculation method according to claim 1, characterized in that: When the insulation detection resistor R3 is switched from being connected to being disconnected from the insulation resistance detection circuit, U1 increases and U2 decreases. The measurement method includes the following steps: 1) Collect the positive pole to ground voltage U1[N-1] and the negative pole to ground voltage U2[N-1] at every preset period. When the number of collections reaches N times, calculate the average value U1 of the collected N positive pole to ground voltages U1[N-1] AVR And the average value U2 of the N-times negative pole to ground voltage U2[N-1] AVR , calculate the absolute value of the positive voltage to ground ΔU1[n]=|U1[n]-U1 AVR |, the absolute value of the negative voltage to ground ΔU2[n]=|U2[n]-U2 AVR When either the absolute value ΔU1[n] of the positive electrode voltage to ground or the absolute value ΔU2[n] of the negative electrode voltage to ground is greater than or equal to a second preset voltage, it is determined that the capacitor charge and discharge are not completed; wherein N represents the number of acquisitions, the value of N is a positive integer, and n is an array subscript, n=N-1; 2) Continue to collect the positive electrode to ground voltage U1[N-1] and the negative electrode to ground voltage U2[N-1] every preset period, and calculate and update the average value U1 of the positive electrode to ground voltage after each collection. AVR and the average value of the negative pole voltage to ground U2 AVR , and the corresponding absolute value of the positive electrode-to-ground voltage ΔU1[n] and the absolute value of the negative electrode-to-ground voltage ΔU2[n], if the first duration in which the insulation detection resistor R3 is not connected is greater than the preset time, and any one of the absolute value of the positive electrode-to-ground voltage ΔU1[n] and the absolute value of the negative electrode-to-ground voltage ΔU2[n] is greater than or equal to a second preset voltage, it is determined that the capacitor charging and discharging is not completed; 3) performing AI curve fitting on the positive electrode-to-ground voltage and the negative electrode-to-ground voltage for the first preset number of times collected when the insulation detection resistor R3 is not connected and the corresponding time, respectively, to obtain a first functional relationship between the positive electrode-to-ground voltage and time, and a second functional relationship between the negative electrode-to-ground voltage and time; 4) According to the first functional relationship, the first duration is used as the initial time, and the positive electrode voltage to ground estimation value is calculated according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the calculated estimated value of the j-1th first negative electrode voltage to ground.
5. The calculation method according to claim 4, characterized in that: In step 1), when the absolute values of all the positive electrode-to-ground voltages ΔU1[n] and the absolute values of all the negative electrode-to-ground voltages ΔU2[n] are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1 of the positive electrode-to-ground voltage is used as the reference voltage. AVR As the positive electrode to ground voltage stable value U1, the average value of the negative electrode to ground voltage U2 AVR As the negative pole to ground voltage stability value U2; Alternatively, in step 2), while continuing to collect the positive electrode-to-ground voltage U1[N-1] and the negative electrode-to-ground voltage U2[N-1], if the first duration during which the insulation detection resistor R3 is not connected is less than or equal to the preset time, and the absolute values of all the positive electrode-to-ground voltages ΔU1[n] and the absolute values of all the negative electrode-to-ground voltages ΔU2[n] are less than the second preset voltage, it is determined that the capacitor charging and discharging is completed, and the updated average value of the positive electrode-to-ground voltage U1 is calculated. AVR As the positive electrode to ground voltage stable value U1, to calculate the updated average value U2 of the negative electrode to ground voltage AVR As the negative pole to ground voltage stable value U2.
6. The calculation method according to claim 1, characterized in that: When the insulation detection resistor R3 is switched from being disconnected to being connected to the insulation resistance detection circuit, U1 decreases and U2 increases. The measurement method includes the following steps: 1) Collect the positive pole-to-ground voltage U1′[N-1] and the negative pole-to-ground voltage U2′[N-1] at every preset period. When the number of collections reaches N times, calculate the average value U1′ of the N collected positive pole-to-ground voltages U1′[N-1] AVR and the average value U2′ of the N-times negative pole-to-ground voltage U2′[N-1] AVR , calculate the absolute value of the positive electrode to ground voltage ΔU1′[n]=|U1′[n]-U1′ AVR |, the absolute value of the negative pole voltage to ground ΔU2′[n]=|U2′[n]-U2′ AVR When either the absolute value ΔU1′[n] of the positive electrode voltage to ground or the absolute value ΔU2′[n] of the negative electrode voltage to ground is greater than or equal to a second preset voltage, it is determined that the capacitor charge and discharge are not completed, where N represents the number of acquisitions, the value of N is a positive integer, and n is an array subscript, n=N-1; 2) Continue to collect the positive electrode to ground voltage U1′[N-1] and the negative electrode to ground voltage U2′[N-1] once every preset period, and calculate and update the average value U1′ of the positive electrode to ground voltage after each collection. AVR and the average value of the negative electrode voltage to ground U2′ AVR , and the corresponding absolute value ΔU1′[n] of the positive electrode-to-ground voltage and the absolute value ΔU2′[n] of the negative electrode-to-ground voltage. If the second duration of the connection of the insulation detection resistor R3 is greater than the preset time, and any one of the absolute value ΔU1′[n] of the positive electrode-to-ground voltage and the absolute value ΔU2′[n] of the negative electrode-to-ground voltage is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed; 3) According to the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the first second preset number of times when the insulation detection resistor R3 is connected, and the corresponding time, an AI curve fitting is performed to obtain a third functional relationship between the positive electrode-to-ground voltage and time, and a fourth functional relationship between the negative electrode-to-ground voltage and time; 4) According to the third functional relationship, the second duration is used as the initial time, and the positive electrode-to-ground voltage estimation value is calculated according to the preset period until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive-to-ground voltage stability value U1′ connected as the insulation detection resistor R3, where U1′ j is the estimated value of the jth second positive electrode to ground voltage, U1′ j-1 is the calculated j-1 second positive electrode to ground voltage estimate value; according to the fourth functional relationship, the second duration is used as the initial time and the negative electrode to ground voltage estimate value is calculated according to the preset period until the obtained U2′ j -U2′ j-1 When the voltage is less than the first preset voltage, U2′ j The negative pole to ground voltage stability value U2′ connected as the insulation detection resistor R3, where U2′ j is the estimated value of the j-th second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode voltage to ground.
7. The calculation method according to claim 6, characterized in that: In step 1), when the absolute values of all the positive electrode-to-ground voltages ΔU1′[n] and the absolute values of all the negative electrode-to-ground voltages ΔU2′[n] are less than the second preset voltage, it is determined that the charging and discharging of the capacitor is completed, and the average value U1′ of the positive electrode-to-ground voltage is used as the reference voltage. AVR As the positive electrode to ground voltage stable value U1 ', the average value U2' of the negative electrode to ground voltage AVR As the negative pole to ground voltage stability value U2'; Alternatively, in step 2), while continuing to collect the positive electrode-to-ground voltage U1′[N-1] and the negative electrode-to-ground voltage U2′[N-1], if the second duration of the insulation detection resistor R3 access is less than or equal to the preset time, and the absolute values ΔU1′[n] of all the positive electrode-to-ground voltages and the absolute values ΔU2′[n] of all the negative electrode-to-ground voltages are less than the second preset voltage, it is determined that the capacitor charging and discharging is complete, and the updated average value U1′ of the positive electrode-to-ground voltage is calculated. AVR As the positive electrode to ground voltage stable value U1 ', to calculate the updated negative electrode to ground voltage average value U2 ' AVR As the negative pole to ground voltage stable value U2 '.
8. A system for implementing the method for measuring the vehicle insulation resistance according to any one of claims 1 to 7, characterized in that: include: Insulation resistance detection circuit; A data acquisition module is used to collect, according to a preset period, the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the first duration of the insulation detection resistor R3 not being connected when the insulation detection resistor R3 is not connected, and the positive electrode-to-ground voltage, the negative electrode-to-ground voltage, and the second duration of the insulation detection resistor R3 being connected when the insulation detection resistor R3 is connected; A fitting module: used to determine that the equivalent capacitor charge and discharge are not completed when the first duration is greater than the preset time, and then fit the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the first preset number of times when the insulation detection resistor R3 is not connected and the corresponding time, respectively, to obtain a first functional relationship between the positive electrode-to-ground voltage and time when the insulation detection resistor R3 is not connected, and a second functional relationship between the negative electrode-to-ground voltage and time; and used to determine that the equivalent capacitor charge and discharge are not completed when the second duration is greater than the preset time, and then fit the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected for the second preset number of times when the insulation detection resistor R3 is connected and the corresponding time, respectively, to obtain a third functional relationship between the positive electrode-to-ground voltage and time when the insulation detection resistor R3 is connected, and a fourth functional relationship between the negative electrode-to-ground voltage and time; Voltage estimation and stable value calculation module: used to calculate the positive electrode to ground voltage estimation value according to the first functional relationship with the first duration as the initial time according to the preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the insulation detection resistor R3 is not connected to the positive electrode to ground voltage stability value U1, where U1 j is the estimated value of the jth first positive electrode to ground voltage, U1 j-1 is the calculated j-1th first positive electrode to ground voltage estimation value; according to the second functional relationship, the first duration is used as the initial time and the negative electrode to ground voltage estimation value is calculated according to the preset period until the obtained U2 j -U2 j-1 When the voltage is less than the first preset voltage, U2 j As the negative pole to ground voltage stability value U2 when the insulation detection resistor R3 is not connected, U2 j is the estimated value of the jth first negative electrode voltage to ground, U2 j-1 is the calculated j-1th first negative electrode to ground voltage estimate value; according to the third functional relationship, the second duration is used as the initial time and the positive electrode to ground voltage estimate value is calculated according to the preset period until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive-to-ground voltage stability value U1′ connected as the insulation detection resistor R3, where U1′ j is the estimated value of the jth second positive electrode to ground voltage, U1′ j-1 is the calculated j-1 second positive electrode to ground voltage estimate value; according to the fourth functional relationship, the second duration is used as the initial time and the negative electrode to ground voltage estimate value is calculated according to the preset period until the obtained U2′ j -U2′ j-1 When the voltage is less than the first preset voltage, U2′ j The negative pole to ground voltage stability value U2′ connected as the insulation detection resistor R3, where U2′ j is the estimated value of the j-th second negative electrode voltage to ground, U2′ j-1 is the estimated value of the j-1th second negative electrode voltage to ground obtained by calculation; j ≥ 1, j is a positive integer; Insulation resistance calculation module: used to calculate the vehicle insulation resistance based on the insulation detection resistor R3, the positive pole to ground voltage stable value U1, the negative pole to ground voltage stable value U2, the positive pole to ground voltage stable value U1′ and the negative pole to ground voltage stable value U2′.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for measuring the vehicle insulation resistance according to any one of claims 1 to 7 are implemented.
10. A vehicle, characterized in that: The vehicle includes the electronic device according to claim 9.
Citation Information
Patent Citations
Insulation resistance detecting method for electric vehicle
CN110398633A
Device and method for detecting insulation resistance of battery pack
CN114646808A