Method and device for determining resistance value of resistor in sampling compensation circuit and readable storage medium
By automatically determining the target resistance value of the voltage divider resistor in the nickel-metal hydride battery sampling and compensation circuit, the problem of inaccurate charging management of nickel-metal hydride batteries at different temperatures is solved, the efficiency and accuracy of resistance value determination are improved, and the risk of undercharging or overcharging is reduced.
Patent Information
- Application Number
- CN202510775326.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-26
AI Technical Summary
In the prior art, charging management equipment for nickel-hydrogen batteries cannot accurately control the charging circuit under different ambient temperatures, resulting in the nickel-hydrogen batteries being undercharged or overcharged, and the efficiency of determining the target resistance value of the voltage divider resistor in the sampling compensation circuit is low.
By obtaining alternative resistance combinations of multiple voltage divider resistors, the alternative variation curve of the input voltage of the sampling compensation circuit with the ambient temperature is determined, and the target resistance value of the voltage divider resistor is automatically determined based on the similarity with the reference variation curve of the target voltage of the battery pack with the ambient temperature.
The efficiency of determining the resistance value of the voltage divider resistor is improved, human errors are reduced, the accuracy of the resistance value is improved, and the phenomenon of undercharging or overcharging of the nickel-hydrogen battery is avoided.
Smart Images

