Electrochemical impedance spectroscopy (EIS) analysis method and device and electronic equipment
By actively controlling the steps of the battery charging current in the electronic device, and the EIS analysis, the problem of EIS analysis accuracy in the existing technology is solved, and the accuracy of the analysis results is improved.
Patent Information
- Application Number
- CN202310920716.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
When existing electronic devices use the EIS analysis method to monitor batteries, there is a problem of poor analysis accuracy.
By obtaining the section jump parameters, the charging current of the battery is actively controlled to make a step jump, so that the level of the charging current of the battery is at the target level range, and EIS analysis is performed based on multiple target sampling current values and voltage values.
Improve the accuracy and results of EIS analysis, and weaken the impact of measurement noise of charging voltage and current.
Smart Images

Figure CN119375743A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to an electrochemical impedance spectroscopy (EIS) analysis method, device and electronic equipment. Background Art
[0002] With the development of battery and charging technology, more and more devices on the market will be equipped with batteries for use. During the battery process, the battery may be damaged to varying degrees, such as lithium deposition, rapid power loss, increased impedance, etc. In order to better monitor the status of the battery, analysis methods such as EIS (Electrochemical impedance spectroscopy, EIS) analysis can be used to monitor the battery status or determine factors that limit electrode performance, such as the battery's SOC (State of Charger), SOH (State of Health), conductivity, charge transfer characteristics, passivation film characteristics, etc. Current electronic equipment has the problem of poor analysis accuracy when using the EIS analysis method to analyze and monitor batteries. Summary of the invention
[0003] The embodiments of the present application disclose an electrochemical impedance spectroscopy (EIS) analysis method, device and electronic equipment, which can improve the precision of EIS analysis and improve the accuracy of EIS analysis results.
[0004] The present application discloses an electrochemical impedance spectroscopy (EIS) analysis method, which is applied to electronic equipment. The method comprises:
[0005] Get step current parameters;
[0006] Controlling the charging current of the battery to perform step-down according to the step current parameter, so that the step amplitude of the charging current of the battery is within a target step range; the target step range is determined according to the step current parameter;
[0007] An EIS analysis is performed according to a plurality of target sampling current values and a plurality of target sampling voltage values to obtain an EIS analysis result; the plurality of target sampling current values satisfy an EIS analysis condition, the EIS analysis condition at least including that the step amplitude is within the target step range, and the plurality of target sampling voltage values and the plurality of target sampling current values correspond to the same sampling time period.
[0008] The present application embodiment discloses an electrochemical impedance spectroscopy (EIS) analysis device, which is applied to electronic equipment, and the device comprises:
[0009] A parameter acquisition module, used to obtain step current parameters;
[0010] A current control module, used for controlling the charging current of the battery to perform step-down according to the step current parameter, so that the step amplitude of the charging current of the battery is within a target step range; the target step range is determined according to the step current parameter;
[0011] The EIS analysis module is used to perform EIS analysis according to multiple target sampling current values and multiple target sampling voltage values to obtain EIS analysis results; the multiple target sampling current values meet EIS analysis conditions, and the EIS analysis conditions at least include that the step amplitude is within the target step range, and the multiple target sampling voltage values and the multiple target sampling current values correspond to the same sampling time period.
[0012] An embodiment of the present application discloses an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method described above.
[0013] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described above is implemented.
[0014] The electrochemical impedance spectroscopy (EIS) analysis method, device, electronic device, and storage medium provided in the embodiment of the present application obtain step current parameters, and control the charging current of the battery to perform step reduction according to the step current parameters, so that the step amplitude of the charging current of the battery is within the target step range, and the target step range is determined according to the step current parameters, and then perform EIS analysis according to multiple target sampling current values and multiple target sampling voltage values to obtain EIS analysis results, and the multiple target sampling current values meet the EIS analysis conditions, and the EIS analysis conditions at least include that the step amplitude is within the target step range, and the multiple target sampling voltage values and the multiple target sampling current values correspond to the same sampling time period. In the embodiment of the present application, the charging current of the battery is actively controlled to perform step reduction, so that the charging current of the battery produces a large step-amplitude downward step, which can weaken the influence of the measurement noise of the charging voltage and charging current during the EIS analysis process, improve the accuracy of the EIS analysis, and improve the accuracy of the EIS analysis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1A schematic diagram of a step change in current and voltage in one embodiment;
[0017] Figure 2 This is an application scenario diagram of an electrochemical impedance spectroscopy (EIS) analysis method in one embodiment;
[0018] Figure 3 A flowchart of an electrochemical impedance spectroscopy (EIS) analysis method in one embodiment;
[0019] Figure 4 A flow chart of an electrochemical impedance spectroscopy (EIS) analysis method in another embodiment;
[0020] Figure 5 A flowchart of an electrochemical impedance spectroscopy (EIS) analysis method in another embodiment;
[0021] Figure 6 A schematic diagram of the EIS analysis results in one embodiment;
[0022] Figure 7 A block diagram of an electrochemical impedance spectroscopy (EIS) analysis device in one embodiment;
[0023] Figure 8 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0026] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, the first step current threshold may be referred to as the second step current threshold, and similarly, the second step current threshold may be referred to as the first step current threshold. Both the first step current threshold and the second step current threshold are step current thresholds, but they are not the same step current threshold. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the schemes, or any combination of multiple schemes.
[0027] With the development of battery and charging technology, the fast charging power of the fast charging protocol has been greatly improved, such as from the previous 20W (watt) to 100W, or even 150W, which greatly improves the charging speed of the battery. However, the high-current charging mode may also cause damage to the battery in some cases, such as battery lithium deposition. In order to better monitor the battery-related status, during the battery charging process, the battery status can be analyzed and monitored by analysis methods such as EIS analysis. EIS is a method of studying the electrode system by using a small-amplitude sinusoidal potential (or current) as a perturbation electrical signal to produce an approximately linear response in the electrode system, and measuring the ratio of the AC potential to the current signal of the electrode system over a wide frequency range. This ratio is the impedance of the electrode system. EIS analysis method has become a powerful tool for studying complex chemical and electrochemical processes (such as corrosion, etc.), and is widely used in electrochemical energy systems (fuel cells, supercapacitors and secondary batteries), especially in predicting battery status (such as battery SOC, SOH) and determining limiting electrode performance factors (battery conductivity, charge transfer characteristics, passivation film characteristics, etc.).
[0028] Currently, electronic devices perform EIS analysis by collecting the step current signal of the battery during charging and then measuring the change of the corresponding system potential over time. Figure 1 FIG. 1 is a schematic diagram showing a step change in current and voltage in an embodiment. Figure 1 As shown, the charging current 110 of the battery in the electronic device needs to produce a step change, and the step change of the charging current 110 will cause a step change of the charging voltage 120. Figure 1 The block 130 in FIG. 1 is the voltage and current components required for EIS analysis. During the EIS analysis, the complex impedance at different frequencies can be calculated by the following formula (1):
[0029] Z=DFT(battery_voltage) / DFT(battery_current) Formula (1);
[0030] Among them, Z represents complex impedance, DFT represents discrete Fourier transform, and the function of DFT is to transform the signal from the time domain to the frequency domain. Both the time domain and the frequency domain are discrete, so it is possible to find out which sinusoidal waves a signal is superimposed on, and the result is the amplitude and phase of the sinusoidal wave. battery_voltage represents the voltage value, and battery_current represents the current value.
[0031] The calculation formula of DFT can be shown as the following formula (2) and formula (3):
[0032]
[0033]
[0034] Among them, X(k) represents the result obtained by DFT transformation; x(n) represents the sampled signal value, such as current value, voltage value, etc.; N represents the number of signals sampled in the sampling period, and j is an imaginary unit.
[0035] When electronic devices actually use the EIS analysis algorithm, the step amplitude of the battery's charging current needs to be considered, because both voltage and current will have measurement noise. If the charging current changes too little, the signal required for EIS analysis will be submerged in the measurement noise, causing the results of the EIS analysis to be overly affected by the measurement noise. Therefore, the size of the battery's charging current step amplitude will affect the accuracy of the EIS analysis. In related technologies, the charging current change amplitude is monitored in real time. However, in current charging technologies, the charging current is reduced when the battery voltage reaches a certain threshold, and the amplitude of each reduction in the charging current cannot meet the accuracy requirements of the EIS analysis. For example, the charging current drops by 500 mA each time, and the reduction amplitude is too small, resulting in poor EIS analysis accuracy.
[0036] The embodiments of the present application provide an electrochemical impedance spectroscopy (EIS) analysis method, device, electronic device, and storage medium, which can actively control the charging current of a battery to perform a step-down current reduction, so that the charging current of the battery produces a large step-down step, which can weaken the influence of the measurement noise of the charging voltage and charging current during the EIS analysis process, improve the accuracy of the EIS analysis, and improve the accuracy of the EIS analysis results.
[0037] Figure 2 FIG. 1 is an application scenario diagram of an electrochemical impedance spectroscopy (EIS) analysis method in an embodiment. Figure 2As shown, the electronic device 210 can be connected to the charging device 220, and the connection method may include but is not limited to wired connection and wireless connection, etc. The wired connection may include wired connection through an interface such as USB (Universal Serial Bus), and the wireless connection may include but is not limited to connection through electromagnetic induction, electric field coupling, magnetic resonance, etc. A charging channel can be established between the charging device 220 and the electronic device 210, and the charging device 220 can output a charging current and / or a charging voltage to the electronic device 210 to charge the electronic device 210, and the charging method can be a wired charging method or a wireless charging method.
[0038] Optionally, the charging device 220 may include but is not limited to an adapter, a mobile power supply, etc., and the electronic device 210 may include but is not limited to a mobile phone, a tablet computer, a wearable device, a laptop computer, a PC (Personal Computer), a vehicle, etc. The embodiment of the present application does not specifically limit the product form of the charging device 220 and the electronic device 210. As a specific implementation, the charging device 220 can support a first charging mode and a second charging mode, wherein the charging speed of the first charging mode is greater than that of the second charging mode, such as the first charging mode is a fast charging mode, and the second charging mode is a normal charging mode.
[0039] During the process of charging the electronic device 210 by the charging device 220, the electronic device 210 can obtain the step current parameter, and control the charging current of the battery to step down according to the step current parameter, so that the step amplitude of the charging current of the battery is within the target step range. The electronic device can perform EIS analysis according to multiple target sampling current values and multiple target sampling voltage values to obtain EIS analysis results, and the multiple target sampling current values meet the EIS analysis conditions, and the EIS analysis conditions at least include that the step amplitude is within the target step range, and the multiple target sampling voltage values and the multiple target sampling current values correspond to the same sampling time period.
[0040] like Figure 3 As shown, in one embodiment, an electrochemical impedance spectroscopy (EIS) analysis method is provided, which can be applied to the above-mentioned electronic device. The method may include the following steps:
[0041] Step 310: Obtain step current parameters.
[0042] The step current parameter may refer to the relevant parameters for actively controlling the charging current of the battery to perform step reduction. In some embodiments, the step current parameter may include parameters such as a first step current threshold and a second step current threshold. The first step current threshold may refer to the maximum current value of the charging current when the charging current of the battery is controlled to perform step reduction, that is, the charging current must be less than or equal to the first step current threshold to control the charging current to perform step reduction, such as 6000mA (milliamperes), 6300mA, 5500mA, etc.; the second step current threshold may refer to the current value reached by the charging current after the charging current of the battery is step reduced, such as 1000mA, 1200mA, 700mA, etc.
[0043] Optionally, the step current parameter may also include parameters such as step current value, sampling frequency, and sampling period. The step current value may refer to the current value that is reduced each time the charging current of the battery is stepped down, such as 5000mA, 4000mA, etc.; the sampling frequency refers to the frequency of sampling the charging voltage and charging current of the battery, such as 1 time / s (second), etc.; the sampling period refers to the sampling time corresponding to the sampling data (such as sampling current value, sampling voltage value, etc.) for EIS analysis, such as 40s, 1 minute, etc. It should be noted that the specific step current parameters can be configured according to actual needs, and the embodiments of the present application are not limited to this.
[0044] In some embodiments, a parameter configuration file may be pre-stored in the electronic device, and the step current parameters may be stored in the parameter configuration file. The parameter configuration file may be parsed, and one or more step current parameters may be read from the parameter configuration file. As a specific implementation, the electronic device may load and run a HIDL (HAL interface definition language, hardware abstraction layer interface definition language) service, and may create an EIS thread in the HIDL service and initialize the EIS thread. The EIS thread may be used to perform functions such as actively controlling the charging current to perform step current reduction and EIS analysis. The EIS thread may parse the parameter configuration file and read one or more step current parameters from the parameter configuration file. The EIS thread may use an opening function such as fopen to open the parameter configuration file, and use a reading function such as fgets to obtain all character contents contained in the parameter configuration file.
[0045] For example, the content of the parameter configuration file is as follows:
[0046] sampling_fmhz:1000
[0047] cal_fmhz_num:1
[0048] Auto_trigger_current:6000,1000
[0049] Among them, sampling_fmhz:1000 means that the sampling frequency is 1000 milliseconds, cal_fmhz_num:1 means that the number of samples each time is 1, Auto_trigger_current:6000,1000 means that the first step current threshold is 6000mA, the second step current threshold is 1000mA, etc. If only the first step current threshold and the second step current threshold need to be obtained, the EIS thread can write the content of each line of characters read into the cache, and determine whether the character content currently read contains key characters, such as "Auto_trigger_current" or "trigger_current", etc. If it contains key characters, the character content currently read is identified and segmented to obtain the character strings corresponding to the first step current threshold and the second step current threshold, respectively, and then the character strings are converted into numbers to obtain the first step current threshold and the second step current threshold.
[0050] Optionally, if the EIS thread cannot open the parameter configuration file normally (such as the file is lost, damaged, or not configured), or the EIS thread cannot read the required step current parameters from the parameter configuration file, indicating that the subsequent active control of the battery charging current for step current reduction cannot be executed, the EIS thread can be closed. This can avoid the EIS thread being in a running state after being opened, affecting the power consumption of the electronic device and unnecessary waste of resources.
[0051] Step 320 , controlling the charging current of the battery to perform step-down according to the step current parameter, so that the step amplitude of the charging current of the battery is within the target step range.
[0052] The electronic device can actively control the battery's charging current to perform step-down according to the step current parameters, so that the charging current undergoes a step change, and the step amplitude is within the target step range. The step amplitude may refer to the amplitude of change in the current value when the charging current undergoes a step-down.
[0053] The target step range may refer to the step amplitude range required for EIS analysis. Since the step amplitude of the battery charging current will affect the accuracy of the EIS analysis, in the embodiment of the present application, the battery charging current is actively controlled to perform a step reduction, generating a step change with a step amplitude that meets the EIS analysis accuracy, thereby improving the accuracy of subsequent EIS analysis.
[0054] The target step range is based on the step current parameter, and the step current parameter can be used to indicate the step amplitude of the step current reduction of the charging current, that is, the step current parameter can be used to indicate the current value that decreases when the charging current changes in step. In some embodiments, the step current parameter may include a first step current threshold and a second step current threshold, and the current value that decreases when the charging current changes in step may be the difference between the first step current threshold and the second step current threshold, and the target step range may be a range defined based on the difference, for example, if the difference is 5000mA, the target step range may be 4800mA to 5200mA, or 4800mA to 5100mA, etc. In some embodiments, the step current parameter may include a step current value, and the target step range may be a range defined based on the step current value, for example, if the step current value is 4800mA, the target step range may be 4700mA to 5000mA, etc., but is not limited thereto.
[0055] In some embodiments, the required target step range can also be determined in advance, and the step current parameters can be configured according to the target step range. For example, if the target step range required for EIS analysis is greater than 4500mA, the first step current threshold and the second step current threshold can be configured to be 6500mA and 1800mA, respectively, so that the step amplitude of the step reduction of the charging current matches the target step range and is within the target step range, thereby collecting the data required for EIS analysis.
[0056] As an implementation method, the electronic device may send a control instruction to the charging device, and the control instruction may carry a step current parameter, such as the current value reached after the charging current is stepped down (i.e., the second step current threshold) or the decreased current value (i.e., the step current value), etc. After receiving the control instruction sent by the electronic device, the charging device may parse the control instruction to obtain the step current parameter, and reduce the output charging current according to the step current parameter, so that the charging current of the battery input to the electronic device is stepped down. This method can realize the control of the charging current more quickly and accurately, and will not cause waste of electric energy.
[0057] As another implementation, the electronic device may also be provided with a current reduction module, which may be electrically connected to the battery, and may control the current reduction module to reduce the charging current input to the battery according to the step current parameter, so that the charging current input to the battery of the electronic device undergoes a step current reduction. This method does not affect the charging current output by the charging device, and does not require communication with the charging device, which can improve the compatibility and adaptability between the electronic device and the charging device.
[0058] In some embodiments, a step trigger condition for actively controlling the battery charging current to perform a step reduction can be preset. When the step trigger condition is met, the battery charging current is controlled to perform a step reduction according to the step current parameter.
[0059] Optionally, the step trigger condition may include one or more of the following:
[0060] Condition 1: The duration between the current time and the time when the EIS analysis was last performed is greater than or equal to the second duration.
[0061] The time period for actively controlling the battery's charging current to perform a step-down can be pre-configured, and the time period can be a second duration. The time difference between two consecutive times that the electronic device actively controls the battery's charging current to perform a step-down must be greater than or equal to the second duration. The time when the last ESI analysis was performed can refer to the time when the EIS analysis result was last calculated. The time between the current moment and the time when the last EIS analysis was performed can be calculated, and it can be determined whether the time is greater than or equal to the second duration. If the time between the current moment and the time when the last EIS analysis was performed is greater than or equal to the second duration, the battery's charging current can be controlled to perform a step-down, and an EIS analysis can be performed. If the time between the current moment and the time when the last EIS analysis was performed is less than the second duration, the battery's charging current may not be controlled to perform a step-down, and an EIS analysis may not be performed.
[0062] The second time period can be set according to actual needs, for example, the second time period can be 5 days, 3 days, 2 days, 50 hours, etc., but not limited thereto. Actively controlling the charging current of the battery to perform step-down current reduction based on a preset time period can reduce the impact on the charging speed and improve the accuracy of the EIS analysis.
[0063] Condition 2: The battery temperature is within the target temperature range.
[0064] Since the EIS analysis results will be affected by the temperature of the battery, a target temperature range for EIS analysis can be set. The target temperature range can be set according to the experiment. For example, the target temperature range can be 35 to 39 degrees, etc., but it is not limited to this. As a specific embodiment, a temperature sensor can be set, and the temperature of the battery can be detected by the temperature sensor. The temperature detected by the temperature sensor can be obtained, and it can be determined whether the temperature is in the target temperature range. If it is not in the target temperature range, the charging current of the battery can be controlled to perform a step-down flow, and EIS analysis is not performed. If the temperature is in the target temperature range, the charging current of the battery can be controlled to perform a step-down flow, and EIS analysis can be performed. The accuracy of the EIS analysis results can be guaranteed.
[0065] Condition three: The battery power is within the target power range.
[0066] Since the EIS analysis results will be affected by the battery power, a target power range for EIS analysis can be set. The target power range can be set according to the experiment. For example, the target power range can be 50% to 75%, etc., but not limited to this. The battery power can be obtained in real time or according to a preset cycle. If the battery power is within the target power range, the battery charging current can be controlled to step down and perform EIS analysis; if the battery power is not within the target power range, the battery charging current can not be controlled to step down and EIS analysis is not performed. The accuracy of the EIS analysis results can be guaranteed.
[0067] Condition 4: The electronic device is in the screen-off state.
[0068] When an electronic device is in the screen-off state, it means that the display screen of the electronic device is not powered on and does not display any information or images. When an electronic device is in the screen-on state, it means that the display screen of the electronic device is powered on and displays information or images. When the electronic device is in the screen-on state, the power consumption of the electronic device is large and the power consumption usually fluctuates. When the electronic device is in the screen-off state, the power consumption of the electronic device is small and the power consumption is relatively stable. Therefore, when the electronic device is in the screen-off state, the charging current of the battery can be actively controlled to perform step current reduction and perform EIS analysis, which can improve the accuracy of the EIS analysis.
[0069] In the embodiment of the present application, the electronic device can control the charging current of the battery to perform step reduction according to the step current parameters only when it is determined that the step trigger condition is met. By limiting the conditions for actively controlling the charging current of the battery to perform step reduction, the accuracy of the EIS analysis can be guaranteed and the impact on the charging speed can be reduced.
[0070] Step 330 , performing EIS analysis according to a plurality of target sampling current values and a plurality of target sampling voltage values to obtain an EIS analysis result; the plurality of target sampling current values satisfy an EIS analysis condition, and the EIS analysis condition at least includes that the step amplitude is within a target step range.
[0071] After the electronic device controls the charging current of the battery to perform a step-down, the step change of the charging current will also cause the charging voltage to change in a step manner, and the charging voltage is step-downed, and the step amplitude matches the step amplitude of the charging current. Optionally, a sampling module may be provided in the electronic device, through which the charging current and charging voltage of the battery can be sampled respectively to obtain a sampled current value and a sampled voltage value, and the sampled current value and sampled voltage value obtained by real-time sampling can be obtained, and it can be determined whether the sampled current value meets the EIS analysis conditions, and an EIS analysis is performed based on multiple target sampled current values that meet the EIS analysis conditions, and multiple target sampled voltage values corresponding to the multiple target sampled current values, to obtain an EIS analysis result. The multiple target sampled voltage values and the multiple target sampled current values correspond to the same sampling time period.
[0072] In some embodiments, after controlling the charging current of the battery to perform a step-down, the target number of sampled current values can be obtained in the order of the sampling time from near to far from the current time, and the target number of sampled current values can be used to characterize the state of the charging current. The target number can be determined according to the sampling period and the sampling frequency. The target number can be the ratio of the sampling period to the sampling frequency. For example, if the sampling period is 40s and the sampling frequency is 1 time / s, the target number can be 40, but it is not limited thereto. It can be determined whether the sampled current value of the target number meets the EIS condition. The EIS condition can at least include that the step amplitude is within the target step range. Further, the step amplitude can be calculated according to the sampled current value of the target number. For example, the maximum sampled current value in the sampled current value of the target number can be subtracted from the minimum sampled current value to obtain the step amplitude, and then it is determined whether the step amplitude is within the target step range. If it is not within the target step range, it means that the EIS condition is not met, and the next sampled current value can be waited for, and the sampled current value of the target number is updated, and then it is determined whether the ESI condition is met.
[0073] If it is determined that the target number of sampling current values meets the EIS analysis conditions, the target number of sampling current values can be used as the target sampling current values, and a target sampling voltage value matching the target sampling current value (which may refer to the same sampling time) is obtained, and DFT transformation calculations are performed on the target number of target sampling current values and the target number of target sampling voltage values, respectively, and then the EIS analysis results are determined based on the DFT change calculation results. The EIS analysis results may include the complex impedance in formula (1) provided in the above embodiment.
[0074] As a specific implementation, the EIS thread can continuously obtain the latest collected sampled current value and sampled voltage value, and control the battery charging current to perform step-down according to the step current parameters. After controlling the battery charging current to perform step-down, each time the EIS thread obtains a new sampled current value, it can determine whether the current target number of sampled current values meets the EIS analysis conditions, and when it is detected that the current target number of sampled current values meets the EIS conditions, perform EIS analysis to obtain EIS analysis results. Optionally, after the EIS thread obtains the EIS analysis results, the EIS analysis results can be passed to the battery monitoring thread in the HIDL service, wherein the battery monitoring thread can be used to monitor the status of the battery, such as the battery's SOH, SOC, etc. Alternatively, the EIS thread can also write the EIS analysis results to the storage space, and read the EIS analysis results from the storage space when the battery monitoring thread needs it. The EIS thread can be shut down and restarted the next time an EIS analysis is needed, which can reduce the waste of resources of the electronic device.
[0075] Optionally, after calculating the EIS analysis result, the time when the EIS analysis is performed can be recorded. The time when the EIS analysis is performed can be the time when the EIS analysis result is obtained, so as to facilitate the judgment of whether to actively control the battery charging current to perform step reduction when the electronic device is charged next time.
[0076] In the embodiment of the present application, the charging current of the battery is actively controlled to perform a step-down current reduction, so that the charging current of the battery produces a step-down step with a large step amplitude, which can weaken the influence of the measurement noise of the charging voltage and charging current during the EIS analysis process, improve the accuracy of the EIS analysis, and improve the accuracy of the EIS analysis results.
[0077] like Figure 4 As shown, in another embodiment, an electrochemical impedance spectroscopy (EIS) analysis method is provided, which can be applied to the above-mentioned electronic device. The method may include the following steps:
[0078] Step 402: Acquire step current parameters, where the step current parameters include a first step current threshold and a second step current threshold.
[0079] The description of step 402 may refer to the related description of step 310 in the above embodiment, and will not be repeated here.
[0080] Step 404 : when it is detected that the charging current of the battery matches the first step current threshold, control the charging current of the battery to be reduced to a second step current threshold.
[0081] The charging current of the battery matches the first step current threshold, which may refer to the current value of the charging battery being equal to the first step current threshold, or may refer to the current value of the charging battery being close to the first step current threshold, and the current value of the charging battery being within the current value range corresponding to the first step current threshold. Optionally, the upper limit value of the current value range may be the first step current threshold, and the lower limit value of the current value range may be the difference between the first step current threshold and the preset value. For example, the first step current threshold is 6000mA, and the preset value may be 300mA, then the current value range may be 5700mA to 6000mA. It should be noted that the current value range corresponding to the first step current threshold can be set according to actual needs, and the embodiments of the present application are not limited here.
[0082] In the embodiment of the present application, by setting the first step current threshold, the maximum current value for controlling the step reduction of the charging current is limited, which can reduce the impact on the charging speed and improve the accuracy of the EIS analysis.
[0083] When it is detected that the charging current of the battery matches the first step current threshold, the charging current of the battery can be controlled to be reduced to the second step current threshold. As a specific implementation, the EIS thread can write the second step current threshold into the kernel layer, and control the charging current to be reduced to the second step current threshold through the kernel layer. The kernel layer can drive the underlying power management module or charging module, etc., to send a control instruction carrying the second step current threshold to the charging device, so that the charging device reduces the output charging current to the second step current threshold; or the kernel layer can drive the underlying power management module or charging module, etc. to control the current reduction module to reduce the charging current input to the battery to the second step current threshold.
[0084] In some embodiments, when the charging current of the battery is unstable, the sampled current value obtained by sampling will undergo relatively large fluctuations, resulting in excessive measurement noise, affecting the EIS analysis results. If the charging current of the battery is actively controlled to perform step-down when the charging current of the battery is unstable, the charging current after the step-down is likely to be in an unstable state, and it is difficult to obtain current data and voltage data that can be used for EIS analysis. Therefore, in order to ensure the accuracy of the EIS analysis results, the data for EIS analysis needs to be stable data, that is, the charging current of the battery needs to be in a stable state. When the electronic device determines that the charging current of the battery matches the first step current threshold, it can determine whether the charging current of the battery is stable. When it is determined that the charging current of the battery is stable, the charging current of the battery is controlled to perform step-down, thereby reducing the situation where the charging current is unstable after the step-down, ensuring the accuracy of the EIS analysis results, and reducing the useless regulation of the charging current, ensuring the charging efficiency.
[0085] In some embodiments, the electronic device may sample the charging current and charging voltage of the battery according to a sampling period. The sampled current value of the battery may be obtained, and a current sequence may be generated based on multiple sampled current values, and each sampled current value included in the current sequence may be arranged in order from large to small or from small to large. It may be determined based on the current sequence whether the charging current of the battery matches the first step current threshold, and whether the charging current of the battery is stable, and when it is determined that the charging current of the battery matches the first step current threshold and the charging current of the battery is stable, the charging current of the battery is controlled to be reduced to the second step current threshold.
[0086] The sampling period can be set according to actual needs. For example, the sampling period can be 1 time / s, or 2 times / s, etc., but not limited to this. Optionally, the sequence length of the current sequence can be a fixed value, that is, the number of sampled current values contained in the current sequence can be a fixed value, and the number of sampled current values contained in the current sequence can be a target number. For example, the target number can be 40, 35, 37, etc., but not limited to this. The total number of sampled current values obtained can be counted. If the total number of sampled current values obtained reaches the target number, the sampled current values of the target number can be arranged in order from large to small to generate a current sequence. Furthermore, if there are multiple identical sampled current values, they can be arranged in order from far to near from the sampling time to the current time. If the number of sampled current values obtained does not reach the target number, the current sequence can be not generated until the target number of sampled current values is obtained.
[0087] After the current sequence is generated, if a new sampled current value is obtained, the current sequence can be updated according to the new sampled current value, the sampled current value arranged at the first position in the current sequence can be deleted, and the new sampled current value can be added to the current sequence, and the new sampled current value can be inserted into the current sequence according to the size relationship between the new sampled current value and each sampled current value in the current sequence, so as to update the current sequence. For example, if the new sampled current value is less than or equal to each sampled current value in the current sequence, the new sampled current value can be inserted at the end of the current sequence.
[0088] The electronic device can determine whether the current charging current of the battery matches the first step current threshold based on the current current sequence, and when it is determined that the current charging current of the battery matches the first step current threshold, determine whether the current charging current is stable based on the current current sequence; if it is determined that the current charging current is stable, the charging current of the battery can be actively controlled to perform step reduction.
[0089] In some embodiments, the current sequence may include a first subsequence and a second subsequence, the first subsequence may include M sampled current values, the second subsequence may include N sampled current values, M and N are both integers greater than 1, and the sum of M and N is the above-mentioned target number, and the absolute value of the difference between M and N is less than or equal to 1. Optionally, the sampled current values included in the current sequence are arranged in order from large to small, and the M sampled current values included in the first subsequence are greater than or equal to the N sampled current values included in the second subsequence. Alternatively, the sampled current values included in the current sequence are arranged in order from small to large, and the M sampled current values included in the first subsequence are less than or equal to the N sampled current values included in the second subsequence.
[0090] The current sequence can be evenly divided into a first subsequence and a second subsequence. For example, if the current sequence includes 40 sampled current values, and the 40 sampled current values are arranged in order from large to small, the first 20 sampled current values can be divided into the first subsequence, and the last 20 sampled current values can be divided into the second subsequence. Optionally, if the target number is an odd number, the number M of sampled current values included in the first subsequence can be greater than the number N of sampled current values included in the second subsequence. For example, if the current sequence includes 39 sampled current values, and the 39 sampled current values are arranged in order from large to small, the first 20 sampled current values can be divided into the first subsequence, and the last 19 sampled current values can be divided into the second subsequence; or, the number M of sampled current values included in the first subsequence can be less than the number N of sampled current values included in the second subsequence. For example, if the current sequence includes 39 sampled current values, the first 19 sampled current values can be divided into the first subsequence, and the last 20 sampled current values can be divided into the second subsequence, etc., but it is not limited thereto. By evenly dividing the current sequence into two subsequences, it is possible to more conveniently and accurately determine whether the charging current matches the first step current threshold and whether the charging current is stable, thereby improving processing efficiency and accuracy.
[0091] As an implementation, it is possible to determine whether the central sampling current value of the first subsequence is within a current value range, and to determine whether the central sampling current value of the second subsequence is within a current value range. The current value range corresponds to the first step current threshold, the upper limit of the current value range may be the first step current threshold, and the lower limit of the current value range may be the difference between the first step current threshold and the preset value.
[0092] The central sampling current value of the first subsequence may refer to the sampling current value arranged in the middle of the first subsequence. If M is an even number, the central sampling current value may be the sampling current value arranged in the M / 2th position. If M is an odd number, the central sampling current value may be the sampling current value arranged in the f(M / 2)th position, and f(M / 2) represents the value rounded down or rounded up to M / 2. Similarly, the central sampling current value of the second subsequence may refer to the sampling current value arranged in the middle of the second subsequence. If N is an even number, the central sampling current value may be the sampling current value arranged in the N / 2th position. If N is an odd number, the central sampling current value may be the sampling current value arranged in the f(N / 2)th position, and f(N / 2) represents the value rounded down or rounded up to N / 2.
[0093] If the central sampling current value of the first subsequence and the central sampling current value of the second subsequence are both within the current value range, it can be determined that the charging current of the battery matches the first step current threshold. Since the M sampling current values in the first subsequence are arranged in order from large to small, and the N sampling current values in the second subsequence are also arranged in order from large to small, and the number of sampling current values of the two subsequences is equal or close, the central sampling current values of the two subsequences can roughly reflect the charging current of the battery. If the central sampling current value of the first subsequence and the central sampling current value of the second subsequence are both within the current value range, it can be said that the current charging current of the battery matches the first step current threshold, and the judgment logic is simple and fast, which improves the processing efficiency.
[0094] It should be noted that the method of judging whether the charging current of the battery matches the first step current threshold based on the current sequence is not limited to the above method, and other methods may also be used. For example, the number of sampled current values in the current current sequence that are equal to the first step current threshold may be counted. If the number is greater than or equal to the number threshold, it can be determined that the charging current of the battery matches the first step current threshold, etc., but it is not limited to this.
[0095] If it is determined according to the current current sequence that the battery charging current does not match the first step current threshold, the next sampled current value may be waited for. After obtaining the new sampled current value and updating the current sequence, the updated current sequence may be used as the new current sequence, and the battery charging current may continue to be determined according to the current current sequence to determine whether it matches the first step current threshold, until it is detected that the battery charging current matches the first step current threshold, or other conditions for stopping detection of a match between the charging current and the first step current threshold are met, such as the battery charging current is less than the first step current threshold and the gap is large, or the EIS thread is suspended, or the EIS thread is closed, etc.
[0096] The electronic device can also determine whether the current charging current of the battery is stable based on the current current sequence. As an implementation, a sampling current value can be selected from the first half and the second half of the first subsequence and the second subsequence respectively, and the difference between the selected sampling current value and the center sampling current value can be calculated, and then the current charging current of the battery can be determined based on the difference. Among them, the first half refers to the sampling current value arranged before the center sampling current value in the subsequence, and the second half refers to the sampling current value arranged after the center sampling current value in the subsequence.
[0097] As a specific implementation, the first absolute value of the difference between the Xth sampling current value and the central sampling current value, and the second absolute value of the difference between the M-X+1th sampling current value and the central sampling current value in the first subsequence can be calculated, where X can be a positive integer, and X is less than or equal to M; the third absolute value of the difference between the Yth sampling current value and the central sampling current value, and the fourth absolute value of the difference between the N-Y+1th sampling current value and the central sampling current value in the second subsequence can also be calculated, where Y can be a positive integer, and Y is less than or equal to N. If the first absolute value of the difference, the second absolute value of the difference, the third absolute value of the difference, and the fourth absolute value of the difference are all less than the current threshold, it can be determined that the charging current of the battery is stable.
[0098] For the two sampling current values selected from each subsequence, the arrangement positions in the subsequence correspond, and the distance between one sampling current value selected from the subsequence and the first sampling current value in the subsequence, and the distance between the other sampling current value and the last sampling current value are the same. For example, X is 3, M is 20, and the first subsequence selects the 3rd sampling current value and the 18th sampling current value, and the distance between the 3rd sampling current value and the 1st sampling current value, and the distance between the 18th sampling current value and the 20th sampling current value are the same, and both differ by 2 sampling current values. For another example, Y is 4, N is 19, and the second subsequence selects the 4th sampling current value and the 16th sampling current value, and the distance between the 4th sampling current value and the 1st sampling current value, and the distance between the 16th sampling current value and the 19th sampling current value are the same, and both differ by 3 sampling current values.
[0099] Since the two sampled current values selected from the first subsequence are arranged in corresponding positions in the subsequence, the first difference absolute value and the second difference absolute value calculated in the first half and the second half of the center sampled current value can reflect the fluctuation of the sampled current value in the first subsequence. Similarly, the two sampled current values selected from the second subsequence are arranged in corresponding positions in the subsequence, and the third difference absolute value and the fourth difference absolute value calculated in the first half and the second half of the center sampled current value can reflect the fluctuation of the sampled current value in the second subsequence. If the first difference absolute value, the second difference absolute value, the third difference absolute value and the fourth difference absolute value are all less than the current threshold, it can be explained that the sampled current values in the first subsequence and the second subsequence are relatively stable, that is, the sampled current values of the entire current sequence are relatively stable and have small fluctuations, so that the charging current of the battery can be determined to be stable. In this way, it is possible to accurately judge whether the charging current of the battery is stable, and the judgment method is simple and convenient, which improves the processing efficiency and accuracy.
[0100] It should be noted that the method of judging whether the charging current of the battery is stable based on the current sequence is not limited to the above method, and other methods may also be used. For example, the first standard deviation corresponding to the M sampling current values of the first subsequence and the second standard deviation corresponding to the N sampling current values of the second subsequence may be calculated respectively. If the first standard deviation and the second standard deviation are both smaller than the standard deviation threshold, it can be determined that the charging current of the battery is stable; or, the difference between two adjacent sampling current values in the current sequence may be calculated respectively. If the difference between the two adjacent sampling current values is smaller than the difference threshold, it can be determined that the charging current is stable, etc.; but it is not limited to this.
[0101] In the embodiment of the present application, when it is determined that the charging current of the battery is stable, the charging current of the battery is actively controlled to perform a step-down, which can reduce the current instability after the charging current has a step change, thereby ensuring the accuracy of the subsequent EIS analysis.
[0102] It should be noted that the order of judging whether the charging current of the battery is stable and judging whether the charging current of the battery matches the first step current threshold is not specifically limited in the embodiments of the present application. It is possible to first judge whether the charging current of the battery matches the first step current threshold, and then judge whether the charging current of the battery is stable when the match is determined. It is also possible to first judge whether the charging current of the battery is stable, and then judge whether the charging current of the battery matches the first step current threshold when the stability is determined.
[0103] If it is determined according to the current current sequence that the charging current of the battery does not match the first step current threshold, or it is determined that the charging current is unstable, the next sampled current value can be waited for. After obtaining the new sampled current value and updating the current sequence, the updated current sequence is used as the new current sequence, and the current current sequence is continued to be used to determine whether the charging current of the battery matches the first step current threshold, and whether the charging current is stable, until it is detected that the charging current of the battery matches the first step current threshold and the charging current is stable, or other conditions for stopping detecting the matching of the charging current with the first step current threshold are met.
[0104] Step 406 , performing EIS analysis according to a plurality of target sampling current values and a plurality of target sampling voltage values to obtain an EIS analysis result; the plurality of target sampling current values satisfy an EIS analysis condition, and the EIS analysis condition at least includes that the step amplitude is within a target step range.
[0105] The description of step 406 may refer to the related description of 330 in the above embodiment, and will not be repeated here.
[0106] Step 408, controlling the charging current of the battery to return to the current value before the step-down current.
[0107] After obtaining the EIS analysis results, the electronic device can control the charging of the battery to return to the current value before the step current reduction. Optionally, the current value before the step current reduction can be the above-mentioned first step current threshold, or it can be a current value close to the first step current threshold. As an embodiment, when the electronic device determines whether the charging current of the battery matches the first step current threshold and whether the charging current of the battery is stable based on the current sequence, it can calculate the average value of the target number of sampled current values contained in the current sequence, and store the average value as the current value before the step current reduction. After controlling the charging current of the battery to drop to the second step current threshold and completing the EIS analysis, the charging current of the battery can be controlled to return to the average value.
[0108] As another implementation, the electronic device sends a control instruction to the charging device. When the charging device receives the control instruction, it can record the current value of the current output (i.e., the current value before the step current reduction), and then reduce the charging current of the battery to the second step current threshold according to the control instruction. After the electronic device completes the EIS analysis, the electronic device can send a recovery instruction to the charging device. When the charging device receives the recovery instruction, it can restore the output charging current to the recorded current value according to the recovery instruction.
[0109] After completing the EIS analysis, the charging current of the battery is controlled to return to the current value before the step current reduction. The entire process of actively controlling the charging current for step current reduction and performing EIS analysis has basically no effect on the charging speed, thus ensuring the charging efficiency.
[0110] In some embodiments, the electronic device may record the detection duration of whether the sampled current value satisfies the EIS analysis conditions, and the starting time of the detection duration may be the moment when the charging current of the battery is controlled to perform a step-down flow. The maximum duration of the configurable detection duration is the first duration. After the charging current of the battery is controlled to perform a step-down flow, if the target sampled current value that satisfies the EIS analysis conditions is not obtained within the first duration, the charging current of the battery may be controlled to be restored to the current value before the step-down flow. That is, if the detection duration reaches the first duration and the target sampled current value that satisfies the EIS analysis conditions is not obtained, indicating that the EIS analysis has failed, the charging current of the battery may be controlled to be restored to the current value before the step-down flow, and the method of controlling the charging current of the battery to be restored to the current value before the step-down flow is similar to the method described in the above embodiment. Further, the electrochemical impedance spectroscopy EIS analysis method provided in the embodiment of the present application may be performed again at the next appropriate time.
[0111] The first duration can be set according to actual needs, such as 40s, 1 minute, etc. As an implementation method, the first duration can be the product of the sampling period and the target number. For example, if the sampling period is 1s and the target number is 40, the first duration can be 40s, but it is not limited thereto. By limiting the detection time for detecting whether the sampled current value meets the EIS analysis conditions, that is, limiting the time for the charging current to drop, the adverse effect on the charging speed caused by the failure to detect the target sampled current value that meets the EIS analysis conditions for a long time can be avoided.
[0112] In an embodiment of the present application, when the charging current of the battery matches the first step current threshold and the charging current of the battery is stable, the charging current of the battery can be controlled to be reduced to the second step current threshold, and the charging current of the battery is actively controlled to perform a step reduction, so that the charging current of the battery produces a downward step with a large step amplitude, and the current instability after the step change of the charging current can be reduced, thereby improving the accuracy of EIS analysis.
[0113] like Figure 5 As shown, in another embodiment, an electrochemical impedance spectroscopy (EIS) analysis method is provided, which can be applied to the above-mentioned electronic device. The method may include the following steps:
[0114] Step 502: Acquire step current parameters, where the step current parameters include a first step current threshold and a second step current threshold.
[0115] Step 504: Obtain a sampled current value of the battery according to the sampling frequency.
[0116] Step 506: determine the current current sequence according to the multiple sampled current values.
[0117] In some embodiments, while obtaining the sampled current value of the battery according to the sampling frequency, the sampled voltage value of the battery can be obtained according to the sampling frequency, and a voltage sequence can be generated according to the multiple sampled voltage values. The sampled voltage values included in the voltage sequence can be arranged in the order of the corresponding sampled current values in the current sequence. The number of sampled voltage values included in the voltage sequence can be the same as the number of sampled current values included in the current sequence, and both are target numbers.
[0118] Step 508 , judging whether the charging current of the battery matches the first step current threshold value according to the current current sequence, and judging whether the charging current of the battery is stable, if so, executing step 510 , if not, executing step 504 .
[0119] Step 510 , controlling to reduce the charging current of the battery to a second step current threshold.
[0120] For the description of steps 502 to 510 , reference may be made to the relevant description in the above embodiments, which will not be repeated here.
[0121] If it is determined according to the current current sequence that the battery charging current does not match the first step current threshold, or it is determined according to the current current sequence that the battery charging current is unstable, then continue to execute steps 504 and 506 to wait for obtaining a new current current sequence for another determination.
[0122] If it is determined according to the current current sequence that the battery charging current matches the first step current threshold and the battery charging current is stable, the charging current can be controlled to step down to reduce the battery charging current to the second step current threshold.
[0123] After the charging current is controlled to be step-down, step 508 is no longer executed, that is, it is no longer necessary to determine whether the charging current of the battery matches the first step current threshold according to the current current sequence, and to determine whether the charging current of the battery is stable.
[0124] After controlling the charging current to perform a step-down, the sampling current value of the battery can continue to be obtained according to the sampling frequency, and the current sequence can be updated according to the obtained sampling current value to determine whether the current current sequence (i.e., the updated current sequence) meets the EIS analysis conditions.
[0125] As an implementation mode, a control flag may be set, and the control flag may be used to indicate whether to control the charging current to perform a step-down. When the charging current is not controlled to perform a step-down, the control flag may be configured as a first flag. After the charging current is controlled to perform a step-down, the control flag may be configured as a second flag. When the control flag is the first flag, step 508 may be performed after determining the current current sequence. When the control flag is the second flag, step 512 may be performed after determining the current current sequence. The first flag and the second flag may be set according to actual needs. For example, the first flag may be 0, the second flag may be 1, etc., but is not limited thereto.
[0126] Step 512 , when controlling the charging current to perform a step-down, determine whether the current current sequence meets the EIS analysis condition, if so, execute step 514 , if not, execute step 504 .
[0127] In some embodiments, the EIS analysis conditions may include that the step amplitude of the charging current is within the target step range, and that the charging current after the step current reduction is stable. It is possible to determine whether the step amplitude of the battery's charging current is within the target step range based on the current sequence. If it is determined that the step amplitude of the battery's charging current is within the target step range, it is then determined whether the charging current after the step current reduction is stable based on the current sequence. If it is determined that the charging current after the step current reduction is stable, it is possible to determine that the current current sequence meets the EIS analysis conditions.
[0128] In some embodiments, the current sequence may include a first subsequence and a second subsequence, the first subsequence may include M sampled current values, the second subsequence may include N sampled current values, M and N are both integers greater than 1, and the sum of M and N is the above-mentioned target number, and the absolute value of the difference between M and N is less than or equal to 1. The M sampled current values included in the first subsequence are greater than or equal to the N sampled current values included in the second subsequence. For the division and description of the first subsequence and the second subsequence, reference may be made to the relevant description in the above embodiments, which will not be repeated here.
[0129] As an implementation mode, determining whether the step amplitude of the charging current of the battery is within the target step range may include: calculating the difference between the central sampling current value of the first subsequence of the current current sequence and the central sampling current value of the second subsequence of the current current sequence as the step amplitude of the charging current, and determining whether the step amplitude of the charging current is within the target step range.
[0130] When the charging current undergoes a step change, it is a process in which the current value decreases smoothly, such as Figure 1As shown in . Therefore, the sampled current values obtained by sampling will also appear to be smoothly reduced. The target number of sampled current values contained in the current sequence are arranged in order from large to small. If the current current sequence contains the sampled current values of the charging current in the step-down process, the first half of the first subsequence (the part arranged before the central sampled current value of the first subsequence) may include the sampled current values collected before the charging current is step-down, and the second half of the second subsequence (the part arranged after the central sampled current value of the second subsequence) may include the sampled current values collected after the charging current is step-down. Therefore, if the current current sequence contains the sampled current values of the charging current in the step-down process, the central sampled current value of the first subsequence can reflect the state of the charging current before the step-down, and the central sampled current value of the second subsequence can reflect the state of the charging current after the step-down. The central sampling current value of the first subsequence of the current current sequence can be subtracted from the central sampling current value of the second subsequence of the current current sequence to obtain a difference, which can be used as a step amplitude, and it can be determined whether the difference is within the target step range. If the difference is within the target step range, it can be explained that the current current sequence contains the various sampling current values of the charging current in the step reduction process, and the charging current is successfully controlled to perform step reduction.
[0131] The target step range can be a range determined according to the first step current threshold and the second step current threshold. For example, if the first step current threshold is 6000mA and the second step current threshold is 1000mA, the target step range can be 4800mA~5200mA, or the target step range is equal to 5000mA, etc., but is not limited to this.
[0132] By calculating the difference between the central sampling current values of the two subsequences and judging whether the step amplitude of the charging current is within the target step range, the current sequence of the sampling current values including the entire step change process can be accurately found. The calculation method is simple and fast, which improves the processing efficiency.
[0133] It should be noted that the method of judging whether the step amplitude of the charging current is within the target step range based on the current sequence is not limited to the above method, and other methods may also be used. For example, the average value from the first sampled current value to the center sampled current value in the first subsequence may be calculated, and the average value from the center sampled current value to the last sampled current value in the second subsequence may be calculated. The difference between the two average values may be calculated as the step amplitude of the charging current, and it may be judged whether the difference between the two average values is within the target step range, etc., but it is not limited to this.
[0134] If it is determined according to the current current sequence that the step amplitude of the charging current is not within the target step range, the next sampling current value can be waited for. After obtaining the new sampling current value and updating the current sequence, the updated current sequence is used as the new current sequence, and the step amplitude of the charging current is continued to be determined according to the current current sequence. Whether it is within the target step range, until it is determined that the step amplitude of the charging current is within the target step range, or the detection time for detecting whether the sampling current value meets the EIS analysis conditions reaches the first time length, etc.
[0135] If the charging current is unstable, the calculated EIS analysis result will be inaccurate. Therefore, in order to ensure the accuracy of the EIS analysis result, in the embodiment of the present application, when the step amplitude of the charging current is determined to be within the target step range according to the current current sequence, it can be further determined whether the charging current after the step step is stable according to the current current sequence. As a specific implementation, the fifth absolute value of the difference between the Pth sampling current value and the center sampling current value in the second subsequence of the current current sequence can be calculated, and P is an integer greater than N / 2 and less than or equal to N. If the absolute value of the fifth difference is less than the current threshold, it can be determined that the charging current after the step step is stable.
[0136] The second half of the second subsequence may include sampled current values collected after the charging current is step-reduced. Therefore, any sampled current value may be selected from the second half of the second subsequence to calculate the fifth absolute value of the difference with the central sampled current value. If the fifth absolute value of the difference is less than the current threshold, it means that the sampled current value collected after the step-reduction has a small fluctuation, and it can be determined that the charging current is stable after the step-reduction.
[0137] It should be noted that the fifth absolute values of the differences between the multiple sampling current values and the central sampling current value in the second half of the second subsequence can also be calculated, and the charging current stability after the step current reduction can be judged based on the calculated multiple fifth absolute values of the differences, such as the multiple fifth absolute values of the differences are all less than the current threshold, or the average of the multiple fifth absolute values of the differences is all less than the current threshold, etc., but is not limited to this.
[0138] If it is determined that the charging current after the step current reduction is unstable according to the current sequence, the next sampling current value can be waited for. After obtaining the new sampling current value and updating the current sequence, the updated current sequence is used as the new current sequence, and whether the charging current after the step current reduction is stable is continued to be determined according to the current current sequence until the charging current after the step current reduction is detected to be stable, or the detection time for detecting whether the sampling current value meets the EIS analysis condition reaches the first time length, etc.
[0139] By selecting any sampling current value from the second half of the second subsequence to calculate the fifth absolute value of the difference with the central sampling current value, and judging whether the charging current after the step-down current reduction is stable according to the fifth absolute value of the difference, the judging method is simple and fast, and the processing efficiency is improved.
[0140] Step 514: taking each sampled current value included in the current current sequence as a target sampled current value.
[0141] Step 516 , performing EIS analysis according to the multiple target sampling current values and the multiple target sampling voltage values to obtain EIS analysis results; the multiple target sampling voltage values and the multiple target sampling current values correspond to the same sampling time period.
[0142] If it is determined that the current current sequence meets the EIS analysis conditions, each sampled current value included in the current current sequence can be used as a target sampled current value, and a target sampled voltage value matching each target sampled current value is obtained, and an EIS analysis is performed based on multiple target sampled current values and multiple target sampled voltage values to obtain an EIS analysis result. The sampling time periods corresponding to the multiple target sampled voltage values are consistent with the sampling time periods corresponding to the multiple target sampled current values, the multiple target sampled voltage values correspond one-to-one to the multiple target sampled current values, and the sampling time of the target sampled voltage value is consistent with the sampling time of the corresponding target sampled current value.
[0143] Further, when it is determined that the current current sequence meets the EIS analysis condition, the current voltage sequence may be obtained, the current voltage sequence corresponds to the current current sequence, and each sampled voltage value included in the current voltage sequence may be used as a target sampled voltage value.
[0144] For the manner of performing EIS analysis according to the multiple target sampling current values and the multiple target sampling voltage values to obtain the EIS analysis result, reference may be made to the relevant descriptions in the above embodiments, which will not be repeated here.
[0145] Step 518, controlling the charging current of the battery to return to the current value before the step-down current.
[0146] The description of step 518 may refer to the relevant description of step 408 in the above embodiment, which will not be repeated here.
[0147] For example, Figure 6 Schematic diagram of EIS analysis results in one embodiment. Figure 6As shown, the EIS analysis result before optimization refers to the ESI analysis result obtained without using the electrochemical impedance spectroscopy EIS analysis method provided in the embodiment of the present application, that is, during the charging process of the battery, the charging current of the battery is not actively controlled to perform a step-down, but the EIS analysis result is obtained by directly performing an EIS analysis. The EIS analysis result after optimization refers to the ESI analysis result obtained by using the electrochemical impedance spectroscopy EIS analysis method provided in the embodiment of the present application, that is, during the charging process of the battery, the charging current of the battery is actively controlled to perform a step-down, and an EIS analysis is performed. From Figure 6 It can be seen intuitively from the two EIS analysis result curves that the EIS analysis result obtained after optimization has smaller fluctuations and is more stable. The fluctuation range of the EIS analysis result is about 1 milliohm, while the fluctuation range of the EIS analysis result obtained before optimization is about 3 milliohm. Therefore, the electrochemical impedance spectroscopy EIS analysis method provided in the embodiment of the present application improves the precision of EIS analysis and the accuracy of EIS analysis results.
[0148] In the embodiment of the present application, the charging current of the battery can be actively controlled to perform step reduction, so that the charging current of the battery produces a downward step with a large step amplitude. It can be judged whether the step amplitude of the charging current is within the target step range according to the current sequence, and whether the charging current after the step reduction is stable. Therefore, the target sampling current value that can be used for EIS analysis and the corresponding target sampling voltage value can be accurately found, which weakens the influence of the measurement noise of the charging voltage and charging current during the EIS analysis, improves the accuracy of the EIS analysis, and improves the accuracy of the EIS analysis results.
[0149] Exemplarily, as a specific embodiment, the electrochemical impedance spectroscopy EIS analysis method provided in each of the above-mentioned embodiments can be implemented by an EIS thread running in an electronic device. When the electronic device is started, the HIDL service can be loaded and run, and an EIS thread can be created in the HIDL service and the EIS thread can be initialized. The EIS thread can parse the parameter configuration file, use fopen and other opening functions to open the parameter configuration file, and if the opening fails (such as the parameter configuration file is not configured), the EIS thread can be terminated. If the opening is successful, the EIS thread can use fgets and other reading functions to obtain each line of character content contained in the parameter configuration file, and each line of character content read can be written to the cache, and it is determined whether the cache contains key characters. If not, continue to read the next line of character content until all the character content is read. If key characters are included, the character content currently read can be identified and segmented by commas, etc., and the character strings corresponding to the first step current threshold and the second step current threshold are obtained, and then the character string is converted into a number to obtain the first step current threshold and the second step current threshold.
[0150] When the electronic device is in a charging state, the EIS thread can start executing. In some embodiments, in order to prevent the EIS analysis from being affected by fluctuations in system power consumption, the EIS thread can be run when the electronic device is in a screen-off charging state. The EIS thread can determine whether the electronic device is currently in a screen-off charging state. If the electronic device is not in a screen-off charging state, the EIS thread can be suspended and enter a waiting queue to be awakened. When the electronic device enters the screen-off state and the charging state, the display module of the electronic device will send a screen-off state signal to the EIS thread, and the charging module will send a charging state signal to the EID thread, and the EIS thread will change from a sleep state to a running state.
[0151] The EIS thread can initialize and configure multiple preset variables during operation. The preset variables may include detection duration, analysis identifier, EIS analysis condition identifier, control identifier, and time detection identifier. Furthermore, the detection duration Eis_current_action_count can be used to characterize the duration of the EIS thread controlling the charging current, which can be represented by the sampling time count. The initialization configuration corresponding to Eis_current_action_count can be 0; the analysis identifier Do_dft can be used to characterize whether the EIS thread has performed EIS analysis. The initialization configuration corresponding to Do_dft can be 0, indicating that no EIS analysis has been performed; the EIS analysis condition identifier Auto_create_dft_condi can be used to characterize whether the EIS thread has created the conditions for performing EIS analysis, that is, whether the EIS thread actively controls the charging current to perform step-by-step flow. The initialization configuration corresponding to Auto_create_dft_condi can be false, indicating that the EIS thread has not actively created the conditions for performing EIS analysis; the control identifier Eis_current_control is used to characterize whether the EIS thread controls the charging current. The initialization configuration corresponding to Eis_current_control can be false, indicating that the EIS thread does not control the charging current; the time detection identifier Check_time can be used to characterize whether the stored time (that is, the time when the last EIS analysis was performed) has been checked. The initialization configuration corresponding to Check_time can be false, indicating that the EIS thread has not checked the stored time.
[0152] During the operation of the EIS thread, the EIS thread can obtain the sampled current value and the sampled voltage value according to the sampling period. Optionally, the EIS thread can also determine whether the total number of sampled current values obtained is less than the target number. If so, it means that the number of sampled current values is insufficient, and the EIS thread can delay the sampling period (such as 1s) and continue to run; if not, the obtained sampled current value can be updated to the current sequence, and each newly obtained sampled current value can be updated to the end of the current sequence. The sampled current values in the current sequence can be arranged in order from large to small, or from small to large. The current sequence can be divided into a first subsequence sort_f and a second subsequence sort_a. Specifically, the first half of the current sequence is updated to the first subsequence sort_f, and the second half of the current sequence is updated to the second subsequence sort_a.
[0153] The EIS thread can determine whether the duration between the current moment and the last moment of EIS analysis is greater than or equal to the second duration, and can obtain the current electronic device's time current_time (i.e., the current moment) through the system interface, and read the last saved moment of EIS analysis part_time from the set storage partition. Optionally, if EIS analysis has not been performed before, the set storage partition can store a default time value of 0; the EIS thread can then determine whether the difference between current_time and part_time is greater than or equal to the second duration. For example, if the second duration is 3 days, it can be determined whether current_time-part_time<3*24*3600s. If not, EIS analysis is required. If so, the operation of the EIS thread can be terminated. Further, in the case where the difference between current_time and part_time is greater than or equal to the second duration, the EIS thread can configure the time detection flag Check_time to true, indicating that the EIS thread checks the stored time to avoid repeated checks by the EIS thread. It should be noted that the EIS thread can determine whether the time between the current moment and the time when the last EIS analysis was performed is greater than or equal to the second time after obtaining the target number of sampled current values, or it can determine whether the time between the current moment and the time when the last EIS analysis was performed is greater than or equal to the second time when starting to run. The present application does not limit this in the examples.
[0154] The EIS thread can determine whether the EIS analysis condition identifier Auto_create_dft_condi is true, that is, whether the EIS thread actively creates the conditions for EIS analysis. When the EIS analysis condition identifier Auto_create_dft_condi = false, the detection duration Eis_current_action_count = 0, and the control identifier Eis_current_control = false, the EIS thread can read the battery temperature and the battery power from the kernel driver layer, and determine whether the battery temperature is within the target temperature range and whether the power is within the target power range. If the battery temperature or power is not within the corresponding range, the EIS thread can delay the sampling period (such as 1s) and continue to run. If the temperature of the battery is within the target temperature range and the power is within the target power range, it can be determined whether the current central sampling current value of the first subsequence sort_f and the central sampling current value of the second subsequence sort_a are within the current value range, such as being less than the first step current threshold and greater than the first step current threshold -300mA. If both conditions are met, it can be determined whether the first subsequence sort_f and the second subsequence sort_a are stable, that is, it is determined whether the first absolute value of the difference between the Xth sampling current value and the central sampling current value in the first subsequence sort_f and the second absolute value of the difference between the M-X+1th sampling current value and the central sampling current value are less than the current threshold (such as 100mA), and at the same time, the Yth sampling current value in the second subsequence sort_a and The third absolute value of the difference between the central sampling current value and the fourth absolute value of the difference between the N-Y+1th sampling current value and the central sampling current value are also less than the current threshold. If they are all less than, it is determined that the current sequence is stable, and the EIS thread can write the charging current eis_current equal to the step low current threshold to the kernel driver layer, and control the charging current to be reduced to the second step current threshold through the kernel driver layer, and the EIS thread can configure the control flag Eis_current_control=true, indicating that the EIS thread controls the charging current, and configure the EIS analysis condition flag Auto_create_dft_condi=true, indicating that the EIS thread actively creates the conditions for EIS analysis. The EIS thread can delay the sampling period (such as 1s) and continue to run.
[0155] When the EIS analysis condition flag Auto_create_dft_condi = true, the detection duration Eis_current_action_count can be increased by 1 for every second the EIS thread runs, and it is determined whether the current current sequence meets the EIS analysis conditions. If the current current sequence meets the EIS analysis conditions (the step amplitude of the battery charging current is within the target step range, and the charging current is stable after the step current reduction), the DFT transformation can be performed on multiple target current values and multiple target voltage values respectively, and the EIS impedance spectrum is calculated based on the DFT transformation results, and the analysis flag Do_dft = 1 is set, indicating that the EIS analysis has been performed. The EIS thread can continue to delay the sampling period (such as 1s) and continue to run.
[0156] When the control flag Eis_current_control=true, the EIS thread can determine whether the analysis flag Do_dft is 1, and the detection duration Eis_current_action_count reaches the first duration. If it is detected that Do_dft=1 or the detection duration Eis_current_action_count>=the first duration, the charging current eis_current equal to 0 can be written to the kernel layer, indicating that the EIS thread no longer controls the charging current, and the control flag Eis_current_control is configured to false. Optionally, when Do_dft=1, the EIS thread can also obtain the current time as the time for this EIS analysis and store it in the set storage partition. The EIS thread can end its operation.
[0157] In the embodiment of the present application, the charging current of the battery is actively controlled to perform a step-down through the EIS thread, so that the charging current of the battery produces a step-down step with a large step amplitude, which can weaken the influence of the measurement noise of the charging voltage and charging current during the EIS analysis process, improve the accuracy of the EIS analysis, and improve the accuracy of the EIS analysis results.
[0158] like Figure 7 As shown, in one embodiment, an electrochemical impedance spectroscopy (EIS) analysis device 700 is provided, which can be applied to the above-mentioned electronic device. The electrochemical impedance spectroscopy (EIS) analysis device 700 may include a parameter acquisition module 710 , a current control module 720 and an EIS analysis module 730 .
[0159] The parameter acquisition module 710 is used to acquire step current parameters.
[0160] The current control module 720 is used to control the charging current of the battery to step down according to the step current parameter so that the step amplitude of the charging current of the battery is within a target step range; the target step range is determined according to the step current parameter.
[0161] The EIS analysis module 730 is used to perform EIS analysis according to multiple target sampling current values and multiple target sampling voltage values to obtain EIS analysis results; the multiple target sampling current values meet the EIS analysis conditions, and the EIS analysis conditions at least include that the step amplitude is within the target step range, and the multiple target sampling voltage values and the multiple target sampling current values correspond to the same sampling time period.
[0162] In one embodiment, the current control module 720 is further configured to control the charging current of the battery to perform a step-down according to the step current parameter when the step trigger condition is met.
[0163] In one embodiment, the step trigger condition includes one or more of the following:
[0164] The duration between the current time and the time when the EIS analysis was last performed is greater than or equal to the second duration;
[0165] The temperature of the battery is within the target temperature range;
[0166] The battery power level is within the target power range;
[0167] The electronic device is in the off state.
[0168] In one embodiment, the step current parameter includes a first step current threshold and a second step current threshold. The current control module 720 is further configured to control the battery charging current to be reduced to the second step current threshold when it is detected that the battery charging current matches the first step current threshold.
[0169] In one embodiment, the electrochemical impedance spectroscopy (EIS) analysis device 700 further includes a sampling acquisition module, a sequence generation module and a first judgment module.
[0170] The sampling acquisition module is used to obtain the sampling current value of the battery.
[0171] The sequence generation module is used to generate a current sequence according to a plurality of sampled current values, wherein the sampled current values contained in the current sequence are arranged in a sequence from large to small or from small to large.
[0172] The first judgment module is used to judge whether the charging current of the battery matches the first step current threshold according to the current sequence, and to judge whether the charging current of the battery is stable.
[0173] The current control module 720 is further configured to control the battery charging current to be reduced to a second step current threshold when it is determined that the battery charging current matches the first step current threshold and the battery charging current is stable.
[0174] In one embodiment, the current sequence includes a first subsequence and a second subsequence; the M sampling current values included in the first subsequence are greater than or equal to the N sampling current values included in the second subsequence, or the M sampling current values included in the first subsequence are less than or equal to the N sampling current values included in the second subsequence; M and N are both integers greater than 1, and the absolute value of the difference between M and N is less than or equal to 1.
[0175] The first judgment module is further used to judge whether the central sampling current value of the first subsequence is within the current value range, and to judge whether the central sampling current value of the second subsequence is within the current value range; the upper limit value of the current value range is the first step current threshold, and the lower limit value of the current value range is the difference between the first step current threshold and the preset value; and to determine that the charging current of the battery matches the first step current threshold if the central sampling current value of the first subsequence and the central sampling current value of the second subsequence are both within the current value range.
[0176] The first judgment module is further used to calculate the first absolute value of the difference between the Xth sampling current value and the central sampling current value, and the second absolute value of the difference between the M-X+1th sampling current value and the central sampling current value in the first subsequence; X is a positive integer, and X is less than or equal to M; calculate the third absolute value of the difference between the Yth sampling current value and the central sampling current value, and the fourth absolute value of the difference between the N-Y+1th sampling current value and the central sampling current value in the second subsequence; Y is a positive integer, and Y is less than or equal to N; if the first absolute value of the difference, the second absolute value of the difference, the third absolute value of the difference and the fourth absolute value of the difference are all less than the current threshold, it is determined that the charging current of the battery is stable.
[0177] In one embodiment, the electrochemical impedance spectroscopy (EIS) analysis device 700 further includes a second judgment module.
[0178] The sampling acquisition module is also used to obtain the sampling current value of the battery according to the sampling frequency.
[0179] The sequence generation module is also used to determine the current current sequence according to the multiple sampled current values; the sampled current values contained in the current sequence are arranged in order from large to small.
[0180] The second judgment module is used to judge whether the current current sequence meets the EIS analysis condition. If the current current sequence meets the EIS analysis condition, each sampled current value included in the current current sequence is used as the target sampled current value.
[0181] In one embodiment, the second judgment module is also used to judge whether the step amplitude of the battery charging current is within the target step range according to the current current sequence; if it is determined that the step amplitude of the battery charging current is within the target step range, then judging whether the charging current after the step reduction is stable according to the current sequence; if it is determined that the charging current after the step reduction is stable, then determining the EIS analysis conditions of the current current sequence.
[0182] In one embodiment, the current sequence includes a first subsequence and a second subsequence, the first subsequence includes M sampling current values greater than or equal to, and the second subsequence includes N sampling current values; M and N are both integers greater than 1, and the absolute value of the difference between M and N is less than or equal to 1.
[0183] The second judgment module is also used to calculate the difference between the central sampling current value of the first subsequence of the current current sequence and the central sampling current value of the second subsequence of the current current sequence as the step amplitude of the charging current; and judge whether the step amplitude of the charging current is within the target step range.
[0184] In one embodiment, the second judgment module is also used to calculate the fifth absolute value of the difference between the Pth sampling current value and the center sampling current value in the second subsequence of the current current sequence; P is an integer greater than N / 2 and less than or equal to N; if the absolute value of the fifth difference is less than the current threshold, it is determined that the charging current after the step current reduction is stable.
[0185] In one embodiment, the current control module 720 is also used to control the charging current of the battery to return to the current value before the step current reduction after obtaining the EIS analysis result; or, if the target sampling current value that meets the EIS analysis conditions is not obtained within the first time period, control the charging current of the battery to return to the current value before the step current reduction.
[0186] In the embodiment of the present application, the charging current of the battery is actively controlled to perform a step-down current reduction, so that the charging current of the battery produces a step-down step with a large step amplitude, which can weaken the influence of the measurement noise of the charging voltage and charging current during the EIS analysis process, improve the accuracy of the EIS analysis, and improve the accuracy of the EIS analysis results.
[0187] Figure 8 FIG. 1 is a structural block diagram of an electronic device in an embodiment. Figure 8 As shown, the electronic device 800 may include one or more of the following components: a processor 810, and a memory 820 coupled to the processor 810, wherein the memory 820 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 810.
[0188] The processor 810 may include one or more processing cores. The processor 810 uses various interfaces and lines to connect various parts of the entire electronic device 800, and executes various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 820, and calling data stored in the memory 820. Optionally, the processor 810 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 810 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 810, but may be implemented separately through a communication chip.
[0189] The memory 820 may include a random access memory (RAM) or a read-only memory (ROM). The memory 820 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 800 during use, etc.
[0190] It is understandable that the electronic device 800 may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., and is not limited here.
[0191] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program implements the methods described in the above embodiments when executed by a processor.
[0192] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.
[0193] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.
[0194] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).
[0195] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.
[0196] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0197] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0199] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0200] The above is a detailed introduction to an electrochemical impedance spectroscopy EIS analysis method, device and electronic device disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An electrochemical impedance spectroscopy (EIS) analysis method, characterized in that: Applied to electronic equipment, the method comprises: Get step current parameters; Controlling the charging current of the battery to perform step-down according to the step current parameter, so that the step amplitude of the charging current of the battery is within a target step range; the target step range is determined according to the step current parameter; An EIS analysis is performed according to a plurality of target sampling current values and a plurality of target sampling voltage values to obtain an EIS analysis result; the plurality of target sampling current values satisfy an EIS analysis condition, the EIS analysis condition at least including that the step amplitude is within the target step range, and the plurality of target sampling voltage values and the plurality of target sampling current values correspond to the same sampling time period.
2. The method according to claim 1, characterized in that The step current parameter includes a first step current threshold and a second step current threshold, and the first step current threshold is greater than the second step current threshold; The step of controlling the charging current of the battery to perform step current reduction according to the step current parameter comprises: When it is detected that the charging current of the battery matches the first step current threshold, the charging current of the battery is controlled to be reduced to the second step current threshold.
3. The method according to claim 2, characterized in that Before controlling the charging current of the battery to step down according to the step current parameter, the method further includes: Get the sampled current value of the battery; Generate a current sequence according to the plurality of sampled current values, wherein the sampled current values contained in the current sequence are arranged in order from large to small or from small to large; determining whether the charging current of the battery matches the first step current threshold according to the current sequence, and determining whether the charging current of the battery is stable; When detecting that the charging current of the battery matches the first step current threshold, controlling to reduce the charging current of the battery to the second step current threshold comprises: When it is determined that the charging current of the battery matches the first step current threshold and whether the charging current of the battery is stable, the charging current of the battery is controlled to be reduced to the second step current threshold.
4. The method according to claim 3, characterized in that The current sequence includes a first subsequence and a second subsequence; the M sampling current values included in the first subsequence are greater than or equal to the N sampling current values included in the second subsequence, or the M sampling current values included in the first subsequence are less than or equal to the N sampling current values included in the second subsequence; both M and N are integers greater than 1, and the absolute value of the difference between M and N is less than or equal to 1; The determining, according to the current sequence, whether the charging current of the battery matches the first step current threshold value includes: Determine whether the central sampling current value of the first subsequence is within a current value range, and determine whether the central sampling current value of the second subsequence is within the current value range; the upper limit value of the current value range is the first step current threshold, and the lower limit value of the current value range is the difference between the first step current threshold and a preset value; If the central sampling current value of the first subsequence and the central sampling current value of the second subsequence are both within the current value range, it is determined that the charging current of the battery matches the first step current threshold.
5. The method according to claim 4, characterized in that The determining whether the charging current of the battery is stable includes: Calculate a first absolute value of a difference between an X-th sampling current value and a central sampling current value, and a second absolute value of a difference between an M-X+1-th sampling current value and a central sampling current value in the first subsequence; X is a positive integer, and X is less than or equal to M; Calculate the third absolute value of the difference between the Yth sampling current value and the central sampling current value, and the fourth absolute value of the difference between the N-Y+1th sampling current value and the central sampling current value in the second subsequence; Y is a positive integer, and Y is less than or equal to N; If the first difference absolute value, the second difference absolute value, the third difference absolute value and the fourth difference absolute value are all smaller than the current threshold, it is determined that the charging current of the battery is stable.
6. The method according to claim 1, characterized in that Before performing EIS analysis according to the multiple target sampling current values and the multiple target sampling voltage values, the method further includes: Obtain the sampling current value of the battery according to the sampling frequency; Determine a current current sequence according to the plurality of sampled current values; the sampled current values included in the current sequence are arranged in descending order; It is determined whether the current current sequence satisfies the EIS analysis condition. If the current current sequence satisfies the EIS analysis condition, each sampling current value included in the current current sequence is used as a target sampling current value.
7. The method according to claim 6, characterized in that The determining whether the current sequence satisfies the EIS analysis condition includes: According to the current current sequence, determining whether the step amplitude of the charging current of the battery is within the target step range; If it is determined that the step amplitude of the charging current of the battery is within the target step range, judging whether the charging current after the step-down is stable according to the current sequence; If it is determined that the charging current after the step current reduction is stable, the EIS analysis condition of the current current sequence is determined.
8. The method according to claim 7, characterized in that The current sequence includes a first subsequence and a second subsequence, the M sampling current values included in the first subsequence are greater than or equal to the N sampling current values included in the second subsequence; both M and N are integers greater than 1, and the absolute value of the difference between M and N is less than or equal to 1; The determining, according to the current current sequence, whether the step amplitude of the charging current of the battery is within the target step range includes: Calculating a difference between a central sampling current value of a first subsequence of the current current sequence and a central sampling current value of a second subsequence of the current current sequence as a step amplitude of the charging current; It is determined whether the step amplitude of the charging current is within the target step range.
9. The method according to claim 8, characterized in that The step of judging whether the charging current after the step-down current is stable according to the current current sequence includes: Calculating the fifth absolute value of the difference between the Pth sampling current value and the central sampling current value in the second subsequence of the current current sequence; P is an integer greater than N / 2 and less than or equal to N; If the absolute value of the fifth difference is smaller than the current threshold, it is determined that the charging current after the step-down is stable.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: After obtaining the EIS analysis result, controlling the charging current of the battery to return to the current value before the step-down current reduction; or, If the target sampling current value satisfying the EIS analysis condition is not obtained within the first time period, the charging current of the battery is controlled to be restored to the current value before the step-down current.
11. The method according to any one of claims 1 to 9, characterized in that: The step of controlling the charging current of the battery to perform step current reduction according to the step current parameter comprises: When the step trigger condition is met, the charging current of the battery is controlled to perform step current reduction according to the step current parameter.
12. The method according to claim 11, characterized in that The step trigger condition includes one or more of the following: The duration between the current time and the time when the EIS analysis was last performed is greater than or equal to the second duration; The temperature of the battery is within a target temperature range; The power level of the battery is within a target power level range; The electronic device is in a screen-off state.
13. An electrochemical impedance spectroscopy (EIS) analysis device, characterized in that: Applied to electronic equipment, the device comprises: A parameter acquisition module, used to obtain step current parameters; A current control module, used for controlling the charging current of the battery to perform step-down according to the step current parameter, so that the step amplitude of the charging current of the battery is within a target step range; the target step range is determined according to the step current parameter; The EIS analysis module is used to perform EIS analysis according to multiple target sampling current values and multiple target sampling voltage values to obtain EIS analysis results; the multiple target sampling current values meet EIS analysis conditions, and the EIS analysis conditions at least include that the step amplitude is within the target step range, and the multiple target sampling voltage values and the multiple target sampling current values correspond to the same sampling time period.
14. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 12.
15. 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 12 is implemented.
