WO2020087373A1 - 电池电压的补偿方法、装置和终端设备 - Google Patents

电池电压的补偿方法、装置和终端设备 Download PDF

Info

Publication number
WO2020087373A1
WO2020087373A1 PCT/CN2018/113127 CN2018113127W WO2020087373A1 WO 2020087373 A1 WO2020087373 A1 WO 2020087373A1 CN 2018113127 W CN2018113127 W CN 2018113127W WO 2020087373 A1 WO2020087373 A1 WO 2020087373A1
Authority
WO
WIPO (PCT)
Prior art keywords
voltage
time
compensation
collected
smoothing
Prior art date
Application number
PCT/CN2018/113127
Other languages
English (en)
French (fr)
Inventor
邢广明
陈东国
李扬
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/113127 priority Critical patent/WO2020087373A1/zh
Priority to CN201880093192.1A priority patent/CN112292604B/zh
Publication of WO2020087373A1 publication Critical patent/WO2020087373A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]

Definitions

  • the present application relates to the technical field of batteries, and more specifically, to a method, device, and terminal device for battery voltage compensation.
  • FIG. 1 shows an example diagram of the change in the number of battery cells in the scenario of battery charging and discharging.
  • the power consumption of the terminal is displayed as 3 grids during standby, the power consumption is displayed as 1 grid when externally discharged, and the power consumption is displayed as 3 grids when returning to the standby state again.
  • the power display of the terminal is 1 grid when in standby, the power display is 3 grids when charging the battery, and the power display is 1 grid when returning to the standby state again.
  • the solution in the prior art is to compensate the collected voltage by modeling the internal resistance of the battery or adding a current detection circuit.
  • the internal resistance of the battery is affected by key factors such as the battery type, the ambient temperature, the current voltage, and the number of battery charge and discharge cycles. If you want to obtain an accurate remaining power value, it will cause difficult modeling conditions, extremely complicated, and any of the conditions change The calling logic is complicated.
  • increasing the compensation method of the current detection circuit will increase the cost of the product.
  • the present application provides a battery voltage compensation method, device, and terminal device.
  • the battery charge and discharge current need not be collected, but the smoothed voltage is calculated to accurately calculate the battery power.
  • a method for compensating a battery voltage is provided.
  • the method is applied to a terminal device including a battery.
  • the method includes: the terminal device acquires the collected voltage V T at the time T of the battery; the terminal The device smoothes according to the smoothed voltage V T-1 at time T-1 and the collected voltage V T to determine the actual compensation voltage at time T; the terminal device uses the actual compensation voltage at time T to compare The collected voltage V T at time T is collected and compensated to obtain a compensated voltage value; the terminal device uses the compensated voltage value and the voltage smoothed value at the previous N times at the T time to perform smoothing After processing, the smooth voltage V T at time T is smoothed , and a relatively accurate smooth voltage can be obtained. In an imaginary high or low scene, the battery power can be accurately calculated based on the obtained smooth voltage, making the displayed power more accurate.
  • the time T can be understood as the current time, and the time T-1 can be understood as the time immediately before the current time.
  • the terminal device stores the smoothing voltage V T-1 smoothing at time T-1 ; wherein, the terminal device smoothes according to the smoothing voltage V T-1 at time T-1 , And the collected voltage V T is collected to determine the actual compensation voltage at time T, including: the terminal device is smoothed according to the smoothed voltage V T-1 at time T-1 , and the collected voltage at time T-1 V T-1 acquisition, calculation time T-1 T-1 V compensation voltage; the terminal voltage V of the smoothing apparatus according to the T-1 T-1 time smoothing, and a collection voltage V T collection, calculation The compensation voltage V T at time T ; the terminal device calculates the difference between the compensation voltage V T at time T and the compensation voltage V T-1 at time T-1 ; the terminal device is based on the absolute value of the difference The relationship between the value and the first threshold determines the actual compensation voltage at the Tth time. Therefore, the terminal device can select the actual compensation voltage based on the first threshold to obtain a compensation voltage that more closely meets the actual demand, thereby compensating the
  • the terminal device determines the actual compensation voltage at the Tth time based on the magnitude relationship between the absolute value of the difference and the first threshold, including: if the absolute value of the difference Greater than the first threshold, the actual compensation voltage at time T is V T ; or, if the absolute value of the difference is less than or equal to the first threshold, the actual compensation voltage at time T is V T- 1 .
  • the first threshold can be understood as the refresh threshold of the actual compensation voltage.
  • the V T-1 V T-1 smooth- V T-1 acquisition
  • the V T V T-1 smooth- V T acquisition ; wherein, the V T and the V T- 1
  • the difference is ⁇ V, if
  • the method further includes: the terminal device acquiring the voltage compensation threshold collected at the collected voltage V T at the Tth time; wherein the terminal device uses the actual at the Tth time
  • the compensation voltage compensates the collected voltage V T at time T , including: if the collected voltage V T at time T meets the voltage compensation threshold, the terminal device uses the The actual compensation voltage compensates the collected voltage V T collected at the Tth time. Therefore, by introducing a voltage compensation threshold, the terminal device can perform the voltage compensation operation only in an appropriate occasion, which can protect the battery and thereby improve the battery life.
  • the collected voltage V T at time T collecting meets the voltage compensation threshold includes any one of the following situations: the voltage compensation threshold is an imaginary high voltage compensation threshold, and the collected voltage at time T V T collection is less than the virtual high voltage compensation threshold; or, the voltage compensation threshold is a virtual low voltage compensation threshold, and the collected voltage V T at time T is greater than the virtual low voltage compensation threshold. Therefore, whether it is a virtual high or virtual low scene, voltage compensation thresholds can be introduced to protect the battery, thereby improving battery life.
  • a device for compensating a battery voltage includes a module for performing the method in the first aspect or any possible implementation manner of the first aspect.
  • a terminal device including the battery voltage compensation device in the second aspect.
  • a computer-readable storage medium has a program that causes a computer to perform any one of the battery voltage compensation methods in the first aspect and its various implementations.
  • a computer program product containing instructions, which when executed on a computer, causes the computer to perform any one of the battery voltage compensation methods in the first aspect and its various implementations.
  • FIG. 1 is an example diagram of a change in the number of battery cells of a terminal in a scenario of battery charging and discharging.
  • FIG. 2 is a schematic structural diagram of a terminal.
  • FIG. 3 is a schematic diagram of the battery voltage detection circuit.
  • FIG. 4 is a schematic flowchart of a battery voltage compensation method according to an embodiment of the present application.
  • FIG. 5 is a flowchart of an example according to an embodiment of the present application.
  • FIG. 6 is a flowchart of calculating an actual compensation voltage according to an embodiment of the present application.
  • FIG. 7 is a flowchart of calculating a smooth voltage according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an example of a linear regression equation of an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another example of the linear regression equation of the embodiment of the present application.
  • FIG. 10 is a schematic diagram of still another example of the linear regression equation of the embodiment of the present application.
  • FIG. 11 is a schematic diagram of a simulation result of an embodiment of the present application.
  • FIG. 12 is an example diagram showing the battery power of the terminal device displayed on the UI interface after applying the method of the embodiment of the present application.
  • FIG. 13 is a schematic block diagram of a battery voltage compensation device according to an embodiment of the present application.
  • FIG. 14 is a schematic structural block diagram of a battery voltage compensation device according to an embodiment of the present application.
  • the technical solutions of the embodiments of the present application may be applied to all devices or equipment including batteries, for example, various types of electronic products (such as terminal devices) containing batteries, electric vehicle battery systems, etc., which are not limited in the embodiments of the present application.
  • the use scenarios related to battery voltage compensation do not need to be individually adapted, and the battery voltage compensation method of the embodiments of the present application can be applied.
  • the embodiments of the present application only use terminal devices as examples for description, but do not limit the protection scope of the embodiments of the present application.
  • the terminal device in the embodiment of the present application may be replaced with other devices or devices including batteries.
  • terminal devices which may be, but not limited to, mobile stations (MS), mobile terminals (Mobile Terminal), mobile phones (Mobile Telephone), mobile phones (handset), and portable devices (portable equipment), etc.
  • a wireless access network for example, Radio Access Network, RAN
  • the terminal in the embodiments of the present application may refer to a terminal (Terminal), user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device , User agent or user device.
  • Terminal devices can also be cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (wireless local loop (WLL) stations, personal digital assistants (personal digital assistants, PDAs), wireless communication Functional handheld devices, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in future 5G networks or public land mobile communication networks (PLMN) in the future evolution
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDAs personal digital assistants
  • wireless communication Functional handheld devices computing devices or other processing devices connected to wireless modems
  • in-vehicle devices wearable devices
  • terminal devices in future 5G networks or public land mobile communication networks (PLMN) in the future evolution
  • PLMN public land mobile communication networks
  • the terminal device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer includes central processing unit (CPU), memory management unit (memory management unit, MMU), and memory (also called main memory) and other hardware.
  • the operating system may be any one or more computer operating systems that implement business processes through processes, for example, a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system.
  • the application layer includes browser, address book, word processing software, instant messaging software and other applications.
  • the embodiment of the present application does not specifically limit the specific structure of the execution body of the method provided in the embodiment of the present application, as long as it can run the program that records the code of the method provided by the embodiment of the present application to provide according to the embodiment of the present application
  • the method may be used for communication.
  • the execution body of the method provided in the embodiments of the present application may be a terminal device, or a functional module in the terminal device that can call a program and execute the program.
  • the term "article of manufacture” as used in this application encompasses a computer program accessible from any computer-readable device, carrier, or medium.
  • the computer-readable medium may include, but is not limited to: magnetic storage devices (for example, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (for example, compact discs (CDs), digital universal discs (digital discs, DVDs)) Etc.), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.).
  • various storage media described herein may represent one or more devices and / or other machine-readable media for storing information.
  • machine-readable medium may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
  • the RF circuit 110 can be used for receiving and sending signals during receiving and sending information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 130; in addition, the designed uplink data is sent to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 110 can also communicate with other devices via a wireless communication network.
  • the wireless communication may use any communication standard or protocol, including but not limited to a global mobile communication system (global system of mobile communication (GSM), 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 (LTE), e-mail, short message service (SMS), etc.).
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • SMS short message service
  • the memory 140 may be used to store software programs and modules.
  • the processor 130 executes various functional applications and data processing of the mobile phone 100 by running the software programs and modules stored in the memory 140.
  • the memory 140 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required by at least one function (such as a sound playback function, an image playback function, etc.), etc .; the storage data area may store Data created according to the use of the mobile phone 100 (such as audio data, phone book, etc.), etc.
  • the memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 150 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 100.
  • the input unit 150 may include a touch panel 151 and other input devices 152.
  • the touch panel 151 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 151 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 151 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 130, and can receive the command sent by the processor 130 and execute it.
  • the touch panel 151 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 150 may also include other input devices 152.
  • other input devices 152 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, and so on.
  • the display unit 160 may be used to display information input by the user or information provided to the user and various menus of the mobile phone 100.
  • the display unit 160 may include a display panel 161, and optionally, the display panel 161 may be configured in the form of LCD, OLED, or the like.
  • the touch panel 151 may cover the display panel 161, and when the touch panel 151 detects a touch operation on or near it, it is transmitted to the processor 130 to determine the type of touch event, and then the processor 130 according to the touch event The type provides corresponding visual output on the display panel 161.
  • the touch panel 151 and the display panel 151 are implemented as two independent components to realize the input and input functions of the mobile phone 100, in some embodiments, the touch panel 151 and the display panel 161 may be integrated And realize the input and output functions of the mobile phone 100.
  • the mobile phone 100 may further include at least one sensor 170, such as a light sensor, a motion sensor, and other sensors.
  • 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 161 according to the brightness of the ambient light, and the proximity sensor may close the display panel 161 and the mobile phone 100 when moving to the ear / Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when at rest, and can be used to identify mobile phone gesture applications (such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tap), etc.
  • other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. can be configured here. Repeat again.
  • the audio circuit 180, the speaker 181, and the microphone 182 may provide an audio interface between the user and the mobile phone 100.
  • the audio circuit 180 may transmit the received electrical signal converted to electrical signals to the speaker 181, which converts the speaker 181 into a sound signal for output; on the other hand, the microphone 182 converts the collected sound signal into an electrical signal, which the audio circuit 180 After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 110 to be sent to another mobile phone, for example, or the audio data is output to the memory 140 for further processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone 100 can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 190. It provides users with wireless broadband Internet access.
  • FIG. 2 shows the WiFi module 190, it can be understood that it is not a necessary component of the mobile phone 100, and can be omitted as needed without changing the scope of the essence of the invention.
  • the processor 130 is the control center of the mobile phone 100, and 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 140, and calling data stored in the memory 140, Perform various functions and process data of the mobile phone 100, thereby realizing various services based on the mobile phone.
  • the processor 130 may include one or more processing units; preferably, the processor 130 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, and application programs, etc.
  • the modem processor mainly handles wireless communication. It can be understood that, the foregoing modem processor may not be integrated into the processor 130.
  • the mobile phone 100 further includes a power supply 120 (such as a battery) for powering various components.
  • a power supply 120 (such as a battery) for powering various components.
  • the power supply may be logically connected to the processor 130 through a power management system, so as to realize functions such as charging, discharging, and power consumption management through the power management system.
  • the mobile phone 100 may also include a camera, a Bluetooth module, and the like.
  • FIG. 3 is a schematic diagram of the battery voltage detection circuit.
  • the voltage detection circuit includes the internal resistance R bat of the battery cell and the internal resistance R bpb of the battery protection board. Among them, one end of the internal resistance R bat of the battery cell is connected to the negative electrode of the DC voltage, and the other end is connected in series with the internal resistance R bpb of the battery protection board.
  • the charging current of the battery is represented by I chg and the discharging current is represented by I dchg .
  • the current continuously flowing through R bat and R bpb in the single-cell scenario is small, so the collected voltage V ADC may be approximately equal to the battery voltage V bat.
  • V bat can be understood as the battery cell voltage or the actual voltage of the battery.
  • V ADC V bat
  • V ADC ⁇ V bat -I dchg ⁇ * (R bat + R bpb ) (1)
  • V ADC ⁇ V bat + I chg ⁇ * (R bat + R bpb ) (2)
  • FIG. 4 shows a schematic flowchart of a battery voltage compensation method 400 according to an embodiment of the present application.
  • the method 400 is applied to a terminal device including a battery.
  • the method 400 includes:
  • the terminal device acquires the collected voltage V T at the Tth moment of the battery.
  • the Tth time is used to indicate the current time. It should be understood that the embodiment of the present application does not limit the value of T.
  • the terminal device can acquire the collected voltage at a certain moment, for example, at the fifth moment, the sixth moment, etc. (the following will describe in detail in conjunction with specific examples).
  • VT acquisition refers to the current voltage value at both ends of the battery.
  • the voltage detection circuit can detect the ADC voltage value at both ends of the battery.
  • the terminal device may periodically collect the voltage values at both ends of the battery, for example, collect the voltage values on the ADC circuit every X seconds.
  • the terminal device smoothes according to the smoothed voltage V T-1 at time T-1 and the collected voltage V T to determine the actual compensation voltage at time T.
  • the T-1th time is used to indicate a time before the current time, that is, a time before the Tth time.
  • the minimum time unit is not limited to 1s, for example, the unit granularity at a specific time may be 1s, may be 0.1s, or even 0.0000001 s, the more digits after the decimal point are obtained, the larger the calculation amount, and the more accurate the calculation result, which is not limited in the embodiments of the present application.
  • the smoothing voltage V T-1 smoothing at the previous moment may be stored in the terminal device in advance in order to calculate the smoothing voltage at the current moment.
  • the actual compensation voltage at time T can be calculated using V T-1 smoothing and the current time T V acquisition , or the actual compensation voltage at time T can be calculated using V T-1 smoothing and the previous one at the current time
  • the V T-1 acquisition at the moment is calculated and not limited.
  • the terminal device uses the actual compensation voltage at the Tth time to compensate the collected voltage V T at the Tth time to obtain a compensated voltage value.
  • the terminal device After obtaining the actual compensation voltage at the Tth time, uses the actual compensation voltage at the Tth time to add the collected voltage V T at the Tth time to acquire the voltage value after the compensation at the Tth time.
  • the actual compensation voltage may be a negative value or a positive value. Whether the value of the actual compensation voltage is positive or negative depends on whether the battery voltage is falsely high or falsely low. For example, if the battery voltage is falsely high, the actual compensation voltage is negative, and if the battery voltage is falsely low, then The actual compensation voltage is positive.
  • the terminal device uses the compensated voltage value and the voltage smoothing value at the Nth time before the Tth time to perform a smoothing process to obtain a smoothed voltage V T smoothing at the Tth time.
  • the terminal device calculates the smoothed voltage V T smoothing at time T may be: using the compensated voltage value at time T and the voltage smoothing value at the previous N times to perform smoothing processing. For example, if the calculation The smoothing voltage V 5 at time 5 is smooth , then the voltage smoothing values V T-1 , V T-2 , V T-3 and V T-4 smoothing at the previous 4 times can be smoothed after the compensation at time 5 The voltage value of is smoothed to obtain the smoothed voltage V 5 smoothed at the fifth time.
  • the smoothed voltage VT smoothed by the method of the embodiment of the present application can be reported to the system, so that the system can make corresponding judgments, such as function triggering, power display, etc., which are not specifically limited.
  • the smoothing voltage V T-1 smoothing at the previous moment is also calculated by the method of the embodiment of the present application, and the method of calculating the smoothing voltage of the embodiment of the present application is iterative calculation.
  • a person skilled in the art can calculate the smooth voltage at any time based on the above method.
  • the battery voltage compensation method of the embodiment of the present application does not need to collect the battery charge and discharge current, that is, there is no need to add a hardware current detection circuit, no coulomb meter, and the cost is relatively low; and, there is no need to model the battery internal resistance, The accuracy is not restricted by the ambient temperature, battery loss, and charge and discharge current, and the accuracy is relatively high.
  • the battery voltage compensation method of the embodiment of the present application does not need to write the voltage drop of each module for different products when calculating the compensation voltage, thereby reducing the workload of modeling.
  • FIG. 5 shows a flowchart of an example of a battery voltage compensation method according to an embodiment of the present application. As shown in Figure 5, it includes:
  • A can be pre-configured based on actual needs, for example, it can be implemented by setting a timer, which is not limited.
  • A can represent absolute time or relative time, which is not limited. It should also be understood that the time unit of A is not specifically limited here. For example, A may be characterized by time units such as hours (h), minutes (min), or seconds (s).
  • step 502 If it reaches A, skip to step 502 to start collecting the voltage across the battery; if it does not reach A, continue to wait.
  • the voltage value at both ends of the battery can be collected by the ADC circuit. It should be understood that due to the presence of the battery protection board and internal resistance, the voltage collected here is not the actual voltage of the battery, and the voltage that determines the actual amount of battery power is the voltage value across the cell.
  • the actual compensation voltage at the Tth time can be calculated by V T-1 smoothing and V T acquisition at the current time, or the Tth time can be calculated by V T-1 smoothing and V T-1 acquisition at the previous time at the current time
  • the actual compensation voltage at the moment is not limited.
  • the compensated voltage value can be obtained.
  • 505 Perform smoothing processing with the first N voltage smoothing values.
  • S420 includes:
  • the smoothing voltage V T-1 at time T-1 is smoothed , and the collected voltage V T-1 at time T-1 is collected to calculate the compensation voltage V T-1 at time T-1 ;
  • the actual compensation voltage at time T is V T ;
  • the actual compensation voltage at time T is V T-1 .
  • the above first threshold can be understood as the refresh threshold of the actual compensation voltage. Based on the first threshold, it can be determined whether the current compensation voltage needs to be refreshed.
  • V T-1 smoothing- V T acquisition V T (3)
  • V T-1 smoothing- V T-1 acquisition V T-1 (4)
  • V T -V T-1 ⁇ V (5)
  • the current compensation voltage is V T ;
  • the current compensation voltage is V T-1 .
  • the actual compensation voltage at time T can be obtained.
  • the first threshold of the embodiment of the present application can be flexibly selected based on actual requirements. Based on the above first threshold, the battery voltage compensation method of the embodiment of the present application has high accuracy and controllability.
  • the embodiment of the present application may also introduce a compensation threshold of the actual compensation voltage at time T to select the supplementary voltage. If the actual compensation voltage at time T meets the compensation threshold, the actual compensation voltage will be used to compensate the collected voltage; if not, the compensation threshold will be used to compensate the collected voltage.
  • the compensation threshold is the maximum imaginary high compensation threshold. If the actual compensation voltage at the Tth time exceeds the maximum virtual height compensation threshold, the maximum virtual height compensation threshold is used for voltage compensation; if not, the actual compensation voltage is used for voltage compensation.
  • the purpose of setting the maximum virtual height compensation threshold here is: for specific products, the general battery internal resistance and the maximum charging current are determined, so the maximum virtual height can also be roughly determined, in order to prevent the special virtual height under abnormal conditions, Such as the electrostatic discharge (ESD) of the ADC collection port, the instantaneous high voltage when the non-standard charger is inserted, etc., so that the virtual high value is higher than the maximum virtual height under normal conditions, then this type needs to be avoided Is abnormal, so according to the design of the whole machine, the maximum virtual height compensation threshold is set. When the virtual height compensation value is greater than this value, the compensation value takes this value.
  • ESD electrostatic discharge
  • the compensation threshold is the maximum virtual low compensation threshold. If the actual compensation voltage at time T is a virtual low compensation voltage, the compensation threshold is the maximum virtual low compensation threshold. If the actual compensation voltage at time T exceeds the maximum virtual low compensation threshold, the maximum virtual low compensation threshold is used for voltage compensation; if not, the actual compensation voltage is used for voltage compensation.
  • the purpose of setting the maximum virtual low compensation threshold here is that: for specific products, the general battery internal resistance and the maximum discharge current are determined, so the maximum virtual low can also be roughly determined. In order to prevent special virtual lows under abnormal conditions, Such as the direct current drawn by the load, etc., this type of abnormality needs to be avoided at this time, so the maximum virtual low compensation threshold is set according to the design of the whole machine. When the virtual low compensation value is greater than this value, the compensation value takes this value.
  • the battery can be protected from excessive voltage or low voltage, which can damage the use of the battery or affect the life of the battery.
  • S440 includes:
  • the smoothed voltage V T smoothing at time T is calculated using the linear regression equation.
  • FIG. 7 is an exemplary flowchart of a method of calculating a smooth voltage.
  • the method described above may be used to obtain the compensated voltage value at time T, which will not be repeated here.
  • the least square method is used to obtain the slope ⁇ and the intercept ⁇ .
  • the first time T can be smoothly smoothed voltage V T, V T and the smooth voltage smoothing reported to the system.
  • the method 400 further includes:
  • S430 includes:
  • the terminal device may determine whether the collected voltage meets the voltage compensation threshold. If the collected voltage meets the voltage compensation threshold, the actual compensated voltage is used to compensate the collected voltage; if it is not satisfied, no compensation is made. Specifically, when the battery of the terminal device is charged or discharged, if the collected voltage value jumps and the collected voltage value exceeds the set voltage threshold, the collected voltage can be compensated. Optionally, the collected voltage change can also be detected here. If the voltage change exceeds the set voltage change threshold, the collected voltage can also be compensated, which is not limited.
  • the harvested voltage V T of the first acquired time T satisfies the threshold voltage compensation comprises any one of the following situations:
  • the voltage compensation threshold is an imaginary high voltage compensation threshold, and the collected voltage V T at time T is less than the imaginary high voltage compensation threshold; or,
  • the voltage compensation threshold is a virtual low voltage compensation threshold, and the collected voltage V T at time T is greater than the virtual low voltage compensation threshold.
  • the acquisition voltage V T acquisition is less than the virtual high voltage compensation threshold, voltage compensation is performed; if the acquisition voltage V T acquisition is greater than or equal to the virtual high voltage compensation threshold, voltage compensation is not performed.
  • the purpose of setting the virtual high voltage compensation threshold is: if during charging, the single acquisition value is greater than the full voltage of the battery due to the existence of the virtual high, and this scenario is similar to the case where the overvoltage battery is inserted into the single disk, so for safety Consider that in this case, the false height compensation is no longer performed, that is, the compensation value is 0.
  • the system believes that after the ADC acquisition voltage exceeds the imaginary high voltage compensation threshold, the board is almost fully charged. At this time, constant voltage charging is used due to the characteristics of the battery, and the current is getting smaller and smaller, and compensation is not required. In this way, it is beneficial to protect the battery and improve the life of the battery.
  • the acquisition voltage V T acquisition is greater than the virtual low voltage compensation threshold, voltage compensation is performed; if the acquisition voltage V T acquisition is less than or equal to the virtual low voltage compensation threshold, voltage compensation is not performed.
  • the purpose of setting the virtual low voltage compensation threshold is: if during the discharge process, the single acquisition value is lower than the cut-off discharge voltage of the battery due to the existence of the virtual low, and this scenario is similar to the case of the undervoltage battery inserted into the single disk, so in order to For battery life and safety considerations, in this case, false low compensation is no longer performed, that is, the compensation value is 0.
  • the system can assume that after the ADC acquisition voltage exceeds the virtual low voltage compensation threshold, the battery is exhausted. In this way, the introduction of a virtual low voltage compensation threshold is beneficial to protect the battery and improve the battery life.
  • the corresponding linear regression equation can be calculated every time. The following will describe it with reference to specific examples.
  • time T is the time when the system is just turned on, at this time the internal system is in the loading state, at this time do a preprocessing, if the time is zero Or negative value, the voltage is equal to the first time, and the compensation value is 0.
  • the collected voltage V 1 is collected as 3800mV. Since the last time is 0 time, the smoothed value smoothed voltage V 0 in the last time is smoothed to 3800mV.
  • the collected voltage V 5 is collected as 3800mV
  • the compensation value is 0mV
  • the value substituted into the linear regression equation at the current time is (32,3846), that is, at the 32nd time, the expected
  • the smoothed value is 3846mV, plus the voltage smoothed values (28,3839) (29,3841) (30,3843) (31,3846) reported in the previous 4 moments, and the substitution has a slope of 1.9 and an intercept of 3786.
  • the influence of the first N data needs to be considered, so linear regression is used to predict, which is more accurate than direct reporting.
  • the actual voltage of the battery is 3846.5
  • the reported voltage obtained by using the voltage compensation method of the battery of the embodiment of the present application is 3846.8.
  • the accuracy of the reported voltage obtained by using the battery voltage compensation method of the embodiment of the present application is 0.3 mV. If the voltage 3846 is directly reported, the accuracy of the directly reported voltage relative to the real voltage (3846.5) is 0.5mV. It can be seen that the reporting voltage obtained by using the battery voltage compensation method of the embodiment of the present application is reported, which is 0.2mV higher than the reporting accuracy of directly reporting the voltage (ie, the expected smoothed value).
  • simulation data of the collected points in FIG. 11 may correspond to the respective linear regression equations in FIGS. 8 to 10 above. It should be understood that each collection point in FIG. 11 can be understood as a moment.
  • the refresh threshold of the compensation value is 35mV as an example.
  • the value substituted into the linear regression equation at the current time is (32,3846), that is, at time 32
  • the smoothed value is 3846mV, plus the voltage smoothed values (28,3839) (29,3841) (30,3843) (31,3846) reported in the previous 4 moments, and the substitution has a slope of 1.9 and an intercept of 3786.
  • FIGS. 8 to 11 are only for the convenience of those skilled in the art to understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the illustrated specific scenarios. Those skilled in the art can obviously make various equivalent modifications or changes based on the examples of FIGS. 8 to 11, and such modifications or changes also fall within the scope of the embodiments of the present application.
  • whether to compensate the battery voltage may be used as an optional voltage compensation function (for example, a virtual power compensation function) of the terminal device.
  • the user can choose to turn this feature on or off.
  • the battery voltage compensation method of the present application can be used for compensation, then the power displayed on the interface of the terminal device is the compensated battery voltage; if the user chooses to turn off the voltage compensation, then the The power displayed on the interface of the terminal device is the battery voltage that is not compensated by the compensation method of the embodiment of the present application.
  • the user interface (UI) of the mobile phone in FIG. 12 as an example, in a scenario where the battery voltage is discharged, the mobile phone may have a virtual low situation.
  • the battery power of the mobile phone is shown in the left figure in Figure 12 (the power display is 1 grid); if the user has turned on the virtual power compensation function, the embodiment of this application After the battery voltage compensation method compensates the virtual power, then the battery power of the mobile phone at this time is shown in the right figure in FIG. 12 (the power is displayed as 2 grids). It can be seen that, after the virtual power is compensated by using the battery voltage compensation method of the embodiment of the present application, the battery power display can be made more accurate. It should be understood that the interface in FIG. 12 is only used as an example for schematic description, and it is not intended to limit the embodiment of the present application to FIG. 12, which is not specifically limited in the embodiment of the present application.
  • the battery voltage compensation method according to an embodiment of the present application is described in detail above with reference to FIGS. 1 to 12.
  • the battery voltage compensation device according to an embodiment of the present application will be described below with reference to FIGS. 13 and 14. It should be understood that the technical features described in the method embodiments are also applicable to the following device embodiments.
  • FIG. 13 shows a schematic block diagram of a battery voltage compensation device 1300 according to an embodiment of the present application.
  • the device 1300 is applied to a terminal device including a battery.
  • the device 1300 includes:
  • the obtaining module 1310 is configured to obtain the collected voltage VT collection at the Tth moment of the battery
  • the determining module 1320 is configured to smooth the smoothed voltage V T-1 at the time T-1 and the collected voltage V T to determine the actual compensation voltage at the T time;
  • the compensation module 1330 is configured to use the actual compensation voltage at the Tth time to compensate the collected voltage V T at the Tth time to obtain a compensated voltage value;
  • the processing module 1340 is configured to perform smoothing using the compensated voltage value and the voltage smoothing value at the Nth time before the Tth time to obtain the smoothed voltage V T smoothing at the Tth time.
  • the terminal device stores the smoothed voltage V T-1 smoothed at time T-1 ;
  • the determining module 1320 is used for smoothing according to the smoothing voltage V T-1 at the time T-1 and the collection voltage V T collection to determine the actual compensation voltage at the time T, which specifically includes:
  • the smoothing voltage V T-1 at time T-1 is smoothed , and the collected voltage V T-1 at time T-1 is collected to calculate the compensation voltage V T-1 at time T-1 ;
  • the actual compensation voltage at the Tth time is determined.
  • the determining module 1320 is configured to determine the actual compensation voltage at the Tth time based on the magnitude relationship between the absolute value of the difference and the first threshold, specifically including:
  • the actual compensation voltage at time T is V T ;
  • the actual compensation voltage at time T is V T-1 .
  • V T-1 V T-1 smoothing- V T-1 acquisition
  • V T V T-1 smoothing- V T acquisition
  • V T V T-1 smoothing- V T acquisition
  • the actual compensation voltage at time T is the V T
  • the actual compensation voltage at time T is Describe V T-1 .
  • the processing module 1340 is configured to perform smoothing processing using the compensated voltage value and voltage smoothing values at the previous N times at the current time, specifically including:
  • V ⁇ t + ⁇ is obtained, V means voltage, t means time, ⁇ means slope, and ⁇ intercept;
  • the smoothed voltage V T smoothing at time T is calculated using the linear regression equation.
  • the obtaining module 1310 is further used to:
  • the compensation module 1330 is configured to use the actual compensation voltage at the Tth time to compensate the collected voltage V T at the Tth time, which specifically includes:
  • the collection of the collected voltage V T at the time T meets the voltage compensation threshold includes any one of the following situations:
  • the voltage compensation threshold is an imaginary high voltage compensation threshold, and the collected voltage V T at time T is less than the imaginary high voltage compensation threshold; or,
  • the voltage compensation threshold is a virtual low voltage compensation threshold, and the collected voltage V T at time T is greater than the virtual low voltage compensation threshold.
  • the device 1300 may be used to perform the methods of the foregoing method embodiments, for example, the method in FIG. 4, and the above and other management operations and / or functions of each module in the device 1300 are to implement the foregoing
  • the corresponding steps of the method of the method embodiment can therefore also achieve the beneficial effects in the foregoing method embodiment, and for the sake of brevity, they will not be repeated here.
  • each module in the foregoing device 1300 may be implemented in the form of software and / or hardware, which is not specifically limited.
  • the device 1300 is presented in the form of functional modules.
  • the “module” here may refer to an application-specific integrated circuit ASIC, a circuit, a processor and memory that execute one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above-mentioned functions.
  • ASIC application-specific integrated circuit
  • the device 1300 may adopt the form shown in FIG. 14.
  • the acquisition module 1310, the determination module 1320, the compensation module 1330, and the processing module 1340 may be implemented by the processor 1430 shown in FIG.
  • the processor is implemented by executing the computer program stored in the memory.
  • the functions and / or implementation processes of the transceiver involved in the device 1300 may also be implemented through pins or interface circuits.
  • the memory is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit may also be a storage unit in the computer device located outside the chip, as shown in FIG. 14 1440.
  • FIG. 14 shows a schematic structural diagram of a battery voltage compensation device 1400 according to an embodiment of the present application. As shown in FIG. 14, the device 1400 includes:
  • the battery body 1410; the sensor 1420 is used to detect parameters of the battery body 1410, and the parameters include: voltage data of the battery body 410. It should be understood that the sensor 1420 may be optional.
  • a processor 1430 which can be connected to the sensor 1420 in communication, so as to be able to obtain voltage data from the sensor 1430;
  • the memory 1440 is used to store instructions, and the processor 1430 is used to execute instructions stored in the memory 1440.
  • the processor 1430 may acquire the collected voltage V T at the Tth moment of the battery through the sensor 1420.
  • the processor 1430 is configured to perform the following steps: smoothing according to the smoothing voltage V T-1 at time T-1 , and collecting the collected voltage V T to determine the value at time T the actual compensation voltage; compensation voltage using the first actual time T collect voltage V T of the first acquired time T is compensated to obtain a compensation voltage value; using the voltage value and the second compensation time T The voltage smoothing value at the first N times of is smoothed to obtain the smoothed voltage VT smoothing at time T.
  • the device 1400 stores the smoothing voltage V T-1 smoothing at time T-1 ;
  • said processor 1430 according to a first smoothed voltage V T-1 T-1 time smoothing, and the collected voltage V T acquisition, to determine the actual offset voltage of the time T, comprises:
  • the smoothing voltage V T-1 at time T-1 is smoothed , and the collected voltage V T-1 at time T-1 is collected to calculate the compensation voltage V T-1 at time T-1 ;
  • the terminal device calculates the difference between the compensation voltage V T at time T and the compensation voltage V T-1 at time T-1 ;
  • the actual compensation voltage at the Tth time is determined.
  • the processor 1430 determines the actual compensation voltage at the Tth time based on the magnitude relationship between the absolute value of the difference and the first threshold, specifically including:
  • the actual compensation voltage at time T is V T ;
  • the actual compensation voltage at time T is V T-1 .
  • V T-1 V T-1 smoothing- V T-1 acquisition
  • V T V T-1 smoothing- V T acquisition
  • V T V T-1 smoothing- V T acquisition
  • the actual compensation voltage at time T is the V T
  • the actual compensation voltage at time T is Describe V T-1 .
  • the processor 1430 performs smoothing processing using the compensated voltage value and the voltage smoothing value of the previous N times at the current time, specifically including:
  • the smoothed voltage V T smoothing at time T is calculated using the linear regression equation.
  • the processor 1430 is further configured to obtain the voltage compensation threshold collected by the collected voltage V T at the Tth time;
  • the processor 1430 uses the actual compensation voltage at the Tth time to compensate the collected voltage V T at the Tth time, specifically including:
  • the acquisition of the voltage V T of the first acquired time T satisfies the threshold voltage compensation comprises any one of the following situations:
  • the voltage compensation threshold is an imaginary high voltage compensation threshold, and the collected voltage V T at time T is less than the imaginary high voltage compensation threshold; or,
  • the voltage compensation threshold is a virtual low voltage compensation threshold, and the collected voltage V T at time T is greater than the virtual low voltage compensation threshold.
  • the apparatus 1400 may be used to perform the methods of the foregoing method embodiments, for example, the method in FIG. 4, and the above and other management operations and / or functions of each module in the apparatus 1400 are to implement the foregoing
  • the corresponding steps of the method of the method embodiment can therefore also achieve the beneficial effects in the foregoing method embodiment, and for the sake of brevity, they will not be repeated here.
  • the foregoing device 1300 or device 1400 may be a terminal device.
  • the processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the foregoing method embodiment may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the aforementioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an existing programmable gate array (FPGA), or other available Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA existing programmable gate array
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied and executed by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, and registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically Erasable programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (random access memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • synchronous RAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • double data SDRAM double data SDRAM
  • DDR SDRAM enhanced synchronous dynamic random access memory
  • ESDRAM synchronous connection dynamic random access memory
  • direct RAMbus RAM direct RAMbus RAM
  • system and “network” are often used interchangeably herein.
  • the term “and / or” in this article is just an association relationship that describes an associated object, indicating that there can be three relationships, for example, A and / or B, which can mean: A exists alone, A and B exist at the same time, exist alone B these three cases.
  • the character "/" in this article generally indicates that the related objects before and after are in an "or” relationship.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B based on A does not mean determining B based on A alone, and B may also be determined based on A and / or other information.
  • the computer program product may include one or more computer instructions.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server or data center Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including a server, a data center, and the like integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic disk), an optical medium (for example, a DVD), or a semiconductor medium (for example, solid state disk (SSD)) or the like.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be 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.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

