Vehicle insulation resistance measuring and calculating method and system, electronic equipment and vehicle
By using AI curve fitting technology in electric vehicles to calculate the functional relationship between voltage and time, the existing insulation resistance calculation methods have solved the problem of inaccurate measurement results, long time and low efficiency in harsh environments, achieving more efficient and accurate insulation resistance measurement, and improving the safety of vehicle operation.
Patent Information
- Application Number
- CN202510129836.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-02-05
AI Technical Summary
The existing insulation resistance calculation methods have problems such as inaccurate measurement results, long time and low efficiency. Especially in the harsh operating environment of electric vehicles, the insulation resistance detection circuit of the power battery is easily disturbed, resulting in inaccurate measurement results.
A method of calculating vehicle insulation resistance is adopted. By collecting voltage data separately when the insulation detection resistance is not connected and connected, and a functional relationship between voltage and time is obtained through AI curve fitting, the voltage stability value is calculated, and the vehicle insulation resistance is then calculated. This method does not require numerical filtering of the acquisition, which improves measurement accuracy and efficiency.
This method can more accurately measure insulation resistance, shorten measurement time, improve the degree of automation, ensure the stability of measurement results, and is suitable for situations where the insulation detection resistance is not connected and connected, improving the safety of vehicle operation.
Smart Images