Figure CN120703456A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, and readable storage medium for determining the resistance value of a resistor in a sampling compensation circuit. Background Art
[0002] During the charging process of a NiMH battery, the battery's charging management device obtains the terminal voltage of the NiMH battery and, based on the comparison between the terminal voltage and a preset threshold, controls the opening and closing of the NiMH battery's charging circuit to charge the NiMH battery. However, NiMH batteries require different charging voltages at different ambient temperatures to achieve full charge. That is, the terminal voltage of a fully charged NiMH battery varies at different ambient temperatures. Therefore, controlling the charging circuit directly based on the relationship between the NiMH battery's terminal voltage and the preset threshold at various ambient temperatures may result in the NiMH battery being undercharged or overcharged.
[0003] Currently, a sampling compensation circuit can be set between the nickel-hydrogen battery and the charging management device to compensate for the terminal voltage of the nickel-hydrogen voltage, thereby reducing the phenomenon of overcharging and undercharging of the nickel-hydrogen battery. The sampling compensation circuit may include multiple voltage-dividing resistors. Before the sampling compensation circuit is applied, the target resistance value of each voltage-dividing resistor needs to be determined. In the related art, the target resistance value of each voltage-dividing resistor is usually determined by the designer of the sampling compensation circuit based on work experience. However, the efficiency of determining the target resistance value of each voltage-dividing resistor in the related art is low. Summary of the Invention
[0004] This application provides a method, device, and readable storage medium for determining the resistance value of a resistor in a sampling compensation circuit, which can solve the problem of reduced efficiency in determining the target resistance value of each voltage-dividing resistor in the sampling compensation circuit in related technologies. The technical solution is as follows:
[0005] In one aspect, a method for determining the resistance value of a resistor in a sampling compensation circuit is provided, wherein an input end of the sampling compensation circuit is connected in parallel with a battery pack, and an output end of the sampling compensation circuit is connected to a charge management device of the battery pack; the method comprising:
[0006] Based on multiple candidate resistance values of each voltage-dividing resistor in the sampling and compensation circuit, a plurality of candidate resistance value combinations are obtained, each of the candidate resistance value combinations comprising: one candidate resistance value of each voltage-dividing resistor;
[0007] When the resistance combinations of the plurality of voltage-dividing resistors are the candidate resistance combinations, determining a candidate variation curve of the input voltage of the sampling compensation circuit versus the ambient temperature;
[0008] Determining the similarity between each of the candidate variation curves and a reference variation curve of the target voltage of the battery pack as a function of ambient temperature;
[0009] The target resistance value of each of the voltage-dividing resistors is determined based on the candidate resistance value combinations corresponding to the candidate change curves having a similarity greater than a similarity threshold.
[0010] Optionally, when the resistance combinations of the plurality of voltage-dividing resistors are the candidate resistance combinations, determining the candidate variation curve of the input voltage of the sampling compensation circuit with the ambient temperature includes:
[0011] For each of the alternative resistance combinations, when the resistance combination of the plurality of voltage-dividing resistors is the alternative resistance combination, the input voltage of the sampling and compensation circuit at each ambient temperature is determined to obtain an alternative variation curve of the input voltage of the sampling and compensation circuit with the ambient temperature.
[0012] Optionally, the sampling compensation circuit further includes: a negative ambient temperature coefficient (NTC) resistor, wherein the resistance of the NTC resistor is related to the ambient temperature; and determining the input voltage of the sampling compensation circuit at each ambient temperature includes:
[0013] Obtaining a functional relationship between an input voltage of the sampling and compensation circuit, a resistance value of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit, wherein each resistor is one of the following resistors: the NTC resistor and the voltage divider resistor, and the output voltage is a voltage threshold;
[0014] The input voltage of the sampling compensation circuit at each of the ambient temperatures is determined based on the functional relationship, the candidate resistance combination, the output voltage, and the resistance of the NTC resistor at each of the ambient temperatures.
[0015] Optionally, obtaining a functional relationship between an input voltage of the sampling and compensation circuit, resistance values of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit includes:
[0016] Based on a series-parallel relationship of a plurality of resistors included in the sampling and compensation circuit and an output voltage of the sampling and compensation circuit, obtaining a functional relationship between an input voltage of the sampling and compensation circuit, resistance values of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit;
[0017] The plurality of resistors include: the NTC resistor and each of the voltage-dividing resistors.
[0018] Optionally, the multiple voltage-dividing resistors include: a first voltage-dividing resistor, a second voltage-dividing resistor, and a third voltage-dividing resistor, the first voltage-dividing resistor being connected in series with the NTC resistor, the second voltage-dividing resistor being connected in parallel with the first voltage-dividing resistor and the NTC resistor connected in series, and then being connected in series with the third voltage-dividing resistor, one end of the first voltage-dividing resistor and the second voltage-dividing resistor being connected to the positive electrode of the battery pack, the first end of the first voltage-dividing resistor and the first end of the third voltage-dividing resistor being connected in parallel with the battery pack as input ends of the sampling compensation circuit; and both ends of the third voltage-dividing resistor being connected to the charging management device as output ends of the sampling compensation circuit;
[0019] The functional relationship satisfies:
[0020]
[0021] Among them, V T-b-n is the input voltage, V out is the output voltage, r1 is the structure of the first voltage divider resistor, r2 is the resistance of the second voltage divider resistor, r3 is the resistance of the third voltage divider resistor, T is the ambient temperature, R NTC-T is the resistance of the NTC resistor at the ambient temperature T.
[0022] Optionally, determining the similarity between each of the candidate variation curves and a reference variation curve of the target voltage of the battery pack with the ambient temperature includes:
[0023] For each candidate change curve, determining a residual sum of squares between the candidate change curve and the reference change curve;
[0024] determining a similarity between the candidate change curve and the reference change curve based on the residual sum of squares;
[0025] The similarity is negatively correlated with the residual sum of squares.
[0026] Optionally, the target voltage is the charging voltage of the battery pack.
[0027] In another aspect, a device for determining the resistance value of a resistor in a sampling and compensation circuit is provided, wherein an input end of the sampling and compensation circuit is connected in parallel with a battery pack, and an output end of the sampling and compensation circuit is connected to a charging management device of the battery pack; the device comprises:
[0028] an acquisition module, configured to acquire a plurality of candidate resistance value combinations based on a plurality of candidate resistance values of each voltage-dividing resistor in the sampling and compensation circuit, each candidate resistance value combination comprising: one candidate resistance value of each voltage-dividing resistor;
[0029] A first determining module is configured to determine an alternative variation curve of the input voltage of the sampling compensation circuit versus the ambient temperature when the resistance combinations of the plurality of voltage-dividing resistors are the respective alternative resistance combinations;
[0030] a second determining module, configured to determine a similarity between each of the candidate variation curves and a reference variation curve of the target voltage of the battery pack as a function of ambient temperature;
[0031] The third determining module is configured to determine a target resistance value of each of the voltage-dividing resistors based on the candidate resistance value combinations corresponding to the candidate change curves having a similarity greater than a similarity threshold.
[0032] On the other hand, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for determining the resistance value of the resistor in the sampling compensation circuit as described in the above aspect is implemented.
[0033] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for determining the resistance value of a resistor in a sampling compensation circuit as described in the above aspects is implemented.
[0034] On the other hand, a computer program product is provided, which includes a computer program or computer instructions. When the computer program or the computer instructions are executed by a processor, the method for determining the resistance value of the resistor in the sampling compensation circuit as described in the above aspects is implemented.
[0035] The beneficial effects of the technical solution provided by this application include at least:
[0036] The present application provides a method, device, and readable storage medium for determining the resistance value of a resistor in a sampling compensation circuit. The method can obtain multiple alternative resistance value combinations of multiple voltage-dividing resistors in the sampling compensation circuit, and when the resistance value combinations of the multiple voltage-dividing resistors are each alternative resistance value combination, determine the alternative change curve of the input voltage of the sampling compensation circuit with the ambient temperature, and determine the similarity between each alternative change curve and a reference change curve of the target voltage of the battery pack with the ambient temperature. Then, based on the alternative resistance value combination corresponding to the alternative change curve whose similarity is greater than a similarity threshold, determine the target resistance value of each voltage-dividing resistor. Since there is no need to manually determine the resistance value of the voltage-dividing resistor based on work experience, the efficiency of determining the resistance value of the voltage-dividing resistor is effectively improved. In addition, human error can be avoided, thereby improving the accuracy of the determined resistance value of the voltage-dividing resistor to a certain extent.
[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a structural diagram of a battery charging system;
[0039] Figure 2 This is a flow chart of a method for determining the resistance value of a resistor in a sampling compensation circuit provided by an embodiment of the present application;
[0040] Figure 3 This is a flow chart of another method for determining the resistance value of a resistor in a sampling compensation circuit provided by an embodiment of the present application;
[0041] Figure 4 Schematic diagram of a curve showing the change in resistance of an NTC resistor as a function of ambient temperature, provided in an embodiment of the present application;
[0042] Figure 5 This is a schematic diagram of the structure of a sampling compensation circuit provided in an embodiment of the present application;
[0043] Figure 6 This is a schematic diagram of a reference curve of the charging voltage of a battery pack provided by the present application as a function of ambient temperature;
[0044] Figure 7 This is a schematic structural diagram of a device for determining the resistance value in a sampling compensation circuit provided by an embodiment of the present application;
[0045] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0047] Figure 1 A battery charging system is shown. Figure 1 As can be seen, the nickel-metal hydride battery charging system may include: a battery 100, a charging circuit 200, and a charging management device 300 for the battery 100. The battery 100, charging circuit 200, and charging management device 300 are interconnected in pairs. The charging management device 300 can control the charging circuit 200 to charge or stop charging the battery 100. Optionally, the charging management device 300 may be a battery management chip. The battery 100 may be a nickel-metal hydride battery.
[0048] Specifically, during the charging process of the nickel-metal hydride battery, the charging management device will obtain the terminal voltage of the nickel-metal hydride battery and control the opening and closing of the nickel-metal hydride battery's charging circuit based on the comparison result of the terminal voltage and the preset threshold. For example, if the charging management device determines that the terminal voltage of the nickel-metal hydride battery has reached the preset threshold, it can be determined that the nickel-metal hydride battery is fully charged, and then the charging circuit can be controlled to be closed. If the charging management device determines that the terminal voltage has not yet reached the preset threshold, it can be determined that the nickel-metal hydride battery is not fully charged, and then the charging circuit can continue to be controlled to be open. The terminal voltage is the actual potential difference between the positive and negative poles of the battery itself.
[0049] However, the activity of NiMH battery cells changes with ambient temperature and is positively correlated with that temperature. Specifically, as the ambient temperature decreases, the activity of the NiMH battery's cell material decreases. As the ambient temperature increases, the activity of the cell material also increases. This change in the activity of the cell material also changes the internal resistance of the NiMH battery, and the internal resistance is negatively correlated with the activity. As the internal resistance of a NiMH battery increases, a higher charging voltage is required to fully charge the battery. As the internal resistance decreases, a lower charging voltage is required to avoid overcharging. The charging voltage is the voltage applied externally to the terminals of a NiMH battery and represents the voltage at which the battery is fully charged. For example, the charging voltage of a single NiMH battery at 25 degrees Celsius (at room temperature) is 1.45 volts (V). At an ambient temperature of -40°C (-40°C), the required charging voltage reaches 1.55V. When the ambient temperature is 85°C, the required charging voltage drops to 1.37V.
[0050] Therefore, NiMH batteries require different charging voltages at different ambient temperatures to achieve full charge and avoid overcharging. That is, the terminal voltage of a fully charged NiMH battery varies at different ambient temperatures. Therefore, controlling the charging circuit based solely on the relationship between the NiMH battery's terminal voltage and the preset threshold at various ambient temperatures may result in the NiMH battery being undercharged or overcharged.
[0051] For example, in a low-temperature environment, a NiMH battery may not be fully charged, but its terminal voltage has reached the preset threshold, prematurely triggering the "fully charged" threshold. The charging management device will then mistakenly believe that the NiMH battery is fully charged and subsequently control the charging circuit to shut down, resulting in the NiMH battery not actually being fully charged. In a high-temperature environment, the NiMH battery may be fully charged, but its terminal voltage has not yet reached the preset threshold. The charging management device will then mistakenly believe that the NiMH battery is not fully charged and continue to control the charging circuit to charge the battery, resulting in overcharging of the NiMH battery.
[0052] Currently, if Figure 1As shown, a sampling compensation circuit 400 can be set between the nickel-hydrogen battery 100 and the battery management chip 300. The input of the sampling compensation circuit 400 is the terminal voltage of the nickel-hydrogen battery. When the same terminal voltage is input, the output voltage (also called sampling voltage) of the sampling compensation circuit 400 is different under different ambient temperatures. In this way, compensation for the terminal voltage of the nickel-hydrogen battery is achieved, thereby reducing the phenomenon of overcharging and undercharging of the nickel-hydrogen battery. The sampling compensation circuit 400 may include multiple voltage-dividing resistors. And before the sampling compensation circuit 400 is applied, the target resistance value of each voltage-dividing resistor needs to be determined. In the related art, the target resistance value of each voltage-dividing resistor is usually determined by the electronic engineer who designs the sampling compensation circuit based on work experience. However, the efficiency of determining the target resistance value of each voltage-dividing resistor in the related art is low.
[0053] An embodiment of the present application provides a method for determining the resistance value of a resistor in a sampling compensation circuit, which is applied to an electronic device. The input end of the sampling compensation circuit is connected in parallel with the battery pack, so that the terminal voltage of the battery pack can be obtained, and the output end of the sampling compensation circuit is connected to the charging management device of the battery pack. The battery pack includes: a battery, or multiple batteries connected in series, such as 3 to 8 batteries. Optionally, the battery can be a nickel-metal hydride battery. The electronic device can be a mobile terminal, a fixed terminal or a server. The server can be a single server, or a server cluster composed of several servers, or a cloud computing service center. See Figure 2 , the method comprising:
[0054] Step 101: Acquire multiple candidate resistance value combinations based on multiple candidate resistance values of each voltage divider resistor in a sampling compensation circuit.
[0055] For each of the plurality of voltage-divider resistors, the electronic device may obtain multiple candidate resistance values for the voltage-divider resistor. The electronic device may then combine the multiple candidate resistance values for each of the voltage-divider resistors to obtain multiple candidate resistance value combinations. Each candidate resistance value combination includes one candidate resistance value for each of the voltage-divider resistors.
[0056] Step 102 : When the resistance combinations of the plurality of voltage-dividing resistors are candidate resistance combinations, determine candidate variation curves of the input voltage of the sampling compensation circuit versus the ambient temperature.
[0057] In an embodiment of the present application, for each candidate resistance value combination, the electronic device can determine the input voltage of the sampling and compensation circuit at each ambient temperature when the resistance value combination of the plurality of voltage-dividing resistors is the candidate resistance value combination, thereby obtaining an alternative variation curve of the input voltage of the sampling and compensation circuit with the ambient temperature. The input voltage is the terminal voltage of the battery pack sampled by the sampling and compensation circuit.
[0058] Step 103 : Determine the similarity between each candidate variation curve and a reference variation curve of the target voltage of the battery pack versus ambient temperature.
[0059] To ensure that the battery pack is fully charged as much as possible under various ambient temperature conditions without overcharging, the curve of the input voltage of the sampling compensation circuit changing with ambient temperature should be as close as possible to the curve of the target voltage of the battery pack changing with ambient temperature. Based on this, after obtaining multiple candidate change curves, the electronic device can determine the similarity between each of the multiple candidate change curves and the reference change curve. The similarity between each candidate change curve and the reference change curve is used to describe the degree of overlap between the candidate change curve and the reference change curve.
[0060] Step 104 : Determine target resistance values of the respective voltage-dividing resistors based on candidate resistance value combinations corresponding to the candidate change curves having similarities greater than a similarity threshold.
[0061] After determining the similarity between each candidate change curve and the reference change curve, the electronic device can compare the similarity with a similarity threshold to obtain a candidate change curve with a similarity greater than the similarity threshold. The electronic device can then determine the target resistance values for each voltage divider resistor in the sampling compensation circuit based on the candidate resistance value combinations corresponding to the candidate change curves with similarities greater than the similarity threshold.
[0062] In summary, the embodiments of the present application provide a method for determining the resistance value of a resistor in a sampling compensation circuit. The method can obtain multiple alternative resistance value combinations of multiple voltage-dividing resistors in the sampling compensation circuit, and when the resistance value combinations of the multiple voltage-dividing resistors are each alternative resistance value combination, determine the alternative change curve of the input voltage of the sampling compensation circuit with the ambient temperature, and determine the similarity between each alternative change curve and the reference change curve of the target voltage of the battery pack with the ambient temperature. Then, based on the alternative resistance value combination corresponding to the alternative change curve whose similarity is greater than the similarity threshold, determine the target resistance value of each voltage-dividing resistor. Since there is no need to manually determine the resistance value of the voltage-dividing resistor based on work experience, the efficiency of determining the resistance value of the voltage-dividing resistor is effectively improved. In addition, human error can be avoided, thereby improving the accuracy of the resistance value of the determined voltage-dividing resistor to a certain extent.
[0063] Figure 3 This is a flow chart of another method for determining the resistance value of a resistor in a sampling compensation circuit provided by an embodiment of the present application. This method can be applied to electronic devices. The input end of the sampling compensation circuit is connected in parallel with the battery pack, and the output end of the sampling compensation circuit is connected to the charging management device of the battery pack. Figure 3 , the method may include:
[0064] Step 201 : Acquire multiple candidate resistance value combinations based on multiple candidate resistance values of each voltage divider resistor in a sampling compensation circuit.
[0065] It is understandable that in the design process of sampling compensation circuit, electronic engineers often use negative temperature coefficient (NTC) resistors to design sampling compensation circuits to compensate for the terminal voltage of the battery pack. The resistance of the NTC resistor is negatively correlated with the ambient temperature. That is, the lower the ambient temperature, the greater the resistance of the NTC resistor; the higher the ambient temperature, the lower the resistance of the NTC resistor. However, the relationship between the resistance of the NTC resistor and the ambient temperature is not linear, but rather Figure 4 As shown. Figure 4 It can be seen that when the ambient temperature is lower than room temperature, the resistance of the NTC resistor increases with the decrease of the ambient temperature, and the slope of change is larger. When the ambient temperature is higher than room temperature, the resistance of the NTC resistor decreases with the increase of the ambient temperature, and the slope of change is smaller.
[0066] Because the target voltage of a battery pack varies linearly with temperature, a sampling compensation circuit is used to compensate for the terminal voltage of the battery pack. This requires that the input voltage of the sampling compensation circuit also varies linearly with temperature. Therefore, multiple voltage-dividing resistors must be included in the sampling compensation circuit, and the resistance values of each voltage-dividing resistor must be appropriately set to effectively offset the nonlinearity of the NTC resistor. In other words, the sampling compensation circuit includes multiple resistors, including an NTC resistor and multiple voltage-dividing resistors.
[0067] In an embodiment of the present application, for each of the plurality of voltage-divider resistors, the electronic device may obtain multiple candidate resistance values for the voltage-divider resistor. The electronic device may then combine the multiple candidate resistance values of the respective voltage-divider resistors to obtain multiple candidate resistance value combinations. Each candidate resistance value combination includes one candidate resistance value for each of the voltage-divider resistors.
[0068] Step 202 : When the resistance combinations of the plurality of voltage-dividing resistors are candidate resistance combinations, determine candidate variation curves of the input voltage of the sampling compensation circuit versus the ambient temperature.
[0069] The charging management device usually determines whether the charging capacity of the battery pack reaches the ideal capacity based on the comparison result of the voltage threshold and the output voltage of the sampling compensation circuit. Among them, the voltage threshold can be determined based on the ideal capacity and match the ideal capacity. The ideal capacity can be any capacity of the battery pack, such as the capacity when it is fully charged (referred to as the full capacity), or it can be 80% of the full capacity, 60% of the full capacity, or 50% of the full capacity, etc. For example, the ideal capacity is the full capacity of the battery pack. At this time, the voltage threshold can be the charging voltage of the battery pack at room temperature.
[0070] It can be seen from this that when the resistance value of the voltage-dividing resistor of the sampling compensation circuit is known, the output voltage of the sampling compensation circuit will change with the change of the input voltage, so that the charging management device can determine whether the charging capacity of the battery pack has reached the ideal capacity. However, the embodiment of the present application needs to reversely obtain the target resistance value of the voltage-dividing resistor. At this time, it is necessary to obtain the alternative change curve of the input voltage with the ambient temperature under each alternative resistance value combination when the output voltage of the sampling compensation circuit is the voltage threshold, so that the electronic device can automatically determine the target resistance value of each voltage-dividing resistor based on the similarity between the alternative change curve and the reference change curve.
[0071] In an embodiment of the present application, for each candidate resistance value combination, the electronic device can determine the input voltage of the sampling and compensation circuit at each ambient temperature when the resistance value combination of the plurality of voltage-dividing resistors is the candidate resistance value combination, thereby obtaining an alternative variation curve of the input voltage of the sampling and compensation circuit with the ambient temperature. The input voltage is the terminal voltage of the battery pack sampled by the sampling and compensation circuit.
[0072] For example, the electronic device can use a line segment to connect the input voltages of the sampling and compensation circuit at various ambient temperatures, in ascending order of ambient temperature, to obtain an alternative curve showing how the input voltage of the sampling and compensation circuit changes with ambient temperature. Alternatively, the electronic device can perform curve fitting based on the input voltages at multiple ambient temperatures to obtain an alternative curve showing how the input voltage of the sampling and compensation circuit changes with ambient temperature.
[0073] The alternative change curve can be expressed as: [V b-n ]=[V t1-b-n ,V t2-b-n ,V t3-b-n ,……,V tmax-b-n ]. Where n represents the number of batteries connected in series in the battery pack. T-b-n It represents the input voltage at ambient temperature T, where T can be any temperature from t1, t2, t3 to tmax. t1 can be greater than or equal to -40°C, and tmax can be less than or equal to 80°C. For example, t1 can be -25°C, and tmax can be 70°C.
[0074] Optionally, any two adjacent ambient temperatures among the multiple ambient temperatures may be separated by a target temperature. The target temperature may be pre-stored by the electronic device, for example, by 1 degree Celsius (°C). In other words, the electronic device may determine an input voltage of the sampling compensation circuit at every 1°C interval, thereby obtaining the input voltage of the sampling compensation circuit at multiple ambient temperatures.
[0075] In an optional implementation, the electronic device may store a voltage determination model into which the electronic device may input various ambient temperatures, candidate resistance combinations, and output voltages, and the voltage determination model may then output the input voltage of the sampling compensation circuit at various ambient temperatures.
[0076] It is understood that before inputting each ambient temperature, alternative resistance combination, and output voltage into the voltage determination model, the electronic device may obtain multiple training data and perform model training based on the multiple training data to obtain the voltage determination model. Each training data may include: a sample ambient temperature, a sample resistance combination, a sample output voltage, and a sample input voltage. The sample input voltage is the input voltage of the sampling compensation circuit calculated when each voltage divider resistor in the sampling compensation circuit has the sample resistance combination, the output voltage is the sample output voltage, and the ambient temperature is the sample ambient temperature.
[0077] In another optional implementation, the electronic device can obtain a functional relationship between the input voltage of the sampling compensation circuit, the resistance values of each resistor in the sampling compensation circuit, and the output voltage. The electronic device can then determine the input voltage of the sampling compensation circuit at each ambient temperature based on the functional relationship, the alternative resistance value combination, the output voltage, and the resistance value of the NTC resistor at each ambient temperature. The output voltage is a voltage threshold. The voltage threshold is used by the charging management device to determine whether the battery pack has reached the ideal charge (e.g., full charge).
[0078] It is understandable that for each of the multiple alternative resistance combinations, the electronic device can substitute the alternative resistance combination and the output voltage into the functional relationship, and sequentially substitute the resistance value of the NTC resistor at each ambient temperature, thereby obtaining the alternative resistance combination and the input voltage at the ambient temperature. The resistance value of the NTC resistor at the ambient temperature T can satisfy:
[0079]
[0080] In formula (1), T is the ambient temperature, R NTC-25B is the resistance of the NTC resistor at room temperature (25°C). B is the characteristic parameter of the NTC. Different NTC resistors have different characteristic parameters. The value of characteristic parameter B can usually be determined by consulting the manufacturer's datasheet. The B value typically ranges from 2000 to 6000.
[0081] In an embodiment of the present application, the electronic device can obtain a functional relationship between the input voltage of the sampling compensation circuit, the resistance values of each resistor in the sampling compensation circuit, and the output voltage of the sampling compensation circuit based on the series-parallel relationship of multiple resistors included in the sampling compensation circuit and the output voltage of the sampling compensation circuit.
[0082] like Figure 5 As shown, the multiple voltage-dividing resistors of the sampling and compensation circuit include: a first voltage-dividing resistor R1, a second voltage-dividing voltage R2, and a third voltage-dividing voltage R3. The first voltage-dividing resistor R1 is connected in series with the NTC resistor, and the second voltage-dividing resistor R2 is connected in parallel with the first voltage-dividing resistor R1 and the NTC resistor in series, and then connected in series with the third voltage-dividing resistor R3. The first end of the first voltage-dividing resistor R1 and the first end of the third voltage-dividing resistor R3 are connected in parallel with the battery pack as the input end of the sampling and compensation circuit, and the two ends of the third voltage-dividing resistor R3 are connected to the charging management device as the output end of the sampling and compensation circuit. It can be seen that the functional relationship described above can be:
[0083]
[0084] In formula (2), V T-b-n is the input voltage, V out is the output voltage, r1 is the resistance of the first voltage-dividing resistor, r2 is the resistance of the second voltage-dividing resistor, and r3 is the resistance of the third voltage-dividing resistor.
[0085] For example, assuming that the resistance value r1 of the first voltage divider resistor, the resistance value r2 of the second voltage divider resistor, and the resistance value r3 of the third voltage divider resistor in an alternative resistance combination are all 1000 ohms (Ω), the parameter R of the NTC resistor is NTC-25 =10000Ω, B=3987, the output voltage is 1.2V, then at -25℃, the resistance value of the NTC resistor R can be determined according to formula (1) NTC-(-25) Can satisfy: According to formula (2), the input voltage V- 25-b-5 Can satisfy:
[0086] By calculating an input voltage at intervals of 1°C based on formula (1) and formula (3), an alternative variation curve of the battery pack can be obtained when the resistance value of each voltage divider resistor is 1000Ω.
[0087] Step 203: Obtain a reference curve of the target voltage of the battery pack changing with the ambient temperature.
[0088] The target voltage may be the voltage when the battery pack is not fully charged, or the voltage when the battery pack is fully charged (i.e., the charging voltage of the battery pack). This embodiment of the present application does not limit this, and only needs to ensure that the target voltage matches the voltage threshold. For example, the target voltage is the charging voltage of the battery pack. The charging voltage is the voltage applied externally to both ends of the battery pack.
[0089] Assuming that the target voltage is the charging voltage, the reference change curve is the curve of the charging voltage of the battery pack at different ambient temperatures, and is a standard change curve. The reference change curve can be expressed as: [V c-n ]=[V t1-c-n ,V t2-c-n ,V t3-c-n ,……,V tmax-c-n ]. Wherein, t1, t2 and t3 represent respective ambient temperatures, c represents “standard charge”, and n represents the number of batteries connected in series included in the battery pack.
[0090] In the reference change curve of the battery pack, the charging voltage V at ambient temperature T T-c-n Can satisfy:
[0091] V T-c-n =n×(1.45+(25-T)×K) Formula (3)
[0092] In formula (3), T represents the ambient temperature of the battery pack, which can be any ambient temperature between t1 and tmax. K is the compensation coefficient, in V / °C, and is usually between 0.001 and 0.002.
[0093] Optionally, the difference between any two adjacent ambient temperatures may be 1° C. That is, within the ambient temperature range in which the battery pack operates, the ambient temperature may be calibrated at intervals of 1° C., and the charging voltage of the battery pack at the ambient temperature may be determined to obtain a reference variation curve.
[0094] For example, assuming that the battery pack includes 5 nickel-metal hydride batteries connected in series and the compensation coefficient K is 0.0015, then at -25°C, according to formula (3), the charging voltage V- 25-c-5 Satisfied: V- 25-c-5 =5×(1.45+(25-(-25))×0.0015)=7.625V. By measuring a charging voltage at intervals of 1°C within the operating temperature range of the battery pack, a reference change curve can be obtained. The reference change curve can be shown as follows. Figure 6 As shown. Figure 6 It can be seen that the reference change curve is linear, that is, a straight line.
[0095] Step 204 : Determine the similarity between each candidate variation curve and a reference variation curve of the target voltage of the battery pack versus ambient temperature.
[0096] It is understood that in order to ensure that the battery pack is fully charged as much as possible under various ambient temperature conditions without overcharging, the curve of the input voltage of the sampling compensation circuit changing with ambient temperature should be as close as possible to the curve of the target voltage of the battery pack changing with ambient temperature. In other words, the voltages of the two curves at various ambient temperatures should be as close as possible. Based on this, after obtaining multiple candidate change curves, the electronic device can determine the similarity of each of the multiple candidate change curves with the reference change curve.
[0097] In the embodiment of the present application, there are multiple ways for the electronic device to determine the similarity between each candidate variation curve and the reference variation curve of the target voltage of the battery pack with the ambient temperature. The embodiment of the present application uses the following optional implementations as examples to illustrate the process of the electronic device determining the similarity:
[0098] In a first optional implementation, for each candidate change curve, the electronic device may determine a residual sum of squares between the candidate change curve and the reference change curve, and then determine a similarity between the candidate change curve and the reference change curve based on the residual sum of squares.
[0099] The similarity is negatively correlated with the residual square sum. That is, the smaller the residual square sum between the candidate change curve and the reference change curve, the more similar the candidate change curve is to the reference change curve.
[0100] For example, assuming that the reference change curve adopts [V c-n ] indicates that a certain alternative change curve adopts [V b-n ] indicates that the residual sum of squares SSE between the reference change curve and the alternative change curve can satisfy:
[0101]
[0102] In formula (4), t1 is the minimum ambient temperature between the reference change curve and the alternative change curve, and tmax is the maximum ambient temperature between the reference change curve and the alternative change curve.
[0103] In a second optional implementation, for each candidate change curve, the electronic device may use a similarity algorithm to process the candidate change curve and the reference change curve to obtain a similarity between the candidate change curve and the reference change curve. The similarity algorithm may be one of the following algorithms: a cosine similarity algorithm, a Euclidean distance calculation algorithm, and a Pearson correlation coefficient calculation algorithm.
[0104] Step 205 : Determine the target resistance value of each voltage-dividing resistor based on the candidate resistance value combinations corresponding to the candidate change curves having a similarity greater than a similarity threshold.
[0105] After determining the similarity between each candidate change curve and the reference change curve, the electronic device may compare the similarity with a similarity threshold to obtain a candidate change curve having a similarity greater than the similarity threshold. The electronic device may then determine target resistance values for each voltage divider resistor in the sampling compensation circuit based on the candidate resistance combinations corresponding to the candidate change curves having similarities greater than the similarity threshold. The similarity threshold may be pre-stored by the electronic device.
[0106] In an embodiment of the present application, when the number of alternative change curves with a similarity greater than a similarity threshold is one, the electronic device can determine the resistance values included in the alternative resistance value combination corresponding to the alternative change curve as the target resistance values of the corresponding voltage divider resistors in the sampling compensation circuit.
[0107] In the case where there are multiple alternative change curves with similarities greater than the similarity threshold, the electronic device can first obtain the alternative change curve with the greatest similarity from the multiple alternative change curves, and then determine the various resistance values included in the alternative resistance value combination corresponding to the alternative change curve with the greatest similarity as the target resistance values of the corresponding voltage divider resistors in the sampling compensation circuit.
[0108] Alternatively, the electronic device can randomly obtain an alternative change curve from multiple alternative change curves whose similarity is greater than a similarity threshold, and then the electronic device can determine the various resistance values included in the alternative resistance value combination corresponding to the alternative change curve as the target resistance values of the corresponding voltage divider resistors in the sampling compensation circuit.
[0109] It is understood that the order of the steps in the method for determining the resistance value of the resistor in the sampling compensation circuit provided in the embodiment of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly. For example, step 203 can also be deleted according to the circumstances. Any person skilled in the art can easily conceive of a variation within the technical scope disclosed in this application, and such variation should be included in the scope of protection of this application, so it will not be described in detail.
[0110] In summary, the embodiments of the present application provide a method for determining the resistance value of a resistor in a sampling compensation circuit. The method can obtain multiple alternative resistance value combinations of multiple voltage-dividing resistors in the sampling compensation circuit, and when the resistance value combinations of the multiple voltage-dividing resistors are each alternative resistance value combination, determine the alternative change curve of the input voltage of the sampling compensation circuit with the ambient temperature, and determine the similarity between each alternative change curve and the reference change curve of the target voltage of the battery pack with the ambient temperature. Then, based on the alternative resistance value combination corresponding to the alternative change curve whose similarity is greater than the similarity threshold, determine the target resistance value of each voltage-dividing resistor. Since there is no need to manually determine the resistance value of the voltage-dividing resistor based on work experience, the efficiency of determining the resistance value of the voltage-dividing resistor is effectively improved. In addition, human error can be avoided, thereby improving the accuracy of the resistance value of the determined voltage-dividing resistor to a certain extent.
[0111] The embodiment of the present application provides a device for determining the resistance value of a resistor in a sampling compensation circuit, wherein the input end of the sampling compensation circuit is connected in parallel with a battery pack, and the output end of the sampling compensation circuit is connected to a charging management device of the battery pack. Figure 7 , the apparatus 500 comprises:
[0112] The acquisition module 501 is configured to acquire a plurality of candidate resistance value combinations based on a plurality of candidate resistance values of each voltage-dividing resistor in the sampling compensation circuit, wherein each candidate resistance value combination includes: an candidate resistance value of each voltage-dividing resistor.
[0113] The first determining module 502 is configured to determine an alternative variation curve of the input voltage of the sampling compensation circuit versus the ambient temperature when the resistance combinations of the plurality of voltage-dividing resistors are candidate resistance combinations.
[0114] The second determining module 503 is configured to determine the similarity between each candidate variation curve and a reference variation curve of the target voltage of the battery pack as a function of ambient temperature.
[0115] The third determining module 504 is configured to determine a target resistance value of each voltage-dividing resistor based on candidate resistance value combinations corresponding to candidate change curves having a similarity greater than a similarity threshold.
[0116] Optionally, the first determining module 502 may be configured to:
[0117] For each candidate resistance combination, when the resistance combination of multiple voltage divider resistors is the candidate resistance combination, the input voltage of the sampling compensation circuit at each ambient temperature is determined to obtain an alternative variation curve of the input voltage of the sampling compensation circuit with the ambient temperature.
[0118] Optionally, the sampling compensation circuit further includes: a negative ambient temperature coefficient NTC resistor, wherein the resistance of the NTC resistor is related to the ambient temperature. The first determination module 502 can be used to:
[0119] Obtaining a functional relationship between an input voltage of the sampling and compensation circuit, a resistance value of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit, wherein each resistor is one of the following resistors: an NTC resistor and a voltage divider resistor, and the output voltage is a voltage threshold;
[0120] Based on the functional relationship, the alternative resistance combination, the output voltage, and the resistance of the NTC resistor at each ambient temperature, the input voltage of the sampling compensation circuit at each ambient temperature is determined.
[0121] Optionally, the first determining module 502 may be configured to:
[0122] Based on the series-parallel relationship of the plurality of resistors included in the sampling and compensation circuit and the output voltage of the sampling and compensation circuit, obtaining a functional relationship between the input voltage of the sampling and compensation circuit, the resistance values of the resistors of the sampling and compensation circuit, and the output voltage of the sampling and compensation circuit;
[0123] The multiple resistors include: an NTC resistor and various voltage divider resistors.
[0124] Optionally, the multiple voltage-dividing resistors include: a first voltage-dividing resistor, a second voltage-dividing resistor, and a third voltage-dividing resistor, the first voltage-dividing resistor is connected in series with the NTC resistor, the second voltage-dividing resistor is connected in parallel with the first voltage-dividing resistor and the NTC resistor connected in series, and then connected in series with the third voltage-dividing resistor, one end of the first voltage-dividing resistor and the second voltage-dividing resistor is connected to the positive electrode of the battery pack, the first end of the first voltage-dividing resistor and the first end of the third voltage-dividing resistor serve as input ends of the sampling compensation circuit and are connected in parallel with the battery pack; both ends of the third voltage-dividing resistor serve as output ends of the sampling compensation circuit and are connected to the charging management device;
[0125] This functional relationship satisfies:
[0126]
[0127] Among them, V T-b-n is the input voltage, V out is the output voltage, r1 is the structure of the first voltage divider resistor, r2 is the resistance of the second voltage divider resistor, r3 is the resistance of the third voltage divider resistor, T is the ambient temperature, R NTC-T is the resistance of the NTC resistor at ambient temperature T.
[0128] Optionally, the second determining module 303 may be configured to:
[0129] For each candidate change curve, determining the sum of squares of residuals between the candidate change curve and the reference change curve;
[0130] Based on the residual sum of squares, the similarity between the candidate change curve and the reference change curve is determined;
[0131] Among them, the similarity is negatively correlated with the residual sum of squares.
[0132] Optionally, the target voltage is a charging voltage of the battery pack.
[0133] In summary, an embodiment of the present application provides a device for determining the resistance value of a resistor in a sampling compensation circuit. The device is capable of obtaining multiple alternative resistance value combinations of multiple voltage-dividing resistors in the sampling compensation circuit, and when the resistance value combinations of the multiple voltage-dividing resistors are each alternative resistance value combination, determining an alternative variation curve of the input voltage of the sampling compensation circuit with the ambient temperature, and determining the similarity between each alternative variation curve and a reference variation curve of the target voltage of the battery pack with the ambient temperature, and then determining the target resistance value of each voltage-dividing resistor based on the alternative resistance value combination corresponding to the alternative variation curve whose similarity is greater than a similarity threshold. Since there is no need to manually determine the resistance value of the voltage-dividing resistor based on work experience, the efficiency of determining the resistance value of the voltage-dividing resistor is effectively improved. In addition, human error can be avoided, thereby improving the accuracy of the determined resistance value of the voltage-dividing resistor to a certain extent.
[0134] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, electronic device 600 includes: a processor 601 and a memory 603. Processor 601 and memory 603 are connected, for example, via a bus 602. Optionally, electronic device 600 may further include a transceiver 604. It should be noted that in actual applications, the number of transceivers 604 is not limited to one, and the structure of electronic device 600 does not constitute a limitation on the embodiments of this application.
[0135] The processor 601 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 601 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0136] The bus 602 may include a path for transmitting information between the above components. The bus 602 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 602 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0137] The memory 603 is used to store a computer program corresponding to the method for determining the resistance value of the sampling compensation circuit in the above-mentioned embodiment of the present application. The computer program is controlled and executed by the processor 601. The processor 601 is used to execute the computer program stored in the memory 603 to implement the content of the above-mentioned method embodiment.
[0138] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for determining the resistance value of a resistor in a sampling compensation circuit as provided in the above method embodiment is implemented. For example, Figure 2 or Figure 3 The method shown.
[0139] The embodiment of the present application provides a computer program product, which includes a computer program or computer instructions. When the computer program or computer instructions are executed by a processor, the method for determining the resistance value of a resistor in a sampling compensation circuit as provided in the above method embodiment is implemented. For example, Figure 2 or Figure 3 The method shown.
[0140] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0141] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0142] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0143] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0144] In this application, unless otherwise specified or limited, the terms "installed," "connected," "connect," "fixed," etc. should be understood in a broad sense. For example, they can refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. Those skilled in the art will understand the specific meanings of the above terms in this application based on specific circumstances.
[0145] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for determining the resistance value of a resistor in a sampling compensation circuit, characterized in that: The input end of the sampling compensation circuit is connected in parallel with the battery pack, and the output end of the sampling compensation circuit is connected to the charging management device of the battery pack; the method includes: Based on multiple candidate resistance values of each voltage-dividing resistor in the sampling and compensation circuit, a plurality of candidate resistance value combinations are obtained, each of the candidate resistance value combinations comprising: one candidate resistance value of each voltage-dividing resistor; When the resistance combinations of the plurality of voltage-dividing resistors are the candidate resistance combinations, determining a candidate variation curve of the input voltage of the sampling compensation circuit versus the ambient temperature; Determining the similarity between each of the candidate variation curves and a reference variation curve of the target voltage of the battery pack as a function of ambient temperature; The target resistance value of each of the voltage-dividing resistors is determined based on the candidate resistance value combinations corresponding to the candidate change curves having a similarity greater than a similarity threshold.
2. The method according to claim 1, characterized in that When the resistance combinations of the plurality of voltage-dividing resistors are the candidate resistance combinations, determining the candidate variation curve of the input voltage of the sampling compensation circuit with the ambient temperature includes: For each of the alternative resistance combinations, when the resistance combination of the plurality of voltage-dividing resistors is the alternative resistance combination, the input voltage of the sampling and compensation circuit at each ambient temperature is determined to obtain an alternative variation curve of the input voltage of the sampling and compensation circuit with the ambient temperature.
3. The method according to claim 2, characterized in that The sampling compensation circuit further includes: a negative ambient temperature coefficient (NTC) resistor, wherein the resistance of the NTC resistor is related to the ambient temperature; and determining the input voltage of the sampling compensation circuit at each ambient temperature includes: Obtaining a functional relationship between an input voltage of the sampling and compensation circuit, a resistance value of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit, wherein each resistor is one of the following resistors: the NTC resistor and the voltage divider resistor, and the output voltage is a voltage threshold; The input voltage of the sampling compensation circuit at each of the ambient temperatures is determined based on the functional relationship, the candidate resistance combination, the output voltage, and the resistance of the NTC resistor at each of the ambient temperatures.
4. The method according to claim 3, characterized in that Obtaining a functional relationship between an input voltage of the sampling and compensation circuit, resistance values of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit, includes: Based on a series-parallel relationship of a plurality of resistors included in the sampling and compensation circuit and an output voltage of the sampling and compensation circuit, obtaining a functional relationship between an input voltage of the sampling and compensation circuit, resistance values of each resistor of the sampling and compensation circuit, and an output voltage of the sampling and compensation circuit; The plurality of resistors include: the NTC resistor and each of the voltage-dividing resistors.
5. The method according to claim 4, characterized in that The multiple voltage-dividing resistors include: a first voltage-dividing resistor, a second voltage-dividing resistor, and a third voltage-dividing resistor, wherein the first voltage-dividing resistor is connected in series with the NTC resistor, the second voltage-dividing resistor is connected in parallel with the first voltage-dividing resistor and the NTC resistor connected in series, and then connected in series with the third voltage-dividing resistor, one end of the first voltage-dividing resistor and the second voltage-dividing resistor is connected to the positive electrode of the battery pack, the first end of the first voltage-dividing resistor and the first end of the third voltage-dividing resistor serve as input ends of the sampling compensation circuit and are connected in parallel with the battery pack; and both ends of the third voltage-dividing resistor serve as output ends of the sampling compensation circuit and are connected to the charging management device; The functional relationship satisfies: Among them, V T-b-n is the input voltage, V out is the output voltage, r1 is the structure of the first voltage divider resistor, r2 is the resistance of the second voltage divider resistor, r3 is the resistance of the third voltage divider resistor, T is the ambient temperature, R NTC-T is the resistance of the NTC resistor at the ambient temperature T.
6. The method according to any one of claims 1 to 5, characterized in that: Determining the similarity between each of the candidate variation curves and a reference variation curve of the target voltage of the battery pack versus ambient temperature includes: For each candidate change curve, determining a residual sum of squares between the candidate change curve and the reference change curve; determining a similarity between the candidate change curve and the reference change curve based on the residual sum of squares; The similarity is negatively correlated with the residual sum of squares.
7. The method according to any one of claims 1 to 5, characterized in that: The target voltage is the charging voltage of the battery pack.
8. A device for determining the resistance value of a resistor in a sampling compensation circuit, characterized in that: The input end of the sampling compensation circuit is connected in parallel with the battery pack, and the output end of the sampling compensation circuit is connected to the charging management device of the battery pack; the device includes: an acquisition module, configured to acquire a plurality of candidate resistance value combinations based on a plurality of candidate resistance values of each voltage-dividing resistor in the sampling and compensation circuit, each candidate resistance value combination comprising: one candidate resistance value of each voltage-dividing resistor; A first determining module is configured to determine an alternative variation curve of the input voltage of the sampling compensation circuit versus the ambient temperature when the resistance combinations of the plurality of voltage-dividing resistors are the respective alternative resistance combinations; a second determining module, configured to determine a similarity between each of the candidate variation curves and a reference variation curve of the target voltage of the battery pack as a function of ambient temperature; The third determining module is configured to determine a target resistance value of each of the voltage-dividing resistors based on the candidate resistance value combinations corresponding to the candidate change curves having a similarity greater than a similarity threshold.
9. An electronic device, characterized in that: The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.