本申请提供了一种电池电压的补偿方法、装置和终端设备,不需要采集电池的充放电电流,而是通过计算平滑电压,从而准确地计算出电池电量。在虚高或需低场景下,基于得到的平滑电压能够准确地计算出电池电量,使得显示的电量更准确。该方法应用于包括电池的终端设备,该方法包括:终端设备获取电池的第T时刻的采集电压V T采集;终端设备根据第T-1时刻的平滑电压V T-1平滑,以及采集电压V T采集,确定第T时刻的实际补偿电压;终端设备使用第T时刻的实际补偿电压对第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;终端设备使用所述补偿后的电压值与第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑。

Description

电池电压的补偿方法、装置和终端设备 技术领域
本申请涉及电池技术领域,并且更具体地,涉及一种电池电压的补偿方法、装置和终端设备。
背景技术
对于终端产品来说,通常采用模数转换器(analog-to-digital converter,ADC)对电池两端的电压直接进行采集。在电池在充电或放电的过程中,电池电量的显示是不够准确的,可能呈现虚低或虚高的情形。图1示出了在电池充放电的场景下电池格数变化的一个示例图。如图1中的上图所示,终端在待机时电量显示为3格,对外放电时电量显示为1格,再次回到待机状态时电量显示为3格。如图1中的下图所示,终端在待机时电量显示为1格,对电池充电时电量显示为3格,再次回到待机状态时电量显示为1格。
对此,现有技术的解决方案是通过对电池内阻建模的方式或增加电流检测电路的方式,对采集的电压进行补偿。其中,电池内阻受电池类型、环境温度、当前电压、电池充放电循环次数等关键因素的影响,如果要获得精确的剩余电量值,会导致建模条件困难,异常复杂,且任一条件变化时的调用逻辑复杂。另外,增加电流检测电路进行补偿的方式,会导致产品成本增加。
发明内容
本申请提供一种电池电压的补偿方法、装置和终端设备,不需要采集电池的充放电电流,而是通过计算平滑电压,从而准确地计算出电池电量。
第一方面,提供了一种电池电压的补偿方法,所述方法应用于包括电池的终端设备,所述方法包括:所述终端设备获取电池的第T时刻的采集电压V T采集;所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压;所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;所述终端设备使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑,能够得到较为准确的平滑电压,在虚高或需低场景下,基于得到的平滑电压能够准确地计算出电池电量,使得显示的电量更准确。
其中,第T时刻可以理解为当前时刻,第T-1时刻可以理解为当前时刻的前一时刻。
在一种可能的实现方式中,所述终端设备中存储有第T-1时刻的平滑电压V T-1平滑;其中,所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压,包括:所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1采集,计算第T-1时刻的补偿电压V T-1;所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压 V T;所述终端设备计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;所述终端设备基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压。因此,终端设备可以基于第一门限选择实际补偿电压,得到更符合实际需求的补偿电压,从而对电池进行补偿。
在一种可能的实现方式中,所述终端设备基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压,包括:若所述差值的绝对值大于所述第一门限,则第T时刻的实际补偿电压为V T;或,若所述差值的绝对值小于或等于所述第一门限,则第T时刻的实际补偿电压为V T-1。其中,第一门限可以理解为实际补偿电压的刷新门限。
可选地,所述V T-1=V T-1平滑-V T-1采集,所述V T=V T-1平滑-V T采集;其中,所述V T与所述V T-1差值为△V,若|△V|大于所述第一门限,则第T时刻的实际补偿电压为所述V T,若|△V|小于或等于所述第一门限,则第T时刻的实际补偿电压为所述V T-1
可选地,所述终端设备使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,进行平滑处理,包括:所述终端设备基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。因此,终端设备通过线性回归方式能够更准确得计算某时刻的平滑电压值。
在一种可能的实现方式中,所述方法还包括:所述终端设备获取所述第T时刻的采集电压V T采集的电压补偿门限;其中,所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,包括:若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。因此,通过引入电压补偿门限,使得终端设备可以在合适的场合下才执行电压补偿操作,能够保护电池,从而提高电池寿命。
可选地,所述第T时刻的采集电压V T采集满足所述电压补偿门限包括以下情形中的任一项:所述电压补偿门限是虚高电压补偿门限,所述第T时刻的采集电压V T采集小于所述虚高电压补偿门限;或者,所述电压补偿门限是虚低电压补偿门限,所述第T时刻的采集电压V T采集大于所述虚低电压补偿门限。因此,不论是虚高或虚低场景,均可以引入电压补偿门限,能够保护电池,从而提高电池寿命。
第二方面,提供了一种电池电压的补偿装置,该装置包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的模块。
第三方面,提供了一种终端设备,该终端设备包括第二方面中的电池电压的补偿装置。
第四方面,提供了一种计算机可读存储介质,该计算机可读存储介质中有程序,该程序使得计算机执行上述第一方面及其各种实现方式中任一种电池电压的补偿方法。
第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面及其各种实现方式中任一种电池电压的补偿方法。
附图说明
图1是终端在电池充放电的场景下电池格数变化的一个示例图。
图2是终端的一个结构示意图。
图3是电池的电压检测电路的一个示意图。
图4是根据本申请实施例的电池电压的补偿方法的示意性流程图。
图5是根据本申请实施例的一个例子的流程图。
图6是本申请实施例计算实际补偿电压的一个流程图。
图7是本申请实施例计算平滑电压的一个流程图。
图8是本申请实施例的线性回归方程的一个例子的示意图。
图9是本申请实施例的线性回归方程的另一个例子的示意图。
图10是本申请实施例的线性回归方程的再一个例子的示意图。
图11是本申请实施例的一个仿真结果的示意图。
图12是应用本申请实施例方法后终端设备的电池电量在UI界面显示的一个示例图。
图13是根据本申请实施例的电池电压的补偿装置的示意性框图。
图14是根据本申请实施例的电池电压的补偿装置的示意性结构框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请实施例的技术方案可以应用于所有包括电池的装置或设备,比如,包含电池的各类电子产品(比如终端设备)、电动车电池系统等,本申请实施例对此不作限定。也就是说,涉及到电池电压补偿的使用场景,无需单独适配,均可以应用本申请实施例的电池电压的补偿方法。为了便于描述,本申请实施例仅以终端设备为例进行描述,但并不对本申请实施例的保护范围构成限定。本申请实施例的终端设备可以替换为其他包括电池的装置或设备。
本申请实施例的技术方案可以应用于终端设备,终端设备可以是但不限于移动台(Mobile Station,MS)、移动终端(Mobile Terminal)、移动电话(Mobile Telephone)、手机(handset)及便携设备(portable equipment)等,可以经无线接入网(例如,Radio Access Network,RAN)与一个或多个核心网进行通信。本申请实施例中的终端可以指终端(Terminal)、用户设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。终端设备还可以是蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,未来5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请实施例对此并不限定。
在本申请实施例中,终端设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。并且,本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构特别限定,只要能够通过运行记录有本申请实施例的提供的方法的代码的程序,以根据本申请实施例提供的方法进行 通信即可,例如,本申请实施例提供的方法的执行主体可以是终端设备,或者,是终端设备中能够调用程序并执行程序的功能模块。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
下面结合图2对手机100的各个构成部件进行具体的介绍:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器130处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件、短消息服务(short messaging service,SMS)等。
存储器140可用于存储软件程序以及模块,处理器130通过运行存储在存储器140的软件程序以及模块,从而执行手机100的各种功能应用以及数据处理。存储器140可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据手机100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器140可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元150可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元150可包括触控面板151以及其他输入设备152。触控面板151,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板151上或在触控面板151附近的操作),并根据预先设定的程式驱动相应的连接装置。可选地,触控面板151可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器130,并能接收处理器130发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板151。除了触控面板151,输入单元150还可以包括其他输入设备152。具体地,其他输入设备152可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元160可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。显示单元160可包括显示面板161,可选地,可以采用LCD、OLED等形式来配置显示面板161。进一步地,触控面板151可覆盖显示面板161,当触控面板151检测到在其上或附近的触摸操作后,传送给处理器130以确定触摸事件的类型,随后处理器130根据触摸事件的类型在显示面板161上提供相应的视觉输出。虽然在图2中,触控面板151与显示面板151是作为两个独立的部件来实现手机100的输入和输入功能,但是在某些实施例中,可以将触控面板151与显示面板161集成而实现手机100的输入和输出功能。
手机100还可包括至少一种传感器170,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板161的亮度,接近传感器可在手机100移动到耳边时,关闭显示面板161和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路180、扬声器181,麦克风182可提供用户与手机100之间的音频接口。音频电路180可将接收到的音频数据转换后的电信号,传输到扬声器181,由扬声器181转换为声音信号输出;另一方面,麦克风182将收集的声音信号转换为电信号,由音频电路180接收后转换为音频数据,再将音频数据输出至RF电路110以发送给比如另一手机,或者将音频数据输出至存储器140以便进一步处理。
WiFi属于短距离无线传输技术,手机100通过WiFi模块190可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图2示出了WiFi模块190,但是可以理解的是,其并不属于手机100的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器130是手机100的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器140内的软件程序和/或模块,以及调用存储在存储器140内的数据,执行手机100的各种功能和处理数据,从而实现基于手机的多种业务。可选地,处理器130可包括一个或多个处理单元;优选的,处理器130可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器130中。
手机100还包括给各个部件供电的电源120(比如电池),优选的,电源可以通过电源管理系统与处理器130逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。
尽管未示出,手机100还可以包括摄像头、蓝牙模块等。
图3是电池的电压检测电路的一个示意图。如图3所示,该电压检测电路包括电池电芯内阻R bat,电池保护板内阻R bpb。其中,电池电芯内阻R bat的一端与直流电压的负极相连,另一端与电池保护板内阻R bpb串联。其中,电池的充电电流用I chg表示,放电电流用I dchg表示。对于图3中的电压检测电路,单电池场景下持续流经R bat、R bpb的电流较小,因此采集电压V ADC可约等于电池电压V bat。其中,V bat可以理解为电池电芯电压或电池的 真实电压。
在电池对外放电的场景下,V ADC与V bat的关系如下式(1)所示:
V ADC↑=V bat-I dchg↓*(R bat+R bpb)                      (1)
对外放电输出的电流I dchg越大V ADC虚低越严重(例如,终端产品对外放电1A时电压跌落在200-400mV左右),因此电池的格数跳变也越大。
在电池充电(比如,可通过通用串行总线(universal serial bus,USB)、交流电源(alternating current,AC)、无线充电器等方式对单板进行充电)的场景下,V ADC与V bat的关系如下式(2)所示:
V ADC↑=V bat+I chg↑*(R bat+R bpb)                          (2)
对内充电的电流I chg越大V ADC虚高越严重(例如,终端产品对内充电2A时电压升高在200-400mV左右),因此电池的格数跳变也越大。
图4示出了根据本申请实施例的电池电压的补偿方法400的示意性流程图。所述方法400应用于包括电池的终端设备,所述方法400包括:
S410,所述终端设备获取电池的第T时刻的采集电压V T采集
其中,所述第T时刻用于表示当前时刻。应理解,本申请实施例对T的取值不作限定。终端设备可以获取某一时刻的采集电压,比如,第5时刻,第6时刻,…等等(下文会结合具体的例子详细描述)。
V T采集是指电池正负极两端的当前时刻的电压值。在具体实现时,可通过电压检测电路检测电池两端的ADC电压值。
可选地,所述终端设备可以定时采集电池两端的电压值,比如,每隔X秒采集ADC电路上的电压值。
S420,所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压。
所述第T-1时刻用于表示当前时刻的前一时刻,即第T时刻的前一时刻。应理解,第T-1时刻中用于指示所述第T时刻的上一时刻,并非限定最小时间单位必须是1s,比如,具体时刻的单位粒度可以是1s,可以是0.1s,甚至是0.0000001s,小数点后的位数取得越多,计算量越大,计算结果越精确,本申请实施例对此不作限定。
可选地,前一时刻的平滑电压V T-1平滑可以预先存储在终端设备,以便计算当前时刻的平滑电压时使用。
可选地,第T时刻的实际补偿电压可以采用V T-1平滑与当前时刻的V T采集进行计算,或者,第T时刻的实际补偿电压可以采用V T-1平滑与当前时刻的上一时刻的V T-1采集进行计算,对此不作限定。
S430,所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值。
终端设备在得到第T时刻的实际补偿电压后,使用第T时刻的实际补偿电压加上第T时刻的采集电压V T采集,得到第T时刻补偿后的电压值。
其中,所述实际补偿电压可以是负值,也可以正值。所述实际补偿电压的取值的正负与否取决于电池电压是虚高还是虚低,比如,如果电池电压虚高,则所述实际补偿电压为 负值,如果电池电压虚低,则所述实际补偿电压为正值。
S440,所述终端设备使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑
示例性的,终端设备计算第T时刻的平滑电压V T平滑的方式可以是:使用第T时刻的补偿后的电压值以及前N个时刻的电压平滑值,进行平滑处理,例如,若计算第5时刻的平滑电压V 5平滑,那么可以对前4个时刻的电压平滑值V T-1平滑,V T-2平滑,V T-3平滑,V T-4平滑与第5时刻的补偿后的电压值,进行平滑处理,得到第5时刻的平滑电压V 5平滑
这里,通过本申请实施例的方法得到的平滑电压V T平滑可以上报给系统,使得系统进行相应的判定,比如,功能的触发、电量显示等用途,对此不作具体限定。
应理解,前一时刻的平滑电压V T-1平滑也是采用本申请实施例的方法计算得到的,本申请实施例的计算平滑电压的方式是迭代运算。本领域技术人员基于上述方法能够计算任一时刻的平滑电压。
本申请实施例的电池电压的补偿方法,不需要采集电池的充放电电流,即无需增加硬件电流检测电路,无需库仑计,成本比较低;并且,也不需要对电池内阻进行建模,因此精度不受环境温度、电池损耗、充放电电流的制约,精确度比较高。另外,本申请实施例的电池电压的补偿方法在计算补偿电压时,无需针对不同产品写入各模块的压降,从而减少建模的工作量。
这里结合图5中的例子进行说明。图5示出了根据本申请实施例的电池电压的补偿方法的一个例子的流程图。如图5所示,包括:
501,判断是否达到采集电池电压的时间A。其中,A可以基于实际需要预先配置,比如可以通过设置定时器的方式实现,对此不作限定。
可选地,A可以表示绝对时间,也可以是相对时间,对此不作限定。还应理解,这里对A的时间单位不作具体限定,比如,A可通过时(h)、分(min)或秒(s)等时间单位表征。
若达到A,则跳至步骤502,开始采集电池两端的电压;若未达到A,则继续等待。
502,采集ADC端电压V T采集
这里,可以通过ADC电路采集电池正负极两端的电压值。应理解,由于电池保护板和内部电阻的存在,这里采集的电压并非电池实际的电压,决定电池实际电量的电压为电芯两端的电压值。
503,计算实际补偿电压。
这里,可以通过V T-1平滑与当前时刻的V T采集计算第T时刻的实际补偿电压,或者,可以通过V T-1平滑与当前时刻的上一时刻的V T-1采集计算第T时刻的实际补偿电压,对此不作限定。
504,计算补偿后的电压值。
具体即,使用采集到的电压值加上实际补偿电压,即可得到补偿后的电压值。
505,与前N个电压平滑值进行平滑处理。
506,向系统上报电压平滑值。
应理解,图5中涉及到的术语、概念或具体计算方法可以参见前文的介绍,为了简洁,这里不再赘述。
下面将描述第T时刻的实际补偿电压的获取方式。
可选地,S420包括:
根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1采集,计算第T-1时刻的补偿电压V T-1
根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压V T
计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;
若所述差值的绝对值大于第一门限,则第T时刻的实际补偿电压为V T;或,
若所述差值的绝对值小于或等于所述第一门限,则第T时刻的实际补偿电压为V T-1
上述第一门限可以理解为实际补偿电压的刷新门限。基于第一门限,可以判断当前的补偿电压是否需要刷新。
下面结合图6中的流程图描述实际补偿电压的计算方式。
601,计算当前时刻(比如第T时刻)的补偿电压。可通过下式(3)计算:
V T-1平滑-V T采集=V T                                (3)
602,获取当前时刻的上一时刻(比如第T-1时刻)的补偿电压。可通过下式(4)计算:
V T-1平滑-V T-1采集=V T-1                          (4)
603,计算第T时刻的补偿电压和第T-1时刻的补偿电压的差值。如下式(5)所示:
V T-V T-1=△V                         (5)
604,判断是否需要刷新补偿电压。
具体地,如果△V的绝对值大于第一门限X毫伏(mV),则当前时刻的补偿电压为V T
如果△V的绝对值小于或等于第一门限X毫伏(mV),则当前时刻的补偿电压为V T-1
因此,基于图6中的例子,可以得到第T时刻的实际补偿电压。
需要说明的是,本申请实施例的第一门限可以基于实际需求灵活选取。基于上述第一门限,本申请实施例的电池电压的补偿方法精度较高且可控。
可选地,本申请实施例还可以引入第T时刻的实际补偿电压的补偿门限,以选择补充电压。如果第T时刻的实际补偿电压满足补偿门限,才会使用实际补偿电压对采集电压进行补偿;如果不满足,则使用补偿门限对采集电压进行补偿。
示例性的,若第T时刻的实际补偿电压是虚高补偿电压,那么补偿门限是最大虚高补偿门限。如果第T时刻的实际补偿电压超出了该最大虚高补偿门限,则使用最大虚高补偿门限进行电压补偿;如果未超出,则使用实际补偿电压进行电压补偿。这里设置最大虚高补偿门限的目的在于:针对具体产品而言,一般电池内阻和最大充电电流是确定的,因此最大虚高也是能大致确定的,为了阻止非正常情况下的特殊虚高,如ADC采集端口的静电释放(electro-static discharge,ESD)静电、非标配充电器插入时的瞬间高压等,使虚高值高于正常情况下最大虚高,这时需要规避掉这一类的异常,因此根据整机设计,设定最大虚高补偿门限,当虚高补偿值大于该值后,补偿值取该值。
示例性的,若第T时刻的实际补偿电压是虚低补偿电压,那么补偿门限是最大虚低补偿门限。如果第T时刻的实际补偿电压超出了该最大虚低补偿门限,则使用最大虚低补偿门限进行电压补偿;如果未超出,则使用实际补偿电压进行电压补偿。这里设置最大虚低 补偿门限的目的在于:针对具体产品而言,一般电池内阻和最大放电电流是确定的,因此最大虚低也是能大致确定的,为了阻止非正常情况下的特殊虚低,如负载直抽电流等,这时需要规避掉这一类异常,因此根据整机设计,设定最大虚低补偿门限,当虚低补偿值大于该值后,补偿值取该值。
因此,通过引入最大虚高补偿门限或最大虚低补偿门限,能够保护电池,避免电压过高或过低破坏电池的使用或影响电池的寿命。
下面详细描述第T时刻的平滑电压V T平滑的计算方法。
可选地,S440,包括:
基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;
其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。
具体而言,终端设备使用补偿后的电压值与当前时刻的前N个时刻的电压平滑值,与各个电压值对应的时间,构建线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距。基于最小二乘法(具体介绍可参见现有技术的描述),能够计算出β和ε。在得到线性回归方程后,代入当前时刻T,得到本次平滑电压。
图7是平滑电压的计算方法的一个示例性流程图。
701,获取第T时刻的补偿后的电压值。
这里可以采用前文所述的方法得到第T时刻的补偿后的电压值,对此不作赘述。
702,获取第T时刻的前N个时刻的电压平滑值,分别为V T-1、V T-2、V T-3、…V T-N
703,根据T和V的关系,采用最小二乘法得到斜率β和截距ε。
704,获取电压的线性回归方程V=βT+ε。
705,在上述方程V=βT+ε中代入当前时刻T,得到第T时刻的平滑电压V T平滑
因此,基于图7中的例子,可以得到第T时刻的平滑电压V T平滑,并将平滑电压V T平 上报给系统。
可选地,所述方法400还包括:
获取所述第T时刻的采集电压V T采集的电压补偿门限;
其中,S430,包括:
若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。
示例性的,终端设备在采集到当前时刻的电压后,可以判断下采集到的电压是否满足电压补偿门限。如果采集到的电压满足电压补偿门限,则使用实际补偿电压对采集到的电压进行补偿;如果不满足,则不补偿。具体地,终端设备的电池在充电或者放电时,如果采集的电压值发生跳变,且采集到的电压值超出了设置的电压门限,则可以对采集的电压进行补偿。可选地,这里也可以对采集到的电压的变化进行检测,如果电压的变化超出了设置的电压变化门限,则也可以对采集的电压进行补偿,对此不作限定。
可选地,所述第T时刻的采集电压V T采集满足所述电压补偿门限包括以下情形中的任一项:
所述电压补偿门限是虚高电压补偿门限,所述第T时刻的采集电压V T采集小于所述虚高电压补偿门限;或者,
所述电压补偿门限是虚低电压补偿门限,所述第T时刻的采集电压V T采集大于所述虚低电压补偿门限。
示例性的,若采集电压V T采集小于所述虚高电压补偿门限,则执行电压补偿;若采集电压V T采集大于或等于所述虚高电压补偿门限,则不执行电压补偿。这里设置虚高电压补偿门限的目的是:若充电过程中,因为虚高的存在导致单次采集值大于电池的满电电压,而该种场景与过压电池插入单盘情况类似,所以为了安全考虑,这种情况下不再进行虚高补偿,即补偿值为0。系统认为ADC采集电压超过该虚高电压补偿门限后,单板快接近满电,此时因为电池的特性而使用恒压充电,电流越来越小,可不进行补偿。这样,有利于保护电池,提高电池的寿命。
示例性的,若采集电压V T采集大于所述虚低电压补偿门限,则执行电压补偿;若采集电压V T采集小于或等于所述虚低电压补偿门限,则不执行电压补偿。这里设置虚低电压补偿门限的目的是:若放电过程中,因为虚低的存在导致单次采集值低于电池的截止放电电压,而该种场景与欠压电池插入单盘情况类似,所以为了电池寿命以及安全考虑,这种情况下不再进行虚低补偿,即补偿值为0。这里,系统可以认为ADC采集电压超过该虚低电压补偿门限后,电池已无电量。这样,通过引入虚低电压补偿门限有利于保护电池,提高电池的寿命。
在本申请实施例的电池电压的补偿方法中,每个时刻都能够计算出对应的线性回归方程。下面将结合具体实例进行描述。
以第T时刻是起始时刻(比如第1时刻)为例,对于第1时刻:通常该时刻为系统刚开机时刻,这时候内部系统处于加载状态,此时做一次预处理,若时刻为零或负值,则电压与第1时刻相等,且补偿值为0,此时采集电压V 1采集为3800mV,因上一时刻为0时刻,故上一时刻平滑值平滑电压V 0平滑为3800mV,补偿值为0mV,故第1时刻补偿值为3800-3800=0(mV)。由于两时刻补偿值差值为0mV,不进行补偿值刷新,故当前第1时刻补偿后的电压值为3800mV+0mV=3800mV。补偿后的电压值3800mV加上前4个时刻上报的电压平滑值(-3,3800)、(-2,3800)、(-1,3800)、(-0,3800),计算得到斜率为0,截距为3800,将X=1代入,得到第1时刻的平滑电压值为3800mV。
以第T时刻是第五时刻为例,对于第五时刻,采集电压V 5采集为3800mV,上一时刻平滑电压V 4平滑为3800mV,补偿值为0mV,故第5时刻补偿值为3800-3800=0(mV)。由于两时刻补偿值差值为0mV,不进行补偿值刷新,故第5时刻预期平滑值为3800mV,加上前4个时刻上报的电压平滑值(1,3800)(2,3800)(3,3800)(4,3800),因为电压持续不变,故方程得到的斜率为0,截距为3800,此时方程表达式为y=3800(如图8中所示出的第五时刻的线性回归方程示意图),将X=5代入,得到此时V 5平滑为3800mV。
以第T时刻是第6时刻为例,对于第6时刻:因为充电原因,采集电压V 6采集变更为3920,此时预期补偿值为V 5平滑减去V 6采集,即3800-3920=-120,上一时刻补偿值为0。由于两者差值为120,故补偿值刷新为-120,所以当前时刻带入线性回归方程中的值为(6,3800(即3920-120)),得到方程斜率为0,截距为3800,此时方程表达式为y=3800(如图8中所示出的第六时刻的线性回归方程示意图),带入X=6,得到平滑值V 6平滑为3800。
以第T时刻是第7时刻为例,对于第7时刻:因为充电原因,采集电压V 7采集变更为3922,此时预期补偿值为V 6平滑减去V 7采集,即3800-3922=-122,上一时刻补偿值为-120。 由于两者差值的绝对值为2,所以不进行变更,所以当前时刻带入线性回归方程中的值为(7,3802(即3922-120)),得到方程斜率为0.4,截距为3798.4,此时方程表达式为y=0.4x+3798.4(如图9中所示出的第七时刻的线性回归方程示意图),带入X=7,得到平滑值V 7平滑为3801.2。
以第T时刻是第8时刻为例,对于第8时刻:因为充电原因,采集电压V 8采集变更为3924,此时预期补偿值为V 7平滑减去V 8采集,即3801.2-3924=-122.8,上一时刻补偿值为-120,两者差值的绝对值为2.8,所以不进行变更,所以当前时刻带入线性回归方程中的值为(8,3804(即3924-120)),得到方程斜率为0.92,截距为3795.5,此时方程表达式为y=0.92x+3795.5(如图9中所示出的第八时刻的线性回归方程示意图),带入X=8,得到平滑值V 8平滑为3802.86。
以第T时刻是第32时刻为例,对于第32时刻:由于放电原因,采集电压V 32采集变更为3900,当前时刻预期补偿值为平滑值(3846)减去V 32采集,即3846-3900=-54mV,上一时刻补偿值为-120mV。经过计算,两者差值的绝对值大于刷新门限35mV,故补偿值刷新为3846-3900=-54mV,所以当前时刻代入线性回归方程中的值为(32,3846),即第32时刻,预期平滑值为3846mV,加上前4个时刻上报的电压平滑值(28,3839)(29,3841)(30,3843)(31,3846),代入得到方程斜率为1.9,截距为3786,此时方程表达式为y=1.9x+3786(如图10中所示出的第32时刻的线性回归方程示意图),代入X=32得到平滑值V 32平滑Y=3846.8。
因为电池的充放电是连贯的,故需要考虑前N个数据的影响,故使用线性回归来预期,比直接上报更精确。比如,对于第32时刻,通过将设备在此时刻断电,测试电芯两端电压后,得到电池的真实电压为3846.5,采用本申请实施例的电池的电压补偿方法得到的上报电压为3846.8。相比于3846.5,采用本申请实施例的电池的电压补偿方法得到上报电压的精度为0.3mV。而若直接上报电压3846,直接上报的电压相对于真实电压(3846.5)的精度为0.5mV。可见,采用本申请实施例的电池的电压补偿方法得到的上报电压进行上报,比直接上报电压(即预期平滑值)的上报精度提高0.2mV。
下面结合图11中的仿真实例描述本申请实施例。这里,图11中采集点的仿真数据可以对应于前面图8至图10中的各个线性回归方程。应理解,图11中的每个采集点可以理解为时刻。
在图11中,以补偿值的刷新门限是35mV为例进行说明。在第7个时刻(时刻可以理解为图11中的采集点):因为充电原因,采集电压V 7采集变更为3922,此时预期补偿值为V 6平滑减去V 7采集,即3800-3922=-122,上一时刻补偿值为120。由于两者差值的绝对值为2,所以不进行变更,所以当前时刻带入线性回归方程中的值为(7,3802(即3922-120)),得到方程斜率为0.4,截距为3798.4,此时方程表达式为y=0.4x+3798.4(如图9中所示出的第七时刻的线性回归方程示意图),带入X=7,得到平滑值V 7平滑为3801.2。在第32时刻:由于放电原因,采集电压V 32采集变更为3900,当前时刻预期补偿值为平滑值(3846)减去V 32采集,即3846-3900=-54mV,上一时刻补偿值为-120mV。经过计算,两者差值的绝对值大于刷新门限35mV,故补偿值刷新为3846-3900=-54mV,所以当前时刻代入线性回归方程中的值为(32,3846),即第32时刻,预期平滑值为3846mV,加上前4个时刻上报的电压平滑值(28,3839)(29,3841)(30,3843)(31,3846),代入得到方程斜率为 1.9,截距为3786,此时方程表达式为y=1.9x+3786(如图10中所示出的第32时刻的线性回归方程示意图),代入X=32得到平滑值V 32平滑Y=3846.8。
应理解,图8至图11中的例子仅仅是为了便于本领域技术人员理解本申请实施例,并非要将本申请实施例限于例示的具体场景。本领域技术人员根据图8至图11的例子,显然可以进行各种等价的修改或变化,这样的修改或变化也落入本申请实施例的范围内。
在具体实现时,可将是否对电池电压进行补偿作为终端设备的一种可选的电压补偿功能(比如,虚电补偿功能)。可选地,用户可以选择开启或关闭该功能。具体而言,若用户选择开启电压补偿,则可以采用本申请的电池电压的补偿方法进行补偿,那么在终端设备的界面上的显示电量为补偿的电池电压;若用户选择关闭电压补偿,那么在终端设备的界面上的显示电量为未采用本申请实施例补偿方法进行补偿的电池电压。以图12中手机的用户界面(user's interface,UI)为例,在电池电压放电的场景下,手机会存在虚低情形。如图12所示:假设用户未开启虚电补偿功能,手机电池电量如图12中的左图所示(电量显示为1格);如果用户开启了虚电补偿功能,即采用本申请实施例的电池电压的补偿方法对虚电进行补偿后,那么此时手机电池电量如图12中的右图所示(电量显示为2格)。可见,采用本申请实施例的电池电压的补偿方法对虚电进行补偿后,可以使得电池电量显示更准确。应理解,这里只是以图12中的界面为例进行示意性说明,并非要将本申请实施例限定于图12中,本申请实施例对此不作具体限定。
上文结合图1至图12详细描述了根据本申请实施例的电池电压的补偿方法。下面将结合图13和图14描述根据本申请实施例的电池电压的补偿装置。应理解,方法实施例所描述的技术特征同样适用于以下装置实施例。
图13示出了根据本申请实施例的电池电压的补偿装置1300的示意性框图。所述装置1300应用于包括电池的终端设备。如图13所示,该装置1300包括:
获取模块1310,用于获取电池的第T时刻的采集电压V T采集
确定模块1320,用于根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压;
补偿模块1330,用于使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;
处理模块1340,用于使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑
在一种可能的实现方式中,所述终端设备中存储有第T-1时刻的平滑电压V T-1平滑
其中,所述确定模块1320用于根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压,具体包括:
根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1采集,计算第T-1时刻的补偿电压V T-1
根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压V T
计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;
基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压。
在一种可能的实现方式中,所述确定模块1320用于基于所述差值的绝对值与第一门 限的大小关系,确定所述第T时刻的实际补偿电压,具体包括:
若所述差值的绝对值大于所述第一门限,则第T时刻的实际补偿电压为V T;或,
若所述差值的绝对值小于或等于所述第一门限,则第T时刻的实际补偿电压为V T-1
在一种可能的实现方式中,所述V T-1=V T-1平滑-V T-1采集,所述V T=V T-1平滑-V T采集;其中,所述V T与所述V T-1差值为△V,
若|△V|大于所述第一门限,则第T时刻的实际补偿电压为所述V T,若|△V|小于或等于所述第一门限,则第T时刻的实际补偿电压为所述V T-1
在一种可能的实现方式中,所述处理模块1340用于使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,进行平滑处理,具体包括:
基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;
其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。
在一种可能的实现方式中,所述获取模块1310还用于:
获取所述第T时刻的采集电压V T采集的电压补偿门限;
其中,所述补偿模块1330用于使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,具体包括:
若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。
在一种可能的实现方式中,所述第T时刻的采集电压V T采集满足所述电压补偿门限包括以下情形中的任一项:
所述电压补偿门限是虚高电压补偿门限,所述第T时刻的采集电压V T采集小于所述虚高电压补偿门限;或者,
所述电压补偿门限是虚低电压补偿门限,所述第T时刻的采集电压V T采集大于所述虚低电压补偿门限。
应理解,根据本申请实施例的装置1300可用于执行前述方法实施例的方法,比如,图4中的方法,并且装置1300中的各个模块的上述和其它管理操作和/或功能分别为了实现前述方法实施例的方法的相应步骤,因此也可以实现前述方法实施例中的有益效果,为了简洁,这里不作赘述。
还应理解,上述装置1300中的各个模块可以通过软件和/或硬件形式实现,对此不作具体限定。换言之,装置1300是以功能模块的形式来呈现。这里的“模块”可以指特定应用集成电路ASIC、电路、执行一个或多个软件或固件程序的处理器和存储器、集成逻辑电路,和/或其他可以提供上述功能的器件。可选地,在一个简单的实施例中,本领域的技术人员可以想到装置1300可以采用图14所示的形式。获取模块1310、确定模块1320、补偿模块1330和处理模块1340可以通过图14所示的处理器1430实现。具体的,处理器处理器通过执行存储器中存储的计算机程序来实现。可选地,当所述装置1300是芯片时,那么装置1300中涉及的收发的功能和/或实现过程还可以通过管脚或接口电路等来实现。可选地,所述存储器为所述芯片内的存储单元,比如寄存器、缓存等,所述存储单元还可以是所述计算机设备内的位于所述芯片外部的存储单元,如图14所的存储器1440。图14示出了根据本申请实施例的电池电压的补偿装置1400的示意性结构图,如图14所示,该 装置1400包括:
电池主体1410;传感器1420,用于检测电池主体1410的参数,该参数包括:电池主体410的电压数据。应理解,传感器1420可以是可选的。
处理器1430,该处理器1430可以与传感器1420通信连接,从而能够从传感器1430获取电压数据;
存储器1440;
其中,该存储器1440用于存储指令,该处理器1430用于执行该存储器1440存储的指令。
可选地,所述处理器1430可通过所述传感器1420获取电池的第T时刻的采集电压V T采集
在一种可选的实现方式中,所述处理器1430用于执行如下步骤:根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压;使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑
在一种可选的实现方式中,所述装置1400中存储有第T-1时刻的平滑电压V T-1平滑
其中,所述处理器1430根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采 ,确定第T时刻的实际补偿电压,具体包括:
根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1采集,计算第T-1时刻的补偿电压V T-1
根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压V T
所述终端设备计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;
基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压。
在一种可选的实现方式中,所述处理器1430基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压,具体包括:
若所述差值的绝对值大于所述第一门限,则第T时刻的实际补偿电压为V T;或,
若所述差值的绝对值小于或等于所述第一门限,则第T时刻的实际补偿电压为V T-1
在一种可选的实现方式中,所述V T-1=V T-1平滑-V T-1采集,所述V T=V T-1平滑-V T采集;其中,所述V T与所述V T-1差值为△V,
若|△V|大于所述第一门限,则第T时刻的实际补偿电压为所述V T,若|△V|小于或等于所述第一门限,则第T时刻的实际补偿电压为所述V T-1
在一种可选的实现方式中,所述处理器1430使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,进行平滑处理,具体包括:
基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;
其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。
在一种可选的实现方式中,所述处理器1430还用于获取所述第T时刻的采集电压V T 采集的电压补偿门限;
其中,所述处理器1430使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,具体包括:
若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。
在一种可选的实现方式中,所述第T时刻的采集电压V T采集满足所述电压补偿门限包括以下情形中的任一项:
所述电压补偿门限是虚高电压补偿门限,所述第T时刻的采集电压V T采集小于所述虚高电压补偿门限;或者,
所述电压补偿门限是虚低电压补偿门限,所述第T时刻的采集电压V T采集大于所述虚低电压补偿门限。
应理解,根据本申请实施例的装置1400可用于执行前述方法实施例的方法,比如,图4中的方法,并且装置1400中的各个模块的上述和其它管理操作和/或功能分别为了实现前述方法实施例的方法的相应步骤,因此也可以实现前述方法实施例中的有益效果,为了简洁,这里不作赘述。
可选地,在一种可能的实现方式中,上述装置1300或装置1400可以是终端设备。
在本申请实施例中,应注意,本申请实施例上述的方法实施例可以应用于处理器中,或者由处理器实现。处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的一个或多个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品可以包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁盘)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘solid state disk(SSD))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的 部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种电池电压的补偿方法,其特征在于,所述方法应用于包括电池的终端设备,所述方法包括:
    所述终端设备获取电池的第T时刻的采集电压V T采集
    所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压;
    所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;
    所述终端设备使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备中存储有第T-1时刻的平滑电压V T-1平滑
    其中,所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压,包括:
    所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1 采集,计算第T-1时刻的补偿电压V T-1
    所述终端设备根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压V T
    所述终端设备计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;
    所述终端设备基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压。
  3. 根据权利要求2所述的方法,其特征在于,所述终端设备基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压,包括:
    若所述差值的绝对值大于所述第一门限,则第T时刻的实际补偿电压为V T;或,
    若所述差值的绝对值小于或等于所述第一门限,则第T时刻的实际补偿电压为V T-1
  4. 根据权利要求3所述的方法,其特征在于,所述V T-1=V T-1平滑-V T-1采集,所述V T=V T-1 平滑-V T采集;其中,所述V T与所述V T-1差值为△V,
    若|△V|大于所述第一门限,则第T时刻的实际补偿电压为所述V T,若|△V|小于或等于所述第一门限,则第T时刻的实际补偿电压为所述V T-1
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述终端设备使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,进行平滑处理,包括:
    所述终端设备基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;
    其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:
    所述终端设备获取所述第T时刻的采集电压V T采集的电压补偿门限;
    其中,所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,包括:
    若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则所述终端设备使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。
  7. 根据权利要求6所述的方法,其特征在于,所述第T时刻的采集电压V T采集满足所述电压补偿门限包括以下情形中的任一项:
    所述电压补偿门限是虚高电压补偿门限,所述第T时刻的采集电压V T采集小于所述虚高电压补偿门限;或者,
    所述电压补偿门限是虚低电压补偿门限,所述第T时刻的采集电压V T采集大于所述虚低电压补偿门限。
  8. 一种电池电压的补偿装置,其特征在于,所述装置应用于包括电池的终端设备,所述装置包括:
    获取模块,用于获取电池的第T时刻的采集电压V T采集
    确定模块,用于根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压;
    补偿模块,用于使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;
    处理模块,用于使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑
  9. 根据权利要求8所述的装置,其特征在于,所述终端设备中存储有第T-1时刻的平滑电压V T-1平滑
    其中,所述确定模块用于根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T 采集,确定第T时刻的实际补偿电压,具体包括:
    根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1采集,计算第T-1时刻的补偿电压V T-1
    根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压V T
    计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;
    基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压。
  10. 根据权利要求9所述的装置,其特征在于,所述确定模块用于基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压,具体包括:
    若所述差值的绝对值大于所述第一门限,则第T时刻的实际补偿电压为V T;或,
    若所述差值的绝对值小于或等于所述第一门限,则第T时刻的实际补偿电压为V T-1
  11. 根据权利要求10所述的装置,其特征在于,所述V T-1=V T-1平滑-V T-1采集,所述V T=V T-1平滑-V T采集;其中,所述V T与所述V T-1差值为△V,
    若|△V|大于所述第一门限,则第T时刻的实际补偿电压为所述V T,若|△V|小于或等于所述第一门限,则第T时刻的实际补偿电压为所述V T-1
  12. 根据权利要求8至11中任一项所述的装置,其特征在于,所述处理模块用于使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,进行平滑处理,具体包括:
    基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;
    其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。
  13. 根据权利要求8至12中任一项所述的装置,其特征在于,所述获取模块还用于:
    获取所述第T时刻的采集电压V T采集的电压补偿门限;
    其中,所述补偿模块用于使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,具体包括:
    若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。
  14. 根据权利要求13所述的装置,其特征在于,所述第T时刻的采集电压V T采集满足所述电压补偿门限包括以下情形中的任一项:
    所述电压补偿门限是虚高电压补偿门限,所述第T时刻的采集电压V T采集小于所述虚高电压补偿门限;或者,
    所述电压补偿门限是虚低电压补偿门限,所述第T时刻的采集电压V T采集大于所述虚低电压补偿门限。
  15. 一种终端设备,其特征在于,包括:电池,处理器和存储器,所述存储器用于存储指令,所述处理器用于调用所述存储器中存储的指令,以执行以下步骤:
    获取所述电池的第T时刻的采集电压V T采集
    根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压;
    使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿,得到补偿后的电压值;
    使用所述补偿后的电压值与所述第T时刻的前N个时刻的电压平滑值,进行平滑处理,得到第T时刻的平滑电压V T平滑
  16. 根据权利要求15所述的终端设备,其特征在于,所述终端设备中存储有第T-1时刻的平滑电压V T-1平滑
    其中,所述处理器根据第T-1时刻的平滑电压V T-1平滑,以及所述采集电压V T采集,确定第T时刻的实际补偿电压,具体包括:
    根据第T-1时刻的平滑电压V T-1平滑,以及,第T-1时刻的采集电压V T-1采集,计算第T-1时刻的补偿电压V T-1
    根据第T-1时刻的平滑电压V T-1平滑,以及,所述采集电压V T采集,计算第T时刻的补偿电压V T
    计算第T时刻的补偿电压V T与第T-1时刻的补偿电压V T-1的差值;
    所述终端设备基于所述差值的绝对值与第一门限的大小关系,确定所述第T时刻的实际补偿电压。
  17. 根据权利要求15或16所述的终端设备,其特征在于,所述处理器使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,进行平滑处理,具体包括:
    基于最小二乘法,使用所述补偿后的电压值与当前时刻的前N个时刻的电压平滑值,得到线性回归方程V=βt+ε,V表示电压,t表示时间,β表示斜率,ε表示截距;
    其中,第T时刻的平滑电压V T平滑采用所述线性回归方程计算。
  18. 根据权利要求15至17中任一项所述的终端设备,其特征在于,所述处理器还用于:
    获取所述第T时刻的采集电压V T采集的电压补偿门限;
    其中,所述处理器使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T 采集进行补偿,具体包括:
    若所述第T时刻的采集电压V T采集满足所述电压补偿门限,则使用所述第T时刻的实际补偿电压对所述第T时刻的采集电压V T采集进行补偿。
  19. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述权利要求1-7中任一项所述的方法。
  20. 一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述权利要求1-7中任一项所述的方法。