Figure CN119959805A_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] Electric vehicles (BEVs) are vehicles that use onboard batteries as a power source and use motors to drive the wheels. They meet various standards such as road traffic and safety regulations, and their development prospects are generally optimistic given that electric vehicles have relatively little impact on the environment.
[0003] However, since electric vehicles are equipped with high-voltage on-board batteries, the insulation performance of the entire vehicle is reduced, which directly affects the safety of passengers. Therefore, it is crucial to ensure the insulation status of electric vehicles. At present, the insulation status of the vehicle is usually monitored in real time by the Battery Management System (BMS). BMS usually uses an unbalanced bridge circuit method to measure the insulation resistance of the entire vehicle, which 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 through the circuit principle.
[0004] However, during driving, electric vehicles face harsh operating environments such as vibration, high temperature, high humidity, and gas corrosion. Under extreme conditions such as sudden acceleration or sudden braking, the insulation resistance detection circuit of the power battery may be seriously disturbed, resulting in inaccurate insulation resistance measurement results. For example, the existing insulation resistance measurement method uses arithmetic average filtering to process the data collected by the detection circuit, but when the system is disturbed or the acquisition accuracy is insufficient, the insulation resistance cannot be accurately measured, thereby failing to ensure the safety of passengers.
[0005] In addition, in electric vehicles, there is a Y capacitor between the positive and negative poles of the on-board battery and the body ground. After the resistor is connected in parallel to the positive and negative loops of the battery, the resistor and the Y capacitor form an RC charging and discharging circuit, which will cause voltage instability. In order to accurately measure the voltage value before and after the parallel resistor, it is necessary to wait for the voltage to stabilize, which makes the measurement process time-consuming. Coupled with the calculation of the insulation value and the necessary sampling and filtering processing, the measurement time of the insulation resistance is further extended. Summary of the invention
[0006] In view of this, an object 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 calculating 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 when the insulation detection resistor R3 is not connected according to a preset period;
[0010] S2. When the first duration is greater than the preset time, it is determined that the equivalent capacitor charging and discharging is not completed, then 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 are respectively fitted with the corresponding time to obtain a first functional relationship between the positive electrode-to-ground voltage and the time when the insulation detection resistor R3 is not connected, and a second functional relationship between the negative electrode-to-ground voltage and the time;
[0011] S3, according to the first functional relationship, taking the first duration as the initial time, increasing and calculating the estimated value of the positive electrode-to-ground voltage according to a preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 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 without the insulation detection resistor R3, 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, j is a positive integer;
[0012] S4, when the insulation detection resistor R3 is connected to the insulation resistance detection circuit, the positive electrode voltage to ground stable value U1′ and the negative electrode voltage to ground stable 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 completed, the voltage stability value can be quickly obtained by curve fitting the voltage and time data of a preset number of times, which shortens 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.
[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, performs k-order polynomial fitting, and obtains the 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 match for the actual sampling point by minimizing the sum of squares of the error, 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 is the sampling number; f1(t) is 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 corresponding to the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1; f2(t) represents the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2; a k2 represents the time corresponding to the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2; f1′(t) represents the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1′; a′ k1 represents the time corresponding to the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1′; f2′(t) represents the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2′; a′ k2 It 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 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);
[0031] Comparison function f1 未接入 (t) and f1 再次未接入 (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 insulation detection resistor R3 is connected and then disconnected 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 for function f1 未接入 (t) and f1 再次未接入 (t) Take the 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 stable 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 pole to ground voltage stable 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 value and the maximum value. If the difference between the minimum value and the maximum value is greater than the set difference, the insulation detection resistor R3 is connected and then disconnected and recalculated.
[0035] When 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) Take the derivative to determine the monotonicity of the function; if one of them does not satisfy 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 stable 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 value and the maximum value. If the difference between the minimum value and the maximum value 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) Take the 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 stable 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 equation (VII) to solve for the function f2′ 再次接入 (t);
[0040] Comparison function 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 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) Take the 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 changes from being connected to being not connected to 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 N times of positive pole-to-ground voltage U1[N-1] collected 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 pole voltage to ground ΔU2[n]=|U2[n]-U2 AVR |; When any one of the absolute value ΔU1[n] of the positive electrode voltage to ground and the absolute value ΔU2[n] of the negative electrode voltage to ground is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed; wherein N represents the number of acquisitions, the value of N is a positive integer, n is the 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] 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 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 greater than the preset time, and any one of 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] is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0045] 3) According to the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected before the insulation detection resistor R3 is not connected for the first preset number of times and the corresponding time, 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 are obtained by AI curve fitting respectively;
[0046] 4) According to the first functional relationship, the first duration is used as the initial time, and the positive electrode voltage to ground is calculated incrementally 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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 without the insulation detection resistor R3, 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 value of the negative electrode-to-ground 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 of the insulation detection resistor R3 not being 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 capacitor charging and discharging is completed, then 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 times of positive pole-to-ground voltage U1′[N-1] collected 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 pole voltage to ground ΔU1′[n]=|U1′[n]-U1′ AVR |, the absolute value of the negative pole voltage to ground ΔU2′[n]=|U2′[n]-U2′ AVR |; When any one of the absolute value ΔU1′[n] of the positive electrode voltage to ground and the absolute value ΔU2′[n] of the negative electrode voltage to ground is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed, wherein N represents the number of acquisitions, the value of N is a positive integer, n is the array subscript, n=N-1, that is, the first sampling n=0, the second sampling n=1, and so on;
[0051] 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 electrode 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 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;
[0052] 3) According to the positive and negative electrode-to-ground voltages and the negative electrode-to-ground voltages collected for the second preset number of times when the insulation detection resistor R3 is connected and the corresponding time, the third functional relationship between the positive electrode-to-ground voltage and the time and the fourth functional relationship between the negative electrode-to-ground voltage and the time are obtained by AI curve fitting respectively;
[0053] 4) According to the third functional relationship, the second duration is used as the initial time, and the positive electrode voltage to ground 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 electrode to ground voltage stable value U1′ connected as the insulation detection resistor R3, where U1′ j is the calculated estimated value of the jth second positive electrode voltage to ground, U1′ j-1 is the calculated j-1th second positive electrode to ground voltage estimation value; according to the fourth functional relationship, the second 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 The negative pole to ground voltage stable value U2′ connected as the insulation detection resistor R3, where U2′ j is the calculated estimated value of the jth second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode voltage to ground, 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 has been 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 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 being 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 capacitor charging and discharging is completed, and the average value U1′ of the positive electrode to ground voltage updated 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 ′.
[0056] The present invention also provides a system for implementing the method for measuring the vehicle insulation resistance of the present invention, comprising:
[0057] Insulation resistance detection circuit;
[0058] Data acquisition module: used to collect the positive pole-to-ground voltage, the negative pole-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 pole-to-ground voltage, the negative pole-to-ground voltage and the second duration of the insulation detection resistor R3 being connected when the insulation detection resistor R3 is connected according to a preset cycle;
[0059] A fitting module: used to determine that the equivalent capacitor charging and discharging is 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 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 by fitting the positive electrode-to-ground voltage and the negative electrode-to-ground voltage of the first preset number of times collected when the insulation detection resistor R3 is not connected, and to determine that the equivalent capacitor charging and discharging is 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 a fourth functional relationship between the negative electrode-to-ground voltage and the time when the insulation detection resistor R3 is connected by fitting the positive electrode-to-ground voltage and the negative electrode-to-ground voltage of the second preset number of times collected when the insulation detection resistor R3 is connected and the corresponding 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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 without the insulation detection resistor R3, 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 estimation value; 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 electrode to ground voltage stable value U1′ connected as the insulation detection resistor R3, where U1′ j is the calculated estimated value of the jth second positive electrode voltage to ground, U1′ j-1 is the calculated j-1th second positive electrode to ground voltage estimation value; according to the fourth functional relationship, the second 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 The negative pole to ground voltage stable value U2′ connected as the insulation detection resistor R3, where U2′ j is the calculated estimated value of the jth second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode voltage to ground; j≥1, j is a positive integer;
[0061] Insulation resistance calculation module: used to calculate the vehicle insulation resistance according to 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′.
[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 measurement results of insulation resistance and provide user interaction functions, such as starting measurement, stopping measurement, viewing historical data, etc.;
[0065] Control logic unit: responsible for the coordination of 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 insulation resistance equivalent models to be detected (i.e., a first equivalent insulation resistance Rp and a second equivalent insulation resistance Rn), and Cp and Cn are Y capacitor equivalent models (i.e., a first equivalent Y capacitor Cp and a second equivalent Y capacitor Cn).
[0069] The present invention also provides an electronic device, including 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 further provides a vehicle, wherein the vehicle comprises the electronic device described in 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 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 through 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; the 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 a method for calculating vehicle insulation resistance of the present invention;
[0074] Figure 2It is a structural schematic diagram of an insulation resistance detection circuit;
[0075] Figure 3 This is a schematic diagram of the voltage change of U1 / U2 when the K1 switch is switched;
[0076] Figure 4 A second flow chart of the method for calculating the vehicle insulation resistance of the present invention;
[0077] Figure 5 The 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 change (U1 end) under normal conditions;
[0081] Fig. 9 This is a schematic diagram of voltage change (U1 end) under abnormal conditions;
[0082] Fig.10 This is a schematic diagram of voltage change (U1 end) when the insulation state changes. DETAILED DESCRIPTION
[0083] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0084] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being 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 complicated.
[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 intends to disclose a method, system, electronic equipment and vehicle for measuring the insulation resistance of a vehicle, so as to solve the problems of inaccurate measurement results, long time and low efficiency in the existing insulation resistance measurement method.
[0087] Among them, Figure 1 As shown, a method for calculating the insulation resistance of a vehicle comprises 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 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 charging and discharging is not completed, then the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected before the first preset number of times when the insulation detection resistor R3 is not connected are respectively fitted with the corresponding time to obtain a first functional relationship between the positive electrode-to-ground voltage and the time when the insulation detection resistor R3 is not connected, and a second functional relationship between the negative electrode-to-ground voltage and the time;
[0090] S3, according to the first functional relationship, taking the first duration as the initial time, increasing 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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 negative electrode to ground voltage estimation value is calculated incrementally according to the preset period with the first duration as the initial time 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 without the insulation detection resistor R3, 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, j is a positive integer;
[0091] S4, when the insulation detection resistor R3 is connected to the insulation resistance detection circuit, the positive electrode voltage to ground stable value U1′ and the negative electrode voltage to ground stable 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 the 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 a plurality of resistors connected in series or in parallel.
[0095] In some embodiments, in S2 and S4, AI curve fitting is adopted. AI curve fitting adopts the least square method, takes time as the independent variable and voltage as the dependent variable, performs k-order polynomial fitting, and obtains 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 the coefficient, k represents the number of sampling times, f(t) represents the voltage, and t represents the time corresponding to the voltage collection; wherein, the voltage f(t) is the voltage between the positive and negative electrodes of the insulation detection resistor R3 when it is connected or not; the time t is the duration of whether the insulation detection resistor R3 is connected or not when the positive and negative electrodes of the insulation detection resistor R3 are collected for the corresponding number of times;
[0098] The least squares method finds the best function match for the actual sampling point by minimizing the sum of squares of the error, as shown in formula (II):
[0099]
[0100] Substituting formula (I) into formula (II) yields formula (III):
[0101]
[0102] Among them, 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 is the sampling number; f1(t) is 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 corresponding to the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1; f2(t) represents the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2; a k2 represents the time corresponding to the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2; f1′(t) represents the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1′; a′ k1 represents the time corresponding to the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1′; f2′(t) represents the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2′; a′ k2 It 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 value and the maximum value. If the difference between the minimum value and the maximum value is greater than the set difference, the insulation detection resistor R3 is connected and then disconnected 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) Take the 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 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 pole to ground voltage stable 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 value and the maximum value. If the difference between the minimum value and the maximum value is greater than the set difference, the insulation detection resistor R3 is connected and then disconnected 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) Take the derivative to determine the monotonicity of the function; if one of them does not satisfy 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 value and the maximum value. If the difference between the minimum value and the maximum value 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) 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) Take the 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 formula (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 equation (VII) to solve for the function f2′ 再次接入 (t);
[0121] Comparison function 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 insulation detection resistor R3 is disconnected and then connected again to recalculate.
[0122] When the 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) Take the 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 insulation resistance equivalent models to be detected (i.e., a first equivalent insulation resistance Rp and a second equivalent insulation resistance Rn), and Cp and Cn are Y capacitor equivalent models (i.e., a first equivalent Y capacitor Cp and a second equivalent Y capacitor Cn).
[0124] Among them, Rp is the equivalent insulation resistance of the main positive to the low-voltage ground, Cp is the equivalent Y capacitance of the main positive to the low-voltage ground, Rn is the equivalent insulation resistance of the main negative to the low-voltage ground, and Cn is the equivalent Y capacitance of the main negative to the low-voltage ground. In this application, the insulation resistance of the negative to the ground is less than the insulation resistance of the positive to the ground, that is, Rn<Rp.
[0125] When the K1 switch is turned 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 delay of a period of time, 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 collected U1 and U2 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 using the national standard method to accurately calculate insulation resistance is that U1, U2, U1′, and U2′ used for calculation must reach a stable state. In practical applications, when the K1 switch is switched, due to the influence of the charging and discharging of the equivalent capacitance Cp / Cn, the voltage at both ends of the corresponding Rn / Rp tends to stabilize after a delay of a period of time. The larger the insulation resistance value, the longer the corresponding equivalent capacitance is charged, and the longer the acquisition time; due to the influence of voltage acquisition accuracy, there may be individual data with large errors in the voltage acquisition process of U1 and U2, which affects the insulation resistance calculation. Therefore, the present application provides a method for measuring the insulation resistance of electric vehicles, which can achieve rapid calculation of insulation resistance by fitting the collected data, improve the reliability of the whole vehicle, and ensure the safety of the whole vehicle.
[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, and 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 N times of positive pole-to-ground voltage U1[N-1] collected 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 pole voltage to ground ΔU2[n]=|U2[n]-U2 AVR|; When any one of the absolute value ΔU1[n] of the positive electrode voltage to ground and the absolute value ΔU2[n] of the negative electrode voltage to ground is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed; wherein N represents the number of acquisitions, the value of N is a positive integer, n is the 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] 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 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 greater than the preset time, and any one of 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] is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0133] 3) According to the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected before the insulation detection resistor R3 is not connected for the first preset number of times and the corresponding time, 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 are obtained by AI curve fitting respectively;
[0134] 4) According to the first functional relationship, the estimated value of the positive electrode voltage to ground 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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 negative electrode to ground voltage estimation value is calculated incrementally according to the preset period with the first duration as the initial time 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 without the insulation detection resistor R3, 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 U1 of the positive electrode-to-ground voltage is used as the value of the negative electrode-to-ground voltage. 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 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 capacitor charging and discharging is completed, then 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 being disconnected from the circuit, U1 increases and U2 decreases. The measurement method includes the following steps:
[0138] 1) The positive pole to ground voltage U1[N-1] (i.e. Figure 2 The voltage of BAT+ to ground) and the voltage of the negative electrode to ground U2[N-1] (i.e. Figure 2 The collected values are stored in U1
[200] and U2
[200] , for example, the first sampled voltage value is cached in U1[0] and U2[0], and the Nth sampled 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 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 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, the first sampling n=0, the second sampling n=1, 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 voltage to ground 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 completed, such as Figure 5 As shown; then the average value of the positive pole to ground voltage U1 is calculated 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 stability value U2; wherein, the preset time is 2000ms, which is equivalent to 200 acquisition times;
[0141] 3) If the first duration of the disconnection 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 voltage to ground and the absolute value ΔU2[n] of the negative electrode voltage to ground 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, 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 by 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 by 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 square 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, 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 match for the actual sampling point by minimizing the sum of squares of the error. 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 (the first duration in this embodiment is 2000ms) is used as the initial time, and the corresponding positive pole-to-ground voltage estimation value is incremented periodically (in this embodiment, it is incremented by 10ms) and calculated, until the difference between the next positive pole-to-ground voltage estimation value U1[tn] and the previous positive pole-to-ground voltage estimation value U1[tn-1] is less than the first preset voltage, then the next positive pole-to-ground voltage estimation value U1[tn] is used as the positive pole-to-ground voltage stability 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, wherein ΔU1[t] represents the difference between the next positive pole-to-ground voltage estimation value U1[tn] and the previous positive pole-to-ground voltage estimation value U1[tn-1], and the first preset voltage is 0.3V;
[0159] According to the second functional relationship f2(t), the first duration (the first duration in this embodiment is 2000ms) is used as the initial time, and the corresponding negative pole-to-ground voltage estimation value is incremented periodically (in this embodiment, it is incremented by 10ms) until the difference between the next negative pole-to-ground voltage estimation value U2[tn] and the previous negative pole-to-ground voltage estimation value U2[tn-1] is less than the first preset voltage, then the next negative pole-to-ground voltage estimation value U2[tn] is used as the negative pole-to-ground voltage stability value U2 when the insulation detection resistor R3 is not connected; 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, wherein ΔU2[t] represents the difference between the next negative pole-to-ground voltage estimation value U2[tn] and the previous negative pole-to-ground voltage estimation value U2[tn-1], and the first preset voltage is 0.3V;
[0160] 5) If the insulation state changes during the measurement, 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 changes in the normal state are as follows: Figure 8 As shown, the voltage changes in abnormal conditions are as follows Fig. 9 As shown;
[0162] (2) By applying the 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 satisfy the monotonicity, the insulation detection resistor R3 is connected and then disconnected and recalculated until the function f1 未接入 (t), f1 再次未接入 (t), f2 未接入 (t) and f2 再次未接入 (t) all satisfy monotonicity.
[0163] like Fig.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, when the insulation detection resistor R3 changes 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:
[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 times of positive pole-to-ground voltage U1′[N-1] collected 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 pole voltage to ground ΔU1′[n]=|U1′[n]-U1′ AVR |, the absolute value of the negative pole voltage to ground ΔU2′[n]=|U2′[n]-U2′ AVR |; When any one of 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] is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed; wherein N represents the number of acquisitions, the value of N is a positive integer, n is the 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 voltage to ground ΔU1′[n] and the absolute value of the negative electrode voltage to ground ΔU2′[n], if the second duration of the insulation detection resistor R3 being connected is greater than the preset time, and any one of 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] is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed;
[0167] 3) According to the collected positive-to-ground voltage and negative-to-ground voltage of the insulation detection resistor R3 before the second preset number of times and the corresponding time, a third functional relationship between the positive-to-ground voltage and time and a fourth functional relationship between the negative-to-ground voltage and time are obtained by AI curve fitting respectively;
[0168] 4) According to the third functional relationship, the estimated value of the positive electrode-to-ground voltage is calculated by incrementing the second 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 The positive electrode to ground voltage stable value U1′ connected as the insulation detection resistor R3, where U1′ j is the calculated estimated value of the jth second positive electrode voltage to ground, U1′ j-1 is the calculated j-1th second positive electrode to ground voltage estimation value; according to the fourth functional relationship, the negative electrode to ground voltage estimation value is calculated according to the preset period with the second duration as the initial time 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 stable value U2′ connected as the insulation detection resistor R3, where U2′ j is the calculated estimated value of the jth 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 pole to ground voltage stable value U1', the negative pole 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 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 capacitor charging and discharging is completed, then 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 ′.
[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 changed 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 pole to ground voltage U1′[N-1] (i.e. Figure 2 The voltage of BAT+ to ground) and the voltage of the negative electrode to ground U2′[N-1] (i.e. Figure 2 The collected values are stored in U1′
[200] and U2′
[200] , for example, the first sampled voltage value is cached in U1′[0] and U2′[0], and the Nth sampled 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 voltage to ground Δ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 pole to ground voltage stable value U1', the negative pole 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, the first sampling n = 0, the second sampling n = 1, and so on;
[0174] 2) When 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 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 put into 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 voltage to ground ΔU1′[n] and the absolute value of the negative electrode voltage to ground Δ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 absolute value of the positive electrode voltage to ground ΔU1′[n] and the absolute value of the negative electrode voltage to ground ΔU2′[n] calculated to be updated are both less than the second preset voltage, it is determined that the charging and discharging of the Y capacitors Cp and Cn have been completed; then the average value U1′ of the positive electrode voltage to ground 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 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 ΔU1′[n] of the positive electrode-to-ground voltage and the absolute value ΔU2′[n] of the negative electrode-to-ground voltage 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 square 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, u represents voltage, and is substituted into formula (VI). The subsequent calculation method is the same as the first functional relationship f1(t), thereby solving the third functional relationship f1′(t); similarly, the fourth functional relationship f2′(t) is solved;
[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, it is incremented by 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 calculated. 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, wherein ΔU1′[t] represents 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], 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 pole-to-ground voltage estimation value is incremented periodically (in this embodiment, it is incremented by 10ms) until the difference between the next negative pole-to-ground voltage estimation value U2′[tn] and the previous negative pole-to-ground voltage estimation value U2′[tn-1] is less than the first preset voltage, then the next negative pole-to-ground voltage estimation value U2′[tn ] as the negative pole to ground voltage stable value 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, wherein ΔU2′[t] represents the difference between the next negative pole to ground voltage estimated value U2′[tn] and the previous negative pole to ground voltage estimated value U2′[tn-1], and the first preset voltage is 0.3V;
[0180] 5) If the insulation state changes during the measurement, 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 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 disconnected and then connected again and recalculated;
[0182] (2) When function f2′ 接入 (t) and f2′ 再次接入 (t) When 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 method for calculating the vehicle insulation resistance in the above embodiment is further provided, comprising:
[0184] Insulation resistance detection circuit;
[0185] Data acquisition module: used to collect the positive pole-to-ground voltage, the negative pole-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 pole-to-ground voltage, the negative pole-to-ground voltage and the second duration of the insulation detection resistor R3 being connected when the insulation detection resistor R3 is connected according to a preset cycle;
[0186] A fitting module: used to determine that the equivalent capacitor charging and discharging is 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 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 by fitting the positive electrode-to-ground voltage and the negative electrode-to-ground voltage of the first preset number of times collected when the insulation detection resistor R3 is not connected, and to determine that the equivalent capacitor charging and discharging is 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 a fourth functional relationship between the negative electrode-to-ground voltage and the time when the insulation detection resistor R3 is connected by fitting the positive electrode-to-ground voltage and the negative electrode-to-ground voltage of the second preset number of times collected when the insulation detection resistor R3 is connected;
[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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated estimated value of the jth positive electrode to ground voltage, U1 j-1 is the calculated j-1th positive pole-to-ground voltage estimation value; according to the second functional relationship, the negative pole-to-ground voltage estimation value is calculated incrementally according to the preset period with the first duration as the initial time 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 without the insulation detection resistor R3, 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 estimation value; according to the third functional relationship, the positive electrode to ground voltage estimation value is calculated according to the preset period with the second duration as the initial time until the obtained U1′ j -U1′ j-1 When the voltage is less than the first preset voltage, U1′ j The positive electrode to ground voltage stable value U1′ connected as the insulation detection resistor R3, where U1′ j is the calculated estimated value of the jth second positive electrode voltage to ground, U1′ j-1 is the calculated j-1th second positive electrode to ground voltage estimation value; according to the fourth functional relationship, the negative electrode to ground voltage estimation value is calculated according to the preset period with the second duration as the initial time 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 stable value U2′ connected as the insulation detection resistor R3, where U2′ j is the calculated estimated value of the jth second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode voltage to ground; j≥1, j is a positive integer;
[0188] Insulation resistance calculation module: used to calculate the vehicle insulation resistance according to 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′.
[0189] In some embodiments, the system further comprises:
[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 measurement results of insulation resistance and provide user interaction functions, such as starting measurement, stopping measurement, viewing historical data, etc.;
[0192] Control logic unit: responsible for the coordination of 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 calculating the vehicle insulation resistance in any of the above embodiments are implemented.
[0196] In some embodiments, a vehicle is also provided, the vehicle comprising the electronic device in 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 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.
[0198] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for calculating the insulation resistance of a vehicle, 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 when the insulation detection resistor R3 is not connected according to a preset period; S2. When the first duration is greater than the preset time, it is determined that the equivalent capacitor charging and discharging is not completed, then 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 are respectively fitted with the corresponding time to obtain a first functional relationship between the positive electrode-to-ground voltage and the time when the insulation detection resistor R3 is not connected, and a second functional relationship between the negative electrode-to-ground voltage and the time; S3, according to the first functional relationship, taking the first duration as the initial time, increasing and calculating the estimated value of the positive electrode-to-ground voltage according to a preset period until the obtained U1 j -U1 j-1 When the voltage is less than the first preset voltage, U1 j As the positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 without the insulation detection resistor R3, 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, j is a positive integer; S4, when the insulation detection resistor R3 is connected to the insulation resistance detection circuit, the positive electrode voltage to ground stable value U1′ and the negative electrode voltage to ground stable 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, performs k-order polynomial fitting, and obtains 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 match of the actual sampling point 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 pole-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 pole-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 pole-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 pole-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 is the sampling number; f1(t) is 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 corresponding to the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1; f2(t) represents the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2; a k2 represents the time corresponding to the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2; f1'(t) represents the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1'; a' k1 represents the time corresponding to the voltage collected when the actual sampling point is the sampling point of the positive pole-to-ground voltage stable value U1′; f2'(t) represents the voltage collected when the actual sampling point is the sampling point of the negative pole-to-ground voltage stable value U2′; a' k2 It 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 value and the maximum value. If the difference between the minimum value and the maximum value is greater than the set difference, the insulation detection resistor R3 is connected and then disconnected 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 for function f1 未接入 (t) and f1 再次未接入 (t) Take the 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 pole to ground voltage stability value U2 is substituted into equation (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 pole to ground voltage stable 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 value and the maximum value. If the difference between the minimum value and the maximum value is greater than the set difference, the insulation detection resistor R3 is connected and then disconnected and recalculated. When 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) Take the derivative to determine the monotonicity of the function; if one of them does not satisfy 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 value and the maximum value. If the difference between the minimum value and the maximum value 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) Take the 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 pole 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 equation (VII) to solve for the function f2′ 再次接入 (t); Comparison function 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 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) Take the 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 N times of positive pole-to-ground voltage U1[N-1] collected 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 pole voltage to ground ΔU2[n]=|U2[n]-U2 AVR |; When any one of the absolute value ΔU1[n] of the positive electrode voltage to ground and the absolute value ΔU2[n] of the negative electrode voltage to ground is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed; wherein N represents the number of acquisitions, the value of N is a positive integer, n is the 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 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 greater than the preset time, and any one of 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] 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 before the insulation detection resistor R3 is not connected for the first preset number of times and the corresponding time, 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 are obtained by AI curve fitting respectively; 4) According to the first functional relationship, the first duration is used as the initial time, and the positive electrode voltage to ground is calculated incrementally 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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 without the insulation detection resistor R3, 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 value of the negative electrode-to-ground 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 stable value U2; Alternatively, 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 capacitor charging and discharging is completed, then 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.
6. The calculation method according to claim 1, characterized in that: When the insulation detection resistor R3 is connected to the insulation resistance detection circuit instead of being disconnected, 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 times of positive pole-to-ground voltage U1′[N-1] collected 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 pole 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 any one of the absolute value ΔU1′[n] of the positive electrode voltage to ground and the absolute value ΔU2′[n] of the negative electrode voltage to ground is greater than or equal to the second preset voltage, it is determined that the capacitor charging and discharging is not completed, wherein N represents the number of acquisitions, the value of N is a positive integer, n is the array subscript, n=N-1; 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 electrode 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 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; 3) According to the positive electrode-to-ground voltage and the negative electrode-to-ground voltage collected before the second preset number of times when the insulation detection resistor R3 is connected and the corresponding time, the third functional relationship between the positive electrode-to-ground voltage and the time and the fourth functional relationship between the negative electrode-to-ground voltage and the time are obtained by AI curve fitting respectively; 4) According to the third functional relationship, the estimated value of the positive electrode-to-ground voltage is calculated by increasing the second 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 The positive electrode to ground voltage stable value U1′ connected as the insulation detection resistor R3, where U1′ j is the calculated estimated value of the jth second positive electrode voltage to ground, U1′ j-1 is the calculated j-1th second positive electrode to ground voltage estimation value; according to the fourth functional relationship, the second 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 The negative pole to ground voltage stable value U2′ connected as the insulation detection resistor R3, where U2′ j is the calculated estimated value of the jth 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 has been completed, and the average value U1′ of the positive electrode-to-ground voltage is used as the 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′; 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 being 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 capacitor charging and discharging 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 ′.
8. A system for implementing the method for calculating the vehicle insulation resistance according to any one of claims 1 to 7, characterized in that: include: Insulation resistance detection circuit; Data acquisition module: used to collect the positive pole-to-ground voltage, the negative pole-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 pole-to-ground voltage, the negative pole-to-ground voltage and the second duration of the insulation detection resistor R3 being connected when the insulation detection resistor R3 is connected according to a preset cycle; A fitting module: used to determine that the equivalent capacitor charging and discharging is 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 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 by fitting the positive electrode-to-ground voltage and the negative electrode-to-ground voltage of the first preset number of times collected when the insulation detection resistor R3 is not connected, and to determine that the equivalent capacitor charging and discharging is 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 a fourth functional relationship between the negative electrode-to-ground voltage and the time when the insulation detection resistor R3 is connected by fitting the positive electrode-to-ground voltage and the negative electrode-to-ground voltage of the second preset number of times collected when the insulation detection resistor R3 is connected and the corresponding 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 positive electrode to ground voltage stability value U1 without insulation detection resistor R3, U1 j is the calculated 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 without the insulation detection resistor R3, 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 estimation value; 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 electrode to ground voltage stable value U1′ connected as the insulation detection resistor R3, where U1′ j is the calculated estimated value of the jth second positive electrode voltage to ground, U1′ j-1 is the calculated j-1th second positive electrode to ground voltage estimation value; according to the fourth functional relationship, the second 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 The negative pole to ground voltage stable value U2′ connected as the insulation detection resistor R3, where U2′ j is the calculated estimated value of the jth second negative electrode voltage to ground, U2′ j-1 is the calculated estimated value of the j-1th second negative electrode voltage to ground; j≥1, j is a positive integer; Insulation resistance calculation module: used to calculate the vehicle insulation resistance according to 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′.
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 calculating the vehicle insulation resistance according to any one of claims 1 to 7 are implemented.
10. A vehicle, characterized in that: The vehicle comprises the electronic device as claimed in claim 9.
Citation Information
Patent Citations
Insulation resistance detecting method for electric vehicle
CN110398633A
Electric vehicle insulation resistance measurement method and device, vehicle and storage medium
CN111781424A
Device and method for detecting insulation resistance of battery pack
CN114646808A
Insulation fault diagnosis method and device, controller and medium
CN114670643A
Electric vehicle insulation resistance value detection method based on unbalanced bridge method
CN116148536A