Charging method and device, terminal equipment and computer readable storage medium
By dynamically updating the charging signal full voltage threshold and adjusting the charging strategy according to changes in the battery impedance value, the problem of lower charging efficiency after the battery ages is solved, and a longer charging time and higher charging efficiency are achieved.
Patent Information
- Application Number
- CN202311021563.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
In the existing charging mechanism, the internal resistance of the battery increases after aging, resulting in a high floating voltage, reaching the charging full voltage threshold in advance, which in turn affects the charging efficiency and time.
By obtaining the current battery impedance value, dynamically update the charging full voltage threshold, and calculate the update step size based on the difference between the current impedance value and the initial impedance value, thereby adjusting the charging full voltage threshold.
It extends the duration of the charging mode, improves the charging efficiency, enables the battery to charge more, and avoids exiting the fast charging or general charging mode in advance.
Smart Images

Figure CN119496223A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of charging, and in particular to a charging method, device, terminal equipment and computer-readable storage medium. Background Art
[0002] In the existing charging mechanism, the full charge voltage threshold during the charging stage is fixed. After the battery ages, the internal resistance of the battery increases, resulting in high battery floating pressure, which in turn causes the full charge voltage threshold to be reached ahead of schedule. If the mobile phone is in fast charging mode, it will exit the fast charging mode and enter the normal charging mode with a slower charging speed, ultimately resulting in a longer overall charging time; if the mobile phone is in normal charging mode, reaching the full charge voltage threshold ahead of schedule will result in the battery not being fully charged. Summary of the invention
[0003] The embodiments of the present application provide a charging method, apparatus, terminal device and computer-readable storage medium, which can be used to dynamically update the full charging voltage threshold according to the current battery impedance value, thereby increasing the charging time of the corresponding charging mode and charging the battery more.
[0004] The first aspect of the present application provides a charging method, which is applied to a terminal device, wherein the terminal device includes a battery, and the method may include: obtaining a current battery impedance value; updating a full charge voltage threshold based on the current battery impedance value and an initial battery impedance value to obtain a full charge voltage update threshold; and charging according to the full charge voltage update threshold.
[0005] A second aspect of the present application provides a charging device, the device is applied to a terminal device, the terminal device includes a battery, and the device may include:
[0006] The acquisition module is used to obtain the current battery impedance value;
[0007] An updating module, used for updating a full charge voltage threshold according to the current battery impedance value and the initial battery impedance value, to obtain a full charge voltage update threshold;
[0008] The charging module is used to charge according to the charging full voltage update threshold.
[0009] A third aspect of the present application provides a terminal device, which may include:
[0010] A memory storing executable program code;
[0011] a processor coupled to the memory;
[0012] The processor is used to execute the method described in the first aspect of the present application.
[0013] Another aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a processor, enables the processor to execute the method described in the first aspect of the present application.
[0014] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.
[0015] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.
[0016] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0017] In the embodiment of the present application, the current battery impedance value is obtained; according to the current battery impedance value and the initial battery impedance value, the charging full voltage threshold is updated to obtain the charging full voltage update threshold; charging is performed according to the charging full voltage update threshold. The corresponding current battery impedance value can be obtained according to the current battery temperature of the terminal device, and then the charging full voltage threshold is dynamically updated according to the current battery impedance value and the initial battery impedance value, thereby increasing the charging time of the corresponding charging mode, so that the battery can be charged more. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0019] Figure 1 The block diagram of the parallel charging solution for large and small batteries;
[0020] Figure 2 This is a schematic diagram of an embodiment of a charging method in an embodiment of the present application;
[0021] Figure 3A A schematic diagram showing a step change in battery voltage caused by a step change in battery current;
[0022] Figure 3B A schematic diagram of a flow chart for calculating the current battery impedance value in an embodiment of the present application;
[0023] Figure 3C A schematic diagram of a flow chart for updating the full charge voltage threshold in an embodiment of the present application;
[0024] Figure 4This is a schematic diagram of an embodiment of a charging device in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;
[0026] Figure 6 This is another schematic diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The embodiments of the present application provide a charging method, apparatus, terminal device and computer-readable storage medium, which can be used to dynamically update the full charging voltage threshold according to the current battery impedance value, thereby increasing the charging time of the corresponding charging mode and charging the battery more.
[0028] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0029] The following is a brief description of some terms involved in this application, as follows:
[0030] SOC (State of Charge) refers to the state of charge of the battery, that is, the charging state, and is a key technology of the battery management system. The state of charge is the ratio of the remaining capacity of the battery after a period of use or long-term storage to its fully charged capacity, usually expressed as a percentage. Its value range is 0 to 1. When SOC = 0, it means that the battery is fully discharged, and when SOC = 1, it means that the battery is fully charged.
[0031] SOH (State of Health) is used to describe the health status of the battery and reflects the current rated capacity of the battery, which is the ratio of the current rated capacity to the initial rated capacity. The SOH of the battery can also be expressed as the aging state of the battery, which can be divided into calendar aging and cycle aging according to the different electrochemical reaction mechanisms in the aging process.
[0032] IC chip (Integrated Circuit Chip) is an integrated circuit formed by a large number of microelectronic components (transistors, resistors, capacitors, etc.) placed on a plastic substrate to make a chip. IC chip includes wafer chip and package chip, and the corresponding IC chip production line consists of two parts: wafer production line and package production line.
[0033] Fast charging, referred to as fast charging, as the name implies, fast charging means fast charging, of course it is only relative. The charging speed is determined by current and voltage. For ordinary charging in the current era of universal mobile phones, the 5V2A charging head is generally used as the standard for ordinary charging. Of course, there are also very few manufacturers who think that 5V1A is the standard charge, such as Apple mobile phones. Fast charging is divided into ordinary fast charging, flash charging and super fast charging. Ordinary fast charging is 9V2A, which can be understood as high voltage and low current. Simply increasing the voltage to achieve fast charging to reduce charging time. Speaking of flash charging, it was called VOOC flash charging at first. Unlike ordinary fast charging, this is a low-voltage and high-current fast charging. And super fast charging, such as Huawei mate20pro, its charging speed is 40W, which is 10V4A, which is a high-voltage and high-current fast charging.
[0034] The float voltage is the voltage that the battery maintains after being fully charged, and this capacity is maintained by compensating for the self-discharge of the battery. The voltage can be kept constant throughout the battery operation (such as in a car battery), or it can be maintained at a specific charging stage of the charger. The float voltage can vary greatly with changes in the battery's chemistry and structure, as well as the ambient temperature.
[0035] ibus (Intelligent Input Bus) is an open source free multi-language input method framework for GNU / Linux and UNIX-like operating systems, with source code distributed under the General Public License (GPL) agreement. GNU is an operating system whose content software is completely released under the GPL.
[0036] HIDL is an interface description language (IDL) used to specify the interface between the Hardware Abstraction Layer (HAL) and its users. It allows specified types and function calls to be collected into interfaces and packages. More broadly speaking, HIDL is a system that allows independently compiled code libraries to communicate with each other. HIDL is actually used for inter-process communication (IPC). Inter-process communication can be called Binderized. For libraries that must be connected to processes, passthrough mode can also be used (but not supported in Java). HIDL organizes specified data structures and method signatures into interfaces, which are collected into packages for use.
[0037] Unified Extensible Firmware Interface (UEFI) is a personal computer system specification that defines the software interface between the operating system and the system firmware as an alternative to the Basic Input Output System (BIOS). The Extensible Firmware Interface is responsible for the power-on self-test (POST), contacting the operating system, and providing an interface between the operating system and the hardware.
[0038] Standard I / O (Input / Output), some commonly used function interfaces (Application Programming Interface, API) may include but are not limited to: fopen (open a file), fgetc (read a character from a file), fgets (read a string of characters from a file), fread (read multiple elements from a file stream), fwrite (write a file to a stream file), putc (write a character to a file), puts (write a string to a file)...
[0039] The Linux device tree is called Devicetree in English, and the source file of the device tree is called DTS. The device tree is used to describe the hardware resources of the system. There are two types of device tree files, files ending with .dts and .dtsi. The dtsi file is usually used to describe the peripherals supported by the central processing unit (CPU), and the dts file is usually used to describe the use of hardware resources of a specific board. Therefore, the dtsi file is used to be included by the dts file.
[0040] In the field of mobile phone charging, for foldable models, the current majority of charging solutions are parallel charging of large and small batteries, and some solutions are series charging of batteries of equal capacity. Figure 1 As shown, it is a block diagram of the parallel charging solution for large and small batteries.
[0041] Since the capacity of the two cells is different, the impedance of each path is also different, and the current allocated by ibus to the large and small batteries is different. Generally, the impedance of the small cell path is relatively small, and the allocated current is larger. If there is no restriction, the small cell will be full faster than the large cell; therefore, a current limiting IC chip (Integrated Circuit Chip) will be added in front of the small cell to dynamically adjust the value of the current limiting IC chip according to the current of ibus to limit the current flowing into the small cell. However, even with this setting, as the aging degree of the two batteries is different after use, or the mobile phone is replaced with batteries of different aging degrees, the internal resistance of the battery with a high degree of aging will increase. If the mobile phone is in fast charging mode, the floating voltage will be high during the fast charging process for the same charging current, and the current software mechanism will exit the fast charging mode when the battery voltage is higher than the fast charging full voltage threshold (such as 4550mv). Assuming that the batteries are new and old, the new battery has a small internal resistance and a small floating pressure, while the old battery has a large internal resistance and a large floating pressure. In the fast charging process, the voltage of the old battery will reach the fast charging full voltage threshold first, while the voltage of the new battery is still relatively small at this time (for example, 4350mv). After exiting the fast charging mode, it will enter the constant voltage (CV) general charging mode. The current in the general charging mode is very small, and it takes a long time for the new battery to charge to the cut-off voltage. Therefore, a unified fast charging full voltage threshold is currently set for dual-cell batteries. With different degrees of battery aging, or when batteries with different degrees of aging are replaced, the charging time will be long (quit the fast charging mode early, and the time will accumulate in the general charging mode stage). If the mobile phone is in the general charging mode, the floating voltage will be high at the same charging current during the charging process, and the current software mechanism will also exit the general charging mode if the battery voltage is higher than the general charging full voltage threshold, resulting in the mobile phone battery not being fully charged.
[0042] In the related technical scheme, a battery electrochemical impedance spectroscopy (EIS) method is proposed, which can use a small-amplitude sinusoidal potential (or current) as a perturbation electrical signal to make the electrode system produce an approximately linear response, and measure the ratio of the alternating potential and current signal of the electrode system in a wide frequency range (this ratio is the impedance of the system) to study the electrode system.
[0043] In the embodiment of the present application, the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0044] As an example but not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0045] The technical solution of the present application is further described below by way of embodiments. Figure 2 FIG. 1 is a schematic diagram of an embodiment of a charging method in an embodiment of the present application. The method is applied to a terminal device, the terminal device includes a battery, and the method includes:
[0046] 201. Obtain the current battery impedance value.
[0047] In an optional implementation, when the terminal device is in a screen-off state and a charging state, a step of obtaining a current battery impedance value is performed.
[0048] In an optional implementation, the charging state may include a fast charging mode (referred to as fast charging mode) state, a normal charging mode (referred to as general charging mode) state, or an FFC (Flash Fast Charge) charging algorithm optimized charging mode state. Different charging mode states correspond to different charging full voltage thresholds, that is, the charging full voltage threshold may include a fast charging full voltage threshold, an FFC full voltage threshold, and a general charging full voltage threshold.
[0049] In an optional implementation, the obtaining of the current battery impedance value may include but is not limited to the following implementations:
[0050] Obtaining the current battery temperature of the terminal device;
[0051] Mode 1: searching a preset mapping relationship table to obtain the current battery impedance value corresponding to the current battery temperature, wherein the preset mapping relationship table is a mapping relationship table between battery temperature ranges and battery impedance values; or,
[0052] Mode 2: When the current battery impedance value corresponding to the current battery temperature is not found in the preset mapping relationship table, and at least one of the voltage sequence and the current sequence meets the step response condition, the current battery impedance value is calculated, the voltage sequence is a sequence consisting of multiple voltage values of the battery, and the current sequence is a sequence consisting of multiple current values of the battery; or,
[0053] Mode 3: When at least one of the voltage sequence and the current sequence meets a step response condition, the current battery impedance value is calculated.
[0054] In an optional implementation, when at least one of the voltage sequence and the current sequence satisfies a step response condition, calculating the current battery impedance value may include: when at least one of the voltage sequence and the current sequence satisfies the step response condition, performing discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; and calculating the current battery impedance value according to the discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
[0055] It can be understood that the number of voltage values contained in the voltage sequence corresponds to the total number of sampling points, and the number of current values contained in the current sequence also corresponds to the total number of sampling points. The voltage values in the voltage sequence and the current values in the current sequence can be considered to be one-to-one corresponding, that is, they can be called voltage-current pairs. Therefore, the voltage sequence and the current sequence can also be considered as an overall voltage-current pair sequence.
[0056] In an optional implementation, the total number of sampling points may be preset, or may be calculated based on the sampling frequency and the minimum calculation frequency in the EIS configuration file.
[0057] In an optional implementation, the voltage values in the voltage sequence are increasing, and at the same time, the current values in the current sequence are also increasing, that is, arranged from small to large.
[0058] In another optional implementation, the voltage values in the voltage sequence are decreasing, and at the same time, the current values in the current sequence are also decreasing, that is, arranged from large to small.
[0059] In an optional implementation, the voltage value and the current value of the battery may be sampled according to the total number of sampling points, and then sorted to obtain a voltage sequence and a current sequence.
[0060] In another optional implementation, voltage values and current values that meet the total number of sampling points may be acquired from the multiple voltage values and current values that have been sampled and sorted, to obtain a voltage sequence and a current sequence.
[0061] It should be noted that, because the voltage values in the voltage sequence and the current values in the current sequence are one-to-one corresponding, and the current step change causes the voltage step change, therefore, when judging whether the voltage sequence and the current sequence meet the step response condition, if it is judged that the voltage value in the voltage sequence meets the step response condition, it can be considered that the current value in the current sequence also meets the step response condition, and a discrete transformation is performed on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; if it is judged that the current value in the current sequence meets the step response condition, it can be considered that the voltage value in the voltage sequence meets the step response condition. The voltage values also meet the step response condition, and discrete transformation is performed on the voltage values in the voltage sequence and the current values in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; in order to ensure the accuracy of the judgment result, it is also possible to judge whether the voltage values in the voltage sequence and the current values in the current sequence meet the step response condition. If the voltage values in the voltage sequence meet the step response condition, and the current values in the current sequence meet the step response condition, discrete transformation is performed on the voltage values in the voltage sequence and the current values in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
[0062] In an optional implementation, the current battery impedance value is a quotient of a discrete transformation value of the voltage sequence and a discrete transformation value of the current sequence.
[0063] In an optional implementation, when the current battery impedance value corresponding to the current battery temperature is not found in the preset mapping relationship table, after calculating the current battery impedance value according to the discrete transformation values corresponding to the voltage sequence and the current sequence respectively, the method may further include: saving the current battery temperature and the current battery impedance value in the preset mapping relationship table.
[0064] In an optional implementation, the discrete transformation may include a discrete Fourier transform (DFT) transformation.
[0065] In an optional implementation, the discrete transform value includes a discrete transform complex value; the discrete transform complex value may include at least one of a discrete transform imaginary part value and a discrete transform real part value.
[0066] In an optional implementation, the current battery impedance value includes at least one of a current battery real impedance value and a current battery imaginary impedance value.
[0067] Among them, the battery impedance value is positively correlated with the battery aging degree, that is, the larger the battery impedance value, the more serious the battery aging degree.
[0068] For example, Figure 3A The figure shows a schematic diagram of a battery voltage step change caused by a battery current step change. Figure 3A As shown in the figure, the boxed components are the battery voltage (battery_voltage) and battery current (battery_current) components needed for EIS analysis. The EIS process is Z = DFT (battery_voltage) / DFT (battery_current), where Z is the complex impedance value at different calculation frequencies. DFT (Discrete Fourier Transform) is discrete Fourier transform. The function of DFT is to transform the signal from the time domain to the frequency domain, and both the time domain and the frequency domain are discrete. It can be found out which sinusoidal waves a signal is composed of, and the result is the amplitude and phase of the sinusoidal wave.
[0069] The specific calculation formula of DFT transformation is as follows:
[0070]
[0071]
[0072] Among them, the sine wave superposition X(k) represents the DFT transformation value, while x(n) represents the sampled data (voltage value and current value), and N is the total number of sampling points.
[0073] The algorithm theory is applied to the terminal device to obtain the current battery impedance value in real time. The current battery impedance value calculated by EIS is used to dynamically adjust the full charge voltage threshold, so that the corresponding charging mode can last relatively longer. Overall, the charging time can be shortened to a certain extent.
[0074] like Figure 3B As shown, it is a flow chart of calculating the current battery impedance value in the embodiment of the present application. When electrochemical impedance spectroscopy (EIS) is performed, an EIS calculation thread (eis_cal_thread) is created in the hidl service for calculation. If the battery voltage of the mobile phone just starts to start and exceeds the boot voltage in the UEFI stage, it will be transferred to load the Android operating system, and then the hidl service will be loaded to determine whether the EIS calculation thread meets the running conditions. The EIS calculation thread in the hidl service is running in the screen-off state + charging state, because the battery current is relatively stable in the screen-off state + charging state, and then there will be current steps during the charging process, so the screen-off state + charging state can run the EIS calculation thread. In other cases, the EIS calculation thread enters the waiting queue and is in a sleep state. After the screen-off state + charging state is met, the EIS calculation thread will be scheduled and run by the CPU.
[0075] When the EIS calculation thread is running, it will collect the voltage value (voltage, which can be abbreviated as volt) and current value (current, which can be abbreviated as curr) of the battery at the current moment; sort and fill to obtain the voltage sequence and current sequence, that is, the voltage-current pair sequence. Optionally, determine whether to perform noise compensation on the voltage-current pair. Then determine whether at least one of the voltage sequence and the current sequence meets the step response condition. If the step response condition is not met, the EIS calculation thread can be executed in a loop every 1s, or it can be executed in a loop every other cycle, which is not limited here. If the step response condition is met, the voltage sequence volt and the current sequence curr are respectively subjected to DFT transformation, and then the DFT transformation value of the voltage sequence volt and the DFT transformation value of the current sequence curr are obtained. The DFT transformation value of volt is divided by the DFT transformation value of curr to obtain the current battery impedance value (batt_r) at the target calculation frequency. Then obtain the current battery temperature (batt_temp), and then use the API interface for reading the partition to read the storage partition assigned to the charging module and parse it with a specific structure. The form of the structure is as follows:
[0076] Tag: specific identification;
[0077] Data: Actual impedance values corresponding to different temperature ranges.
[0078] Tag is a special string, and its value is normally equal to "eis_r_table". If the tag parsed from the storage area is not equal to eis_r_table, it means that the mobile phone is a new one and has not run the EIS calculation thread to calculate the battery impedance value. At this time, you need to use the initial impedance value in the dtsi configuration file to set it (the impedance value of each temperature range measured by the new battery in the laboratory environment), fill it into the data data in the structure, and set the tag to the eis_r_table field. The assembled structure is as follows:
[0079] Tag: eis_r_table
[0080] Data:
[0081] Temp_1\init_r1,
[0082] Temp_2\init_r2,
[0083] …
[0084] Temp_n_init_rn
[0085] If the read partition tag is equal to eis_r_table, it means that the EIS impedance value table of each temperature range already exists in the partition. At this time, you only need to match the temperature range according to the current battery temperature, that is, the temperature range from temp_1 to temp_n. For example, if temp_m is matched, the battery impedance value corresponding to temp_m is replaced with: temp_m\batt_r. Finally, the entire structure after replacing the data is used to fill a specific storage partition so that the kernel module can use the impedance value of the storage partition.
[0086] When the phone starts, the Linux kernel module will be loaded and the battery fuel gauge chip will be read through I2C to obtain the current battery temperature (batt_temp). If it is the first time to start the phone or the battery temperature range has changed, the battery's full charge voltage threshold needs to be recalculated, otherwise the current full charge voltage threshold will continue to be maintained.
[0087] The kernel sends an event message to hidl to request the battery impedance value. After hidl receives the event message, it reads the specific storage partition and parses it with a specific structure and sends the result (that is, the preset mapping table) to the kernel, and then obtains the battery impedance value for each temperature range, as shown below:
[0088] Temp_1\r1,
[0089] Temp_2\r2,
[0090] …,
[0091] Temp_n\rn.
[0092] Then, the corresponding current battery impedance value (batt_r) is obtained according to the current battery temperature mapping.
[0093] 202. Update the full charge voltage threshold according to the current battery impedance value and the initial battery impedance value to obtain a full charge voltage update threshold.
[0094] In an optional implementation, updating the full charge voltage threshold according to the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold may include: updating the full charge voltage threshold according to the difference between the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold.
[0095] In an optional implementation, updating the full charge voltage threshold according to the difference between the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold may include: calculating the difference between the current battery impedance value and the initial battery impedance value; calculating an update step according to the difference and a preset constant; updating the full charge voltage threshold according to the update step to obtain the full charge voltage update threshold.
[0096] In an optional implementation, the update step size is the quotient of the difference and the preset constant, and the full charge voltage update threshold is the sum of the full charge voltage threshold and the update step size.
[0097] In an optional implementation, the update step is an integer of the quotient of the difference and the preset constant, that is, if the quotient of the difference and the preset constant is a decimal, the decimal is removed and the integer is obtained.
[0098] In an optional implementation, the full charge voltage update threshold is less than or equal to the maximum full charge voltage threshold.
[0099] For example, the battery aging degree can be determined according to the current battery impedance value (batt_r). Figure 3CAs shown, it is a flow chart of updating the full charge voltage threshold in the embodiment of the present application. First, when the mobile phone starts, the Linux kernel module is loaded; the battery fuel gauge chip is read through I2C to obtain the current battery temperature (batt_temp); it is determined whether the temperature range has changed or it is the first inquiry. If it is the first time to start the phone or the battery temperature range has changed, then the full charge voltage threshold of the battery needs to be recalculated, otherwise the current full charge voltage threshold is maintained. The battery temperature range has changed, which can be understood as whether the temperature range corresponding to the current full charge voltage threshold and the temperature range corresponding to the current battery temperature have changed.
[0100] The kernel sends an event message to hidl to request the battery impedance value. After hidl receives the event message, it reads the specific storage partition and parses it with a specific structure and sends the result (that is, the preset mapping table) to the kernel, and then obtains the battery impedance value for each temperature range, as shown below:
[0101] Temp_1\r1,
[0102] Temp_2\r2,
[0103] …,
[0104] Temp_n\rn.
[0105] Then, the corresponding current battery impedance value (batt_r) is obtained according to the current battery temperature mapping. Then, the degree of battery aging is determined, that is, how much the current battery impedance value (batt_r) has increased relative to the initial impedance value (init_r) of the new battery. Here, for example, the full charge voltage threshold increases by 1mv for every 5 milliohm increase in battery impedance. That is, the update step detal_r = (batt_r-init_r) / 5; the full charge voltage update threshold (fastchg_thd) is equal to the full charge voltage threshold (init_fastchg_thd) plus the update step (detal_r), that is, fastchg_thd = init_fastchg_thd+detal_r.
[0106] For example, if the full charge voltage threshold is 4550mv, the initial battery impedance is 30 milliohms, and the impedance becomes 60 milliohms after battery aging, then the update step is (60-30) / 5=6mv, and the full charge voltage threshold is updated to 4556mv.
[0107] It can also be determined whether the charging full voltage update threshold (fastchg_thd) is greater than the maximum charging full voltage threshold (max_fastchg_thd). If it is greater, fastchg_thd = max_fastchg_thd, and fastchg_thd is used as the charging full voltage threshold of the battery for charging. That is, for safety reasons, the battery charging full voltage update threshold cannot be increased indefinitely to avoid overcharging and damaging the battery. Therefore, a maximum charging full voltage threshold (max_fastchg_thd) can be set, such as 4600mv, and the charging full voltage update threshold cannot exceed this value.
[0108] 203. Charging is performed according to the charging full voltage update threshold.
[0109] In an optional implementation, the full charge voltage update threshold is greater than the full charge voltage threshold.
[0110] The mobile phone can be charged according to the updated charging full voltage update threshold.
[0111] For example, if the mobile phone is in fast charging mode, it can be charged according to the fast charging full voltage update threshold, increasing the time the mobile phone stays in fast charging mode for charging, delaying the exit from fast charging mode to enter normal charging mode, and in terms of the overall charging time, the charging time can be reduced to a certain extent.
[0112] If the mobile phone is in FFC charging mode, it can be charged according to the FFC full voltage update threshold, increasing the time the mobile phone stays in FFC charging mode for charging, delaying the exit from FFC charging mode to enter normal charging mode, and in terms of the overall charging time, it can reduce the charging time to a certain extent.
[0113] If the mobile phone is in normal charging mode, it can be charged according to the general charging full voltage update threshold. Because the charging full voltage update threshold is greater than the charging full voltage threshold, the charging time can be increased so that the battery can be charged more and will not be full in advance and stop charging.
[0114] The technical solution of the present application calculates the current battery impedance value in real time based on the EIS impedance spectrum analysis algorithm, and dynamically adjusts the full charge voltage threshold according to the difference between the current impedance and the initial impedance, that is, the full charge voltage threshold changes with the degree of battery aging. It can solve the problem of premature exit from the corresponding charging mode due to high floating pressure after battery aging, and can improve the overall charging speed and enhance the charging experience after battery aging.
[0115] In the embodiment of the present application, the current battery impedance value is obtained; according to the current battery impedance value and the initial battery impedance value, the charging full voltage threshold is updated to obtain the charging full voltage update threshold; charging is performed according to the charging full voltage update threshold. The corresponding current battery impedance value can be obtained according to the current battery temperature of the terminal device, and then the charging full voltage threshold is dynamically updated according to the current battery impedance value and the initial battery impedance value, thereby increasing the charging time of the corresponding charging mode and allowing the battery to be charged more.
[0116] The following is a detailed description of “when at least one of the voltage sequence and the current sequence meets the step response condition, performing discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; and calculating the current battery impedance value according to the discrete transformation values corresponding to the voltage sequence and the current sequence respectively”, as shown below:
[0117] 1. The current value in the current sequence meets the step response condition
[0118] In an optional implementation, the current sequence includes a first sequence and a second sequence, wherein the first sequence is a first half sequence of the current sequence, and the second sequence is a second half sequence of the current sequence.
[0119] When at least one of the voltage sequence and the current sequence satisfies a step response condition, performing discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively may include: when it is determined that the current value in the current sequence satisfies the step response condition based on the center point current value of the first sequence and the center point current value of the second sequence, performing discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
[0120] In an optional implementation, the number of current values included in the current sequence corresponds to the total number of sampling points; when it is determined that the current value in the current sequence satisfies the step response condition according to the center point current value of the first sequence and the center point current value of the second sequence, discrete transformation is performed on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively, which may include: if the following conditions are met, it is determined that the current value of the current sequence satisfies the step response condition, and discrete transformation is performed on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively;
[0121] Condition 1: The difference between the center point current value of the second sequence and the center point current value of the first sequence is greater than or equal to the first current threshold;
[0122] Condition 2: The difference between the current value of the center point of the first sequence and the current value of the first target point of the first sequence is less than the second current threshold; wherein the current value of the first target point is the current value of the position corresponding to the number of noise points in the first sequence, and the number of noise points is calculated based on the total number of sampling points;
[0123] Condition 3: The difference between the current value of the second target point in the first sequence and the current value of the center point in the first sequence is less than the second current threshold; wherein the current value of the second target point is the current value of the position corresponding to the number of currents included in the first sequence minus the number of noise points minus 1;
[0124] Condition 4: The difference between the current value of the center point of the second sequence and the current value of the third target point of the second sequence is less than the second current threshold; wherein the current value of the third target point is the current value of the position corresponding to the number of noise points in the second sequence;
[0125] And, condition 5: the difference between the current value of the fourth target point of the second sequence and the current value of the center point of the second sequence is less than the second current threshold; wherein the current value of the fourth target point is the current value of the position corresponding to the number of currents included in the second sequence minus the number of noise points minus 1;
[0126] Wherein, when the current value in the current sequence increases, the first current threshold is greater than or equal to the second current threshold, and when the current value in the current sequence decreases, the first current threshold is less than or equal to the second current threshold.
[0127] 2. The voltage in the voltage sequence meets the step response condition
[0128] In an optional implementation, the voltage sequence includes a third sequence and a fourth sequence, wherein the third sequence is a first half sequence of the voltage sequence, and the fourth sequence is a second half sequence of the voltage sequence.
[0129] When at least one of the voltage sequence and the current sequence satisfies a step response condition, performing discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively may include: when it is determined that the voltage value in the voltage sequence satisfies the step response condition based on the center point voltage value of the third sequence and the center point voltage value of the fourth sequence, performing discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
[0130] In an optional implementation, the number of voltage values included in the voltage sequence corresponds to the total number of sampling points; when it is determined that the voltage values in the voltage sequence meet the step response condition according to the center point voltage value of the third sequence and the center point voltage value of the fourth sequence, discrete transformation is performed on the voltage values in the voltage sequence and the current values in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively, which may include: if the following conditions are met, it is determined that the voltage values of the voltage sequence meet the step response condition, and discrete transformation is performed on the voltage values in the voltage sequence and the current values in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively;
[0131] Condition 1: The difference between the center point voltage value of the fourth sequence and the center point voltage value of the third sequence is greater than or equal to the first voltage threshold;
[0132] Condition 2: The difference between the voltage value of the center point of the third sequence and the voltage value of the first target point of the third sequence is less than the second voltage threshold; wherein the voltage value of the first target point is the voltage value of the position corresponding to the number of noise points in the third sequence, and the number of noise points is calculated based on the total number of sampling points;
[0133] Condition 3: The difference between the voltage value of the second target point of the third sequence and the voltage value of the center point of the third sequence is less than the second voltage threshold; wherein the voltage value of the second target point is the voltage value of the position corresponding to the number of voltages included in the third sequence minus the number of noise points minus 1;
[0134] Condition 4: the difference between the voltage value of the center point of the fourth sequence and the voltage value of the third target point of the fourth sequence is less than the second voltage threshold; wherein the voltage value of the third target point is the voltage value of the position corresponding to the number of noise points in the fourth sequence;
[0135] And, condition 5: the difference between the voltage value of the fourth target point of the fourth sequence and the voltage value of the center point of the fourth sequence is less than the second voltage threshold; wherein the voltage value of the fourth target point is the voltage value of the position corresponding to the number of voltages included in the fourth sequence minus the number of noise points minus 1;
[0136] Wherein, when the voltage value in the voltage sequence increases, the first voltage threshold is greater than or equal to the second voltage threshold, and when the voltage value in the current sequence decreases, the first voltage threshold is less than or equal to the second voltage threshold.
[0137] Exemplarily, the voltage and current values in the sort_f sequence and the sort_a sequence are judged whether they meet the step response conditions. If the step response conditions are met, it can also be judged whether noise compensation is needed. Then, a DFT transform is performed on volt in the sampling voltage and current pair (sampling_volt_curr), and a DFT transform is performed on curr in sampling_volt_curr. Finally, the battery impedance value is calculated using the DFT transformed complex value of volt and the DFT transformed complex value of curr.
[0138] It can be understood that the current threshold (bal_step_ma) is a threshold for judging whether the current value is stable and balanced. For example, assuming that the current threshold is 100 milliamperes (mA), if the difference between the current values in a current sequence is within 100mA, the current interval in the current sequence is determined to be balanced, and the default value may be 100mA; if the difference between the current values in a current sequence exceeds 100mA, the current interval in the current sequence is determined to be unbalanced.
[0139] Optionally, the number of left and right noise nodes (sidelobe_nodes) of a sorted sequence is calculated as follows:
[0140] sidelobe_nodes=sampling_node_n / Y, where Y is a constant and can be an empirical value.
[0141] Assume that Y is 20 and the total number of sampling points (sampling_node_n) is 40, then the number of noise points sidelobe_nodes = 40 / 20 = 2. f_center_point is equal to half of sort_f_nodes, which is the center point of the sort_f sequence; f_left_points = side_f_nodes, f_left_points belongs to the starting point of the first noise-removed point in the sequence sort_f; f_right_points = sort_f_nodes-sidelobe_nodes-1, f_right_points belongs to the starting point of the last noise-removed point in the sequence sort_f. Similarly, the same preprocessing is performed on the variables related to the sort_a sequence.
[0142] Judge the magnitudes of the actual number of sampling points (sampling_actual_node) and the total required number of sampling points (sampling_node_n). If it is less, it indicates that the total number of sampling points is insufficient and no DFT transformation is required. If f_center_point - sidelobe_nodes < a specific threshold (e.g., 5), or a_center_point - sidelobe_nodes < a specific threshold (e.g., 5), it indicates that the noise positions in the sort_f sequence, or the sort_a sequence are too close to the center point position, and no DFT transformation is performed.
[0143] If sort[f_center_point].curr - 300 > sort[a_center_point].curr, that is, the center point curr of the sort_f sequence is more than 300 mA greater than the center point curr of the sort_a sequence, it proves that there is a relatively large current value drop before and after, and further judgment is required. The test needs to judge the magnitude relationship between the current value at the noise position and the current value at the center point. If the current value at the center point of the sort_f sequence is less than 100 mA compared to the current value at the f_left_points position on the left, and the current value at the f_right_points position on the right of the sort_f sequence is less than 100 mA compared to the current value at the center point, and the current value at the center point of the sort_a sequence is less than 100 mA compared to the current value at the a_left_points position on the left, and the current value at the a_right_point position on the right of the sort_a sequence is less than 100 mA compared to the current value at the center point (where sort_f and sort_a are both ordered increasing sequences, and the value on the left is smaller than the value on the right), that is:
[0144] sort[f_center_point].curr - sort[f_left_point].curr < bal_step_ma, and at the same time
[0145] sort[f_right_point].curr - sort[f_center_point].curr < bal_step_ma, and at the same time
[0146] sort[a_center_point].curr - sort[a_left_point].curr < bal_step_ma, and at the same time
[0147] sort[a_right_point].curr - sort[a_center_point].curr < bal_step_ma.
[0148] If it is satisfied, DFT transformation is required. If it is not satisfied, it indicates that the current value is unstable and fluctuates greatly at this time, and it is not suitable for DFT transformation. However, the actual situation is not perfect, and there are always a few points with large fluctuations. Therefore, noise points need to be compensated.
[0149] 3. Perform discrete transformation on the voltage values in the voltage sequence and the current values in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively
[0150] Exemplarily, calculate the memory area to store the complex values of the volt DFT transformation, that is, clear the memory area with the starting address complex_volt; it is also necessary to calculate the memory area to store the complex values of the curr DFT transformation, that is, clear the memory area with the starting address complex_curr. Then set the initial value of k to 0, and then judge whether k is less than sampling_node_n. If k < sampling_node_n, then initialize the variable n = 0; then judge whether n is less than sampling_node_n. When n < sampling_node_n, perform the transformation of the DFT at k to obtain the complex transformation value, that is
[0151] complex_volt[k].real += volt_curr[n].volt * cos((2 * π * k * n) / sampling_node_n);
[0152] complex_volt[k].image += volt_curr[n].volt * sin((2 * π * k * n) / sampling_node_n) * (-1);
[0153] complex_curr[k].real += volt_curr[n].curr * cos((2 * π * k * n) / sampling_node_n);
[0154] complex_curr[k].image += volt_curr[n].curr * sin((2 * π * k * n) / sampling_node_n) * (-1).
[0155] Calculate the real part and the imaginary part of volt at k respectively, and then for n+1, continue to loop the above process until n=sampling_node_n. At this time, the impedance at other k values needs to be calculated, so set k=k+1, and continue to judge whether k is less than sampling_node_n. Then repeat the above calculation process until k=sampling_node_n. At this time, the DFT transformation of volt at all k values is okay, and a sequence of complex voltage transformation values (complex_volt) is obtained. Then perform the DFT transformation of current in the same way to obtain a sequence of complex current transformation values (complex_curr).
[0156] 4. Calculate the current battery impedance value according to the discrete transformation values corresponding to the voltage sequence and the current sequence
[0157] The impedance value corresponding to k at each calculation frequency can be obtained by using complex_volt and complex_curr. Set the initial variable i=0, and then judge whether i is less than the number of calculation frequencies (cal_fmhz_nums). When i≥cal_fmhz_nums, end the operation; when i<cal_fmhz_nums, calculate the impedance value at the corresponding k through this formula.
[0158] result[i].real_r = ((*(complex_volt + result[i].k)).real *
[0159] (*(complex_curr + result[i].k)).real +
[0160] (*(complex_volt + result[i].k)).image *
[0161] (*(complex_curr + result[i].k)).image) /
[0162] (EIS_SQUARE((*(complex_curr + result[i].k)).real) +
[0163] EIS_SQUARE((*(complex_curr + result[i].k)).image));
[0164] result[i].image_r = ((*(complex_volt + result[i].k)).image *
[0165] (*(complex_curr+result[i].k)).real-
[0166] (*(complex_volt+result[i].k)).real*
[0167] (*(complex_curr+result[i].k)).image) /
[0168] (EIS_SQUARE((*(complex_curr+result[i].k)).real)+
[0169] EIS_SQUARE((*(complex_curr+result[i].k)).image));
[0170] i++, then determine whether i is less than the calculated frequency number cal_fmhz_nums, and proceed to the subsequent steps.
[0171] Among them, (*(complex_curr+result[i].k) refers to the element of the complex_curr sequence offset by result[i].k; (*(complex_volt+result[i].k) refers to the element of the complex_volt sequence offset by result[i].k; EIS_SQUARE is to find the square of a certain value. It can be understood that the real part of (a+bj) / (c+dj) is (ac+bd) / (c*c+d*d). So far, the impedance value at each calculation frequency can be obtained.
[0172] It should be noted that the embodiment of the present application can update the data of the power meter once every 1s, and the EIS calculation thread polls the sampled data once every 1s, which is applicable to sampling frequencies of 1 Hz (Hz) and lower, and is also applicable to higher sampling frequencies.
[0173] like Figure 4 FIG. 1 is a schematic diagram of an embodiment of a charging device in an embodiment of the present application. The device is applied to a terminal device, and the terminal device includes a battery. The device may include:
[0174] An acquisition module 401 is used to acquire the current battery impedance value;
[0175] An updating module 402 is used to update the full charge voltage threshold according to the current battery impedance value and the initial battery impedance value to obtain a full charge voltage update threshold;
[0176] The charging module 403 is used to charge according to the charging full voltage update threshold.
[0177] Optionally, the updating module 402 is specifically configured to update the full charge voltage threshold according to the difference between the current battery impedance value and the initial battery impedance value, so as to obtain the full charge voltage update threshold.
[0178] Optionally, the update module 402 is specifically used to calculate the difference between the current battery impedance value and the initial battery impedance value; calculate the update step size according to the difference and a preset constant; and update the full charge voltage threshold according to the update step size to obtain the full charge voltage update threshold.
[0179] Optionally, the update step size is the quotient of the difference and the preset constant, and the full charge voltage update threshold is the sum of the full charge voltage threshold and the update step size.
[0180] Optionally, an acquisition module 401 is specifically used to obtain a current battery temperature of the terminal device; to search in a preset mapping relationship table to obtain a current battery impedance value corresponding to the current battery temperature, wherein the preset mapping relationship table is a mapping relationship table of battery temperature ranges and battery impedance values; or, when the current battery impedance value corresponding to the current battery temperature is not found in the preset mapping relationship table, and at least one of the voltage sequence and the current sequence meets a step response condition, calculate the current battery impedance value, wherein the voltage sequence is a sequence consisting of multiple voltage values of the battery, and the current sequence is a sequence consisting of multiple current values of the battery; or, when at least one of the voltage sequence and the current sequence meets the step response condition, calculate the current battery impedance value.
[0181] Optionally, the acquisition module 401 is specifically used to perform discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence when at least one of the voltage sequence and the current sequence meets the step response condition, so as to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; and calculate the current battery impedance value according to the discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
[0182] Optionally, the battery impedance value is the quotient of a discrete transformation value of the voltage sequence and a discrete transformation value of the current sequence.
[0183] Optionally, when the terminal device is in a screen-off state and a charging state, a step of obtaining a current battery impedance value is performed.
[0184] Optionally, the full charge voltage update threshold is less than or equal to the maximum full charge voltage threshold.
[0185] like Figure 5As shown, it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, which may include: Figure 4 The charging device shown.
[0186] like Figure 6 FIG. 1 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present application. It may include:
[0187] Combine the following Figure 6 A detailed introduction to the various components of the mobile phone in the terminal device:
[0188] The RF circuit 610 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 680 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 610 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 610 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0189] The memory 620 can be used to store software programs and modules. The processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620. The memory 620 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 620 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0190] The input unit 630 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 631 or near the touch panel 631 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 631 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 631, the input unit 630 may also include other input devices 632. Specifically, the other input devices 632 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0191] The display unit 640 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 631 may cover the display panel 641. When the touch panel 631 detects a touch operation on or near it, it is transmitted to the processor 680 to determine the type of touch event. Subsequently, the processor 680 provides a corresponding visual output on the display panel 641 according to the type of touch event. Although in Figure 6 In the embodiment, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 631 and the display panel 641 can be integrated to realize the input and output functions of the mobile phone.
[0192] The mobile phone may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 641 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0193] The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the mobile phone. The audio circuit 660 can transmit the received audio data to the speaker 661 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and converted into audio data, and then the audio data is output to the processor 680 for processing, and then sent to another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for further processing.
[0194] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 670, which provides users with wireless broadband Internet access. Figure 6 A Wi-Fi module 670 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0195] The processor 680 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 620, and calling data stored in the memory 620, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 680.
[0196] The mobile phone also includes a power supply 690 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 680 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0197] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0198] In an embodiment of the present application, the processor 680 is used to obtain the current battery impedance value; update the full charge voltage threshold according to the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold; and charge according to the full charge voltage update threshold.
[0199] Optionally, the processor 680 is specifically configured to update the full charge voltage threshold according to the difference between the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold.
[0200] Optionally, the processor 680 is specifically used to calculate the difference between the current battery impedance value and the initial battery impedance value; calculate the update step size according to the difference and a preset constant; and update the full charge voltage threshold according to the update step size to obtain the full charge voltage update threshold.
[0201] Optionally, the update step size is the quotient of the difference and the preset constant, and the full charge voltage update threshold is the sum of the full charge voltage threshold and the update step size.
[0202] Optionally, the processor 680 is specifically used to obtain the current battery temperature of the terminal device; search in a preset mapping relationship table to obtain a current battery impedance value corresponding to the current battery temperature, the preset mapping relationship table being a mapping relationship table of battery temperature ranges and battery impedance values; or, when the current battery impedance value corresponding to the current battery temperature is not found in the preset mapping relationship table, and at least one of the voltage sequence and the current sequence satisfies a step response condition, calculate the current battery impedance value, the voltage sequence being a sequence consisting of multiple voltage values of the battery, and the current sequence being a sequence consisting of multiple current values of the battery; or, when at least one of the voltage sequence and the current sequence satisfies the step response condition, calculate the current battery impedance value.
[0203] Optionally, the processor 680 is specifically used to perform discrete transformation on the voltage value in the voltage sequence and the current value in the current sequence when at least one of the voltage sequence and the current sequence meets the step response condition, so as to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; and calculate the current battery impedance value according to the discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
[0204] Optionally, the battery impedance value is the quotient of a discrete transformation value of the voltage sequence and a discrete transformation value of the current sequence.
[0205] Optionally, when the terminal device is in a screen-off state and a charging state, a step of obtaining a current battery impedance value is performed.
[0206] Optionally, the full charge voltage update threshold is less than or equal to the maximum full charge voltage threshold.
[0207] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0208] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0209] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0210] The units described 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.
[0211] 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.
[0212] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0213] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A charging method, characterized in that: The method is applied to a terminal device, the terminal device includes a battery, and the method includes: Get the current battery impedance value; According to the current battery impedance value and the initial battery impedance value, the full charge voltage threshold is updated to obtain a full charge voltage update threshold; Charging is performed according to the fully charged voltage update threshold.
2. The method according to claim 1, characterized in that The step of updating the full charge voltage threshold according to the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold comprises: According to the difference between the current battery impedance value and the initial battery impedance value, the full charge voltage threshold is updated to obtain the full charge voltage update threshold.
3. The method according to claim 1, characterized in that The step of updating the full charge voltage threshold according to the difference between the current battery impedance value and the initial battery impedance value to obtain the full charge voltage update threshold comprises: Calculating a difference between the current battery impedance value and the initial battery impedance value; Calculating an update step size according to the difference and a preset constant; The full charge voltage threshold is updated according to the update step size to obtain a full charge voltage update threshold.
4. The method according to claim 3, characterized in that The update step length is the quotient of the difference and the preset constant, and the full charge voltage update threshold is the sum of the full charge voltage threshold and the update step length.
5. The method according to any one of claims 1 to 4, characterized in that The obtaining of the current battery impedance value includes: Obtaining the current battery temperature of the terminal device; Searching in a preset mapping relationship table to obtain the current battery impedance value corresponding to the current battery temperature, wherein the preset mapping relationship table is a mapping relationship table between battery temperature ranges and battery impedance values; or, If the current battery impedance value corresponding to the current battery temperature is not found in the preset mapping relationship table, and at least one of the voltage sequence and the current sequence satisfies the step response condition, the current battery impedance value is calculated, the voltage sequence is a sequence consisting of multiple voltage values of the battery, and the current sequence is a sequence consisting of multiple current values of the battery; or, When at least one of the voltage sequence and the current sequence meets a step response condition, a current battery impedance value is calculated.
6. The method according to claim 5, characterized in that When at least one of the voltage sequence and the current sequence meets the step response condition, calculating the current battery impedance value includes: When at least one of the voltage sequence and the current sequence satisfies a step response condition, performing discrete transformation on a voltage value in the voltage sequence and a current value in the current sequence to obtain discrete transformation values corresponding to the voltage sequence and the current sequence respectively; The current battery impedance value is calculated according to the discrete transformation values corresponding to the voltage sequence and the current sequence respectively.
7. The method according to claim 6, characterized in that The battery impedance value is a quotient of a discrete transformation value of the voltage sequence and a discrete transformation value of the current sequence.
8. The method according to any one of claims 1 to 4, characterized in that When the terminal device is in a screen-off state and a charging state, a step of obtaining a current battery impedance value is performed.
9. The method according to any one of claims 1 to 4, characterized in that: The full charge voltage update threshold is less than or equal to the maximum full charge voltage threshold.
10. A charging device, characterized in that: The device is applied to a terminal device, the terminal device includes a battery, and the device includes: The acquisition module is used to obtain the current battery impedance value; An updating module, used for updating a full charge voltage threshold according to the current battery impedance value and the initial battery impedance value, to obtain a full charge voltage update threshold; The charging module is used to charge according to the charging full voltage update threshold.
11. A terminal device, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor is used to execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium comprising instructions, which, when executed on a processor, causes the processor to perform the method according to any one of claims 1 to 9.