PCT/CN2018/113127 2018-10-31 2018-10-31 电池电压的补偿方法、装置和终端设备 WO2020087373A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/113127 WO2020087373A1 (zh) 2018-10-31 2018-10-31 电池电压的补偿方法、装置和终端设备
CN201880093192.1A CN112292604B (zh) 2018-10-31 2018-10-31 电池电压的补偿方法、装置和终端设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/113127 WO2020087373A1 (zh) 2018-10-31 2018-10-31 电池电压的补偿方法、装置和终端设备

Publications (1)

Publication Number Publication Date
WO2020087373A1 true WO2020087373A1 (zh) 2020-05-07

Family

ID=70462497

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113127 WO2020087373A1 (zh) 2018-10-31 2018-10-31 电池电压的补偿方法、装置和终端设备

Country Status (2)

Country Link
CN (1) CN112292604B (zh)
WO (1) WO2020087373A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748347A (zh) * 2020-12-30 2021-05-04 北京二郎神科技有限公司 电池电量获取方法、装置、存储介质及电子设备
CN112782596A (zh) * 2020-12-07 2021-05-11 深圳市新国都支付技术有限公司 电池电量计算方法、电子设备及存储介质
CN113114141A (zh) * 2021-04-26 2021-07-13 北京机械设备研究所 电动舵机动力电供电电压补偿方法、装置及设备
CN117130419A (zh) * 2023-08-30 2023-11-28 南京普联微电子科技有限公司 一种基于lstm的mos管压差智能调节方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448015B (zh) * 2021-08-06 2023-01-24 荣耀终端有限公司 温度补偿方法、装置、终端设备及可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002181906A (ja) * 2000-12-12 2002-06-26 Toshitaka Takei 電池の残容量算出方法と算出する機器
CN106501730A (zh) * 2016-12-06 2017-03-15 歌尔科技有限公司 一种电池电量处理方法及设备
CN107831445A (zh) * 2017-10-30 2018-03-23 深圳市道通智能航空技术有限公司 一种获取电池剩余电量的方法和装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100554241B1 (ko) * 1999-09-09 2006-02-22 도요다 지도샤 가부시끼가이샤 배터리용량계측 및 잔존용량 산출장치
CN115332650A (zh) * 2003-11-24 2022-11-11 密尔沃基电动工具公司 含有电池组的运行和运行电池组的方法及电动工具电池组
CN1641372A (zh) * 2004-01-02 2005-07-20 明基电通股份有限公司 移动电子装置的电池电量的补偿装置及其方法
KR100669476B1 (ko) * 2005-12-21 2007-01-16 삼성에스디아이 주식회사 배터리의 soc보정 방법 및 이를 이용한 배터리 관리시스템
CN1889736A (zh) * 2006-08-08 2007-01-03 北京天碁科技有限公司 移动通信终端电池电量的测量方法
KR101609881B1 (ko) * 2009-11-12 2016-04-06 삼성전자주식회사 휴대용 단말기에서 배터리 전류 소모 상태 표시 방법 및 장치
CN101806867A (zh) * 2010-03-12 2010-08-18 中兴通讯股份有限公司 测量手机电池电量的方法及装置
WO2012032776A1 (ja) * 2010-09-10 2012-03-15 パナソニック株式会社 電力制御装置、電力制御方法、及び電力供給システム
CN103176132B (zh) * 2011-12-22 2015-08-12 联芯科技有限公司 电池电量的估算方法及终端设备
CN103020445B (zh) * 2012-12-10 2016-07-06 西南交通大学 一种电动车车载磷酸铁锂电池的soc与soh预测方法
JP5994680B2 (ja) * 2013-02-27 2016-09-21 株式会社豊田自動織機 電池残容量推定方法及び装置
CN103176139B (zh) * 2013-03-08 2015-07-29 桂林电子科技大学 动力电池非光滑迟滞特性补偿的电荷状态估算方法及系统
CN103633705B (zh) * 2013-12-10 2016-01-13 Tcl通讯(宁波)有限公司 在充电时通过放电方式精确获取电池电压的终端和方法
JP6323149B2 (ja) * 2014-05-07 2018-05-16 岩崎電気株式会社 停電補償機能付き照明用電源装置及び照明装置
WO2016129212A1 (ja) * 2015-02-13 2016-08-18 パナソニックIpマネジメント株式会社 電池状態推定装置、および電源装置
CN105866688A (zh) * 2015-12-30 2016-08-17 乐视移动智能信息技术(北京)有限公司 测量移动通信终端设备电池电量的方法和系统
EP3203574A1 (de) * 2016-02-08 2017-08-09 Siemens Aktiengesellschaft Lebensdauersteuerung für energiespeicher
CN107817859A (zh) * 2017-10-30 2018-03-20 深圳市道通智能航空技术有限公司 一种电池电压滤波方法和装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002181906A (ja) * 2000-12-12 2002-06-26 Toshitaka Takei 電池の残容量算出方法と算出する機器
CN106501730A (zh) * 2016-12-06 2017-03-15 歌尔科技有限公司 一种电池电量处理方法及设备
CN107831445A (zh) * 2017-10-30 2018-03-23 深圳市道通智能航空技术有限公司 一种获取电池剩余电量的方法和装置

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112782596A (zh) * 2020-12-07 2021-05-11 深圳市新国都支付技术有限公司 电池电量计算方法、电子设备及存储介质
CN112748347A (zh) * 2020-12-30 2021-05-04 北京二郎神科技有限公司 电池电量获取方法、装置、存储介质及电子设备
CN112748347B (zh) * 2020-12-30 2023-08-25 北京二郎神科技有限公司 电池电量获取方法、装置、存储介质及电子设备
CN113114141A (zh) * 2021-04-26 2021-07-13 北京机械设备研究所 电动舵机动力电供电电压补偿方法、装置及设备
CN117130419A (zh) * 2023-08-30 2023-11-28 南京普联微电子科技有限公司 一种基于lstm的mos管压差智能调节方法及系统
CN117130419B (zh) * 2023-08-30 2024-03-12 南京普联微电子科技有限公司 一种基于lstm的mos管压差智能调节方法及系统

Also Published As

Publication number Publication date
CN112292604B (zh) 2021-12-21
CN112292604A (zh) 2021-01-29

Similar Documents

Publication Publication Date Title
WO2020087373A1 (zh) 电池电压的补偿方法、装置和终端设备
US11056905B2 (en) Battery charging management method and terminal
US11201359B2 (en) Charging control method and apparatus, and computer readable storage medium
US20220043067A1 (en) Charging method and device, charging system, electronic equipment and storage medium
KR102258143B1 (ko) 전자 장치의 충전 회로
US9979220B2 (en) Electronic device and method for controlling charging of the same
WO2020020206A1 (zh) 充电方法及充电装置
EP3579375B1 (en) Charging method, charging device and terminal
CN110797925B (zh) 电池控制系统和方法、电子设备
US10439406B2 (en) Terminal and method for charging the same
CN110085934B (zh) 一种终端电池的充电方法及移动终端
US11309592B2 (en) Load power supply circuit and terminal
CN109149690B (zh) 充电控制装置和方法、电子设备
WO2018129976A1 (zh) 充电控制方法、装置、系统、存储介质及终端
KR20160058561A (ko) 이종의 배터리 셀을 제어하기 위한 방법 및 그 전자 장치
CN109217409B (zh) 充电方法、装置和电子设备
US20200091751A1 (en) Power supply control method and device, storage medium and electronic device
CN111478378B (zh) 保护电路、充电控制装置和方法、电子设备
CN109217411B (zh) 充电方法和装置、电子设备
CN109860743B (zh) 一种充电方法及终端设备
CN107329547B (zh) 一种温度控制的方法和设备以及移动终端
CN110994052B (zh) 延长电池续航能力的方法及装置、存储介质、终端设备
CN112217249A (zh) 一种充电控制装置、方法、移动终端及可读存储介质
CN110972075B (zh) 定位控制方法、定位控制电路、存储介质及终端
KR20150049221A (ko) 배터리 충전 제어 방법 및 그 전자 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18938246

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18938246

Country of ref document: EP

Kind code of ref document: A1