Battery power detection method and device, and computer readable storage medium
By combining motor status with battery power status, the battery level is dynamically corrected, solving the problem of inaccurate battery level detection and improving battery life and equipment reliability.
Patent Information
- Application Number
- CN202511182174.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-08-22
AI Technical Summary
Inaccurate battery power detection can easily lead to overcharging or over-discharging, increasing user replacement costs and resource waste, and affecting the lifespan and reliability of batteries and electronic devices.
By acquiring the motor status and battery power status, and based on historical remaining power and motor status, the battery power is dynamically corrected using bus voltage and motor phase current, and the remaining battery power is estimated, avoiding reliance on battery discharge current detection.
Accurately estimate remaining battery power to avoid insufficient power, improve device reliability and user experience, and reduce hardware costs.
Smart Images

Figure CN120669136B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of batteries, in particular to a battery power detection method and device and a computer readable storage medium. BACKGROUND
[0002] In modern industry and daily life, electronic devices driven by electric motors are widely used in various scenarios, and the efficient operation of electronic devices depends on stable power supply. As an important energy storage device, batteries provide flexible and convenient power sources for these electronic devices.
[0003] Battery power is easily affected by various external factors such as working conditions and external environment temperature. Inaccurate battery power detection can easily cause overcharging or overdischarging, accelerate battery aging, and increase user replacement costs and resource waste. Accurate battery power can help users intuitively know the battery power supply state and choose the right charging time, improving the service life of the battery and the electronic device.
[0004] Therefore, it is of great significance to establish an accurate and effective battery power detection method to ensure the long-term and safe operation of the vehicle and improve the practical value of the battery. SUMMARY
[0005] The present application provides a battery power detection method and electronic device and computer readable storage medium, which can accurately estimate the remaining battery power according to different motor states and battery power supply states, effectively improve the battery life, effectively avoid the situation of insufficient power during motor operation, and improve the reliability and user experience of the device.
[0006] To solve the above technical problems, the first aspect of the present application provides a battery power detection method, wherein the battery is used to power the motor. The detection method comprises: obtaining the motor state and the battery power supply state; obtaining the historical remaining power based on the motor state and the battery power supply state; determining the power consumption time parameter based on the historical remaining power when the motor is in the running state; and determining the current remaining power based on the power consumption time parameter and the historical remaining power.
[0007] Wherein, the step of obtaining the historical remaining power based on the motor state and the battery power supply state comprises: obtaining the bus voltage when the motor state is in the standby state; determining the theoretical power based on the bus voltage; and determining the historical remaining power based on the battery power supply state and the theoretical power.
[0008] Wherein, the step of determining the historical remaining power based on the battery power supply state and the theoretical power comprises: obtaining the historical storage power when the battery power supply state is in the initial power-on state; and determining the historical remaining power based on the historical storage power and the theoretical power.
[0009] The current residual power is stored as a historical stored power in response to the power-off of the motor.
[0010] The step of determining the historical residual power based on the historical stored power and the theoretical power includes: in response to the historical stored power being greater than a power reset threshold, the historical residual power is the historical stored power; and / or, in response to the bus voltage being greater than a battery full power voltage, the historical residual power is confirmed as full power; and / or, a first difference value is obtained based on the theoretical power and the historical stored power; a first reset value is obtained based on the first difference value; and the historical residual power is determined based on the historical stored power and the first reset value.
[0011] The step of determining the historical residual power based on the battery power supply state and the theoretical power includes: in response to the battery power supply state being a non-first power-on state, the historical residual power is obtained; and the historical residual power is corrected based on the historical residual power and the theoretical power.
[0012] The step of correcting the historical residual power based on the historical residual power and the theoretical power in response to the battery power supply state being a non-first power-on state includes: in response to the historical residual power being greater than the theoretical power, a second difference value is obtained based on the historical residual power and the theoretical power; a second reset value is obtained based on the second difference value; and the corrected historical residual power is determined based on the historical residual power and the second reset value.
[0013] The step of determining the power consumption time parameter based on the historical residual power in response to the motor being in the running state includes: in response to the historical residual power being greater than a first preset value, a power consumption reference parameter and a motor phase current are obtained; a power consumption adjustment parameter is determined based on the motor phase current; and the power consumption time parameter is determined based on the power consumption reference parameter and the power consumption adjustment parameter.
[0014] The step of determining the power consumption time parameter based on the historical residual power in response to the motor being in the running state includes: in response to the historical residual power being less than a first preset value, the power consumption time parameter is determined based on the historical residual power and a second preset value.
[0015] The step of determining the current residual power based on the power consumption time parameter and the historical residual power includes: the running time of the motor is accumulated; in response to the running time being greater than the power consumption time parameter, the current residual power is determined as a value obtained by subtracting a predetermined power consumption from the historical residual power, and the running time is cleared.
[0016] The step of obtaining the historical residual power based on the motor state and the battery power supply state includes: in response to the motor being in the running state within a predetermined time range, the historical residual power of the current running time period is determined based on the current residual power of the previous running time period.
[0017] To solve the above technical problems, the second aspect of the present application provides an electronic device, wherein the electronic device comprises a battery, a motor, a processor, a memory; the battery is electrically connected with the motor, for supplying power for the motor; the battery and the processor are coupled with each other, the processor and the memory are coupled with each other, the memory is used for storing computer program instructions, and the processor executes the computer program instructions to realize the detection method in any of the above aspects when working.
[0018] To solve the above technical problems, the third aspect of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer program instructions, and the computer program instructions can be executed by the processor to realize the detection method in any of the above aspects.
[0019] Different from the prior art, the battery power detection method and the electronic device and the computer readable storage medium provided by the present application can correct the power or detect the dynamic power consumption according to different motor states and battery power supply states, accurately estimate the remaining power of the battery, effectively improve the battery life, effectively avoid the situation of insufficient power during the operation of the motor, and improve the reliability and user experience of the device. It does not rely on obtaining the battery discharge current to estimate the battery power, does not need to increase the bus current detection and additional acquisition circuit, and reduces the hardware cost. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is a flowchart of the first embodiment of the battery power detection method of the present application;
[0021] Figure 2 is a flowchart of the second embodiment of the battery power detection method of the present application;
[0022] Figure 3 is a flowchart of the third embodiment of the battery power detection method of the present application;
[0023] Figure 4 is a flowchart of the fourth embodiment of the battery power detection method of the present application;
[0024] Figure 5 is a flowchart of the fifth embodiment of the battery power detection method of the present application;
[0025] Figure 6 is a flowchart of the sixth embodiment of the battery power detection method of the present application;
[0026] Figure 7 is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0027] Figure 8 is a structural schematic diagram of an embodiment of the computer readable storage medium of the present application. DETAILED DESCRIPTION
[0028] The application will be described in detail below in conjunction with the accompanying drawings and embodiments.
[0029] The application first provides a battery power detection method, please refer to Figure 1 , Figure 1 is the flowchart of the first embodiment of the battery power detection method of the application.
[0030] The detection method comprises:
[0031] S101: Obtain motor state and battery power supply state.
[0032] The motor and the battery are electrically connected. When the battery is powered on to supply power to the motor, whether the motor is running or in standby, the motor driver of the motor can collect motor state information, battery state information and driver state information through various internal sensors and feedback mechanisms. The motor state information can include current, voltage, speed, position, temperature, etc., and is sent to the control unit of the motor driver. After processing and algorithm calculation, the actual motor state can be obtained. The motor driver also obtains battery state information and self-state information. After processing and algorithm calculation, the actual battery power supply state can be obtained. The battery power supply state can include power-on state, etc. When the motor driver completes the initialization self-check and confirms that the battery is normal and ready for power supply to the vehicle, it means that the battery power supply state has completed power-on, and the motor driver can also record the control command to realize closed-loop control.
[0033] S102: Obtain historical remaining power based on the motor state and the battery power supply state.
[0034] The accurate historical remaining power provides a calculation reference point for the current remaining power, which can more accurately estimate the charge and discharge capacity of the battery and the current remaining power.
[0035] The battery power is a dynamic process. Due to the characteristics of the battery, the battery that has not been used for a long time will produce self-discharge and cause the power to drop. Or after the device is powered off or in standby, charging the battery will also cause the power to rise. Or the load of the battery will change when the motor is moving at different powers, and the power will fluctuate. Or due to temperature influence or battery aging, etc. At this time, the historical remaining power obtained is not accurate enough, and needs to be corrected or reset based on the motor state and the battery power supply state to obtain accurate historical remaining power.
[0036] S103: In response to the motor being in a running state, determine the power consumption time parameter based on the historical remaining power.
[0037] When the motor is running, the battery is powered, the battery power consumption is large, and the power is reduced. To some extent, due to the chemical properties of the battery, the power consumption time parameter setting corresponds to the battery power, and the power consumption time parameter is adjusted based on the historical remaining power. In other embodiments, the power consumption time parameter can be set to correspond to the motor movement state, and when the motor power is larger, the power consumption will be larger, which can be determined based on the relationship curve set in advance and stored in the motor driver.
[0038] S104: Determine the current remaining power based on the power consumption time parameter and the historical remaining power.
[0039] When the motor running time meets the power consumption time parameter, it proves that the battery consumes a certain amount of power, and then the current remaining power is determined based on the historical remaining power. It can more accurately estimate the battery power, optimize the battery life, and improve the motor performance, thereby improving the overall performance of the device and the user experience, and can be applied to various application scenarios including application in electric vehicles, industrial production machines, water pumps and other devices.
[0040] Please refer to Figure 2 , Figure 2 is a flowchart of the second embodiment of the battery power detection method of the present application.
[0041] In an optional embodiment, based on the motor state and the battery power supply state, the step of obtaining the historical remaining power comprises:
[0042] S201: Obtain the motor state and the battery power supply state.
[0043] S202: In response to the motor state being in standby state, obtain the bus voltage.
[0044] S203: Determine the theoretical power based on the bus voltage.
[0045] The upper bus voltage is the DC bus voltage of the motor driver, and the battery output voltage after voltage boosting or voltage reduction is used to drive the motor voltage.
[0046] There is a certain relationship between the bus voltage of the battery and the remaining power of the battery. According to the open circuit voltage method principle, the relationship curve of the bus voltage and the power is obtained, and is pre-stored in the motor driver. The theoretical power is calculated by the bus voltage value.
[0047] S204: Determine the historical remaining power based on the battery power supply state and the theoretical power.
[0048] When the motor is in standby, the general power fluctuation is small. When the obtained theoretical power does not conform to the battery power supply state, it is likely that the battery has not been used for a long time, resulting in a decrease in power, or charging the battery after the device is powered off or in standby state can also cause the power to rise. At this time, the obtained historical remaining power is not easy to be accurate. The historical remaining power is corrected or reset to obtain accurate historical remaining power.
[0049] Please refer to Figure 3 , Figure 3 is a flowchart of the third embodiment of the battery power detection method of the present application.
[0050] In an optional embodiment, the step of determining the historical remaining power based on the battery power supply state and the theoretical power comprises:
[0051] S301: Obtain the motor state and the battery power supply state.
[0052] S302: In response to the battery power supply state being initial power-on, obtain the historical stored power.
[0053] The electric control obtains the battery state information and its own state information, and can obtain the actual battery power supply state. The battery power supply state can include power-on state, etc. When the motor driver completes the initialization self-check and confirms that the battery is normal and ready for power supply for the vehicle, it means that the battery power supply state has completed power-on.
[0054] In some embodiments, the battery power supply state can include initial power-on and non-initial power-on. When the device starts from a completely powered-off state, and the battery driver completes the initialization and self-check to confirm that the battery is normally powered, the battery power supply state is initial power-on. When the device has completed a power-on process before, and the driver directly recovers to the previous working state when starting again, the battery power supply state is non-initial power-on.
[0055] S303: Determine the historical remaining power based on the historical stored power and the theoretical power.
[0056] When the initial power-on, the motor driver has not generated the control command of the motor operation at this time. In order to prevent the power fluctuation due to the battery charging, self-power-off or damage replacement, etc., the historical remaining power is corrected based on the historical stored power and the theoretical power, and the initialization of the initial power-on is realized.
[0057] S304: In response to the motor power-off, store the current remaining power as the historical stored power.
[0058] When the battery is charging or the device is powered off, the motor loses power, and the historical stored power is stored in a non-volatile memory until the next time the device is powered on and the battery is in the initial power-on state, when it is retrieved by the motor driver. This non-volatile memory can be a built-in memory of the motor driver or a readable storage medium coupled to other motor drivers. In other implementations, the historical stored power can be updated synchronously when the current remaining power is updated.
[0059] S305: When the battery power supply state is not the initial power-on state, obtain the historical remaining power.
[0060] S306: Correct the historical remaining power based on the historical remaining power and the theoretical power.
[0061] After the motor has run, it enters standby mode. It is assumed that the battery power supply is not in the initial power-on state. The motor driver has already obtained the current remaining power, and uses the current remaining power as the historical remaining power, and performs power correction.
[0062] In one optional implementation, step S303, determining the historical remaining power based on historical stored power and theoretical power, specifically includes:
[0063] In some embodiments, in response to the historical stored power being greater than the power reset threshold, the historical remaining power is the historical stored power.
[0064] To meet practical application needs, when the historical stored power level obtained upon initial power-on is greater than the power reset threshold, no power reset or calibration will be performed. This is because the power consumption is considered to be minimal at this time, and users generally do not plan to charge the battery. Therefore, the displayed current remaining power level will not be increased to avoid affecting the user experience.
[0065] The battery reset threshold can be 98%, 95%, 92%, 90%, 85%, etc., and can be set according to the battery capacity or the motor's operating conditions.
[0066] Alternatively, if the historical stored power is less than the power reset threshold, it is assumed that charging may occur, or the motor status may change, causing the power to rise or fall, requiring verification and correction reset.
[0067] In other embodiments, when the historical stored power is less than the power reset threshold, in order to ensure user experience, the power can be set to only be corrected downwards and not upwards.
[0068] In some embodiments, in response to the bus voltage being greater than the battery's full charge voltage, the historical remaining charge is confirmed to be fully charged.
[0069] The battery receives a voltage higher than the full battery voltage from the charger during charging to ensure that the external charging current can flow into the battery. When the bus voltage reaches or exceeds the full battery voltage, it is considered that the battery has reached a near full state.
[0070] In some embodiments, a first difference value is obtained based on the theoretical electric quantity and the historical stored electric quantity; a first reset value is obtained based on the first difference value; and the historical residual electric quantity is determined based on the historical stored electric quantity and the first reset value.
[0071] The historical stored electric quantity is Q0, the theoretical electric quantity is Q1, the first difference value is calculated , the first reset value q1 is calculated according to △1, and the historical residual electric quantity is .
[0072] The relationship between △1 and q1 is an empirical value, and in some embodiments, it is set to , specifically , or , and in other embodiments, it can also be , where a1 and b1 are empirical values.
[0073] In an optional implementation, in response to the battery power supply state being a non-first power-on state, the step of correcting the historical residual electric quantity based on the historical residual electric quantity and the theoretical electric quantity in step S306 specifically includes:
[0074] In response to the historical residual electric quantity being greater than the theoretical electric quantity, a second difference value is obtained based on the historical residual electric quantity and the theoretical electric quantity; a second reset value is obtained based on the second difference value; and the corrected historical residual electric quantity is determined based on the historical residual electric quantity and the second reset value.
[0075] In some embodiments, the historical residual electric quantity is Qc, the theoretical electric quantity is Q1, the second difference value is calculated , the second reset value q2 is calculated according to △2, and the historical residual electric quantity is .
[0076] The relationship between △2 and q2 is an empirical value, and in some embodiments, it is set to , specifically , and in other embodiments, it can also be , where a2 and b2 are empirical values.
[0077] After each motor standby, the battery needs to be delayed for a certain period of time due to the influence of the load, i.e. the motor state, and then collect the bus voltage to obtain the theoretical voltage for correction.
[0078] It can be understood that, due to the motor just stops running or just powers on, the standing time is very short, and the bus voltage obtained at this time is actually not fully applicable to the battery power obtained by the open circuit voltage method principle. In order to effectively shorten the standing time, the reset amount needs to be measured by an empirical value to check or correct the historical remaining power.
[0079] Please refer to Figure 4 , Figure 4 is the flowchart of the fourth embodiment of the battery power detection method of the present application. There are historical remaining power Qc, historical storage power Q0, theoretical power Q1, first difference △1, second difference △2, first reset amount q1, second reset amount q2, power reset threshold P1, to realize power reset and self-calibration in the standby state of the motor.
[0080] In an optional embodiment, in response to the motor being in a running state, the step of determining the power consumption time parameter based on the historical remaining power includes:
[0081] In some embodiments, in response to the historical remaining power being greater than a first preset value, the power consumption reference parameter and the motor phase current are obtained.
[0082] The first preset value can be 50% power, 30% power, or 25% power. At this time, the battery chemical reaction is relatively stable, and the power consumption can be easily determined, so that the power consumption corresponding to the corresponding power in the corresponding running time period can be finely divided to realize dynamic power decrease.
[0083] The power consumption reference parameter T0 is set as a constant, which can be an empirical value. The motor phase current refers to the current flowing through each phase winding in a three-phase alternating current motor, which is a value that can be directly obtained by a motor driver without adding an additional current sensor. According to Joule's law, the energy consumption of the motor is proportional to the square of the current, and the motor phase current is directly related to the load. When the load increases, the motor needs to output more power, so the phase current of the motor increases. Therefore, the size of the phase current can more accurately reflect the consumption of the battery power.
[0084] Based on the motor phase current, the power consumption adjustment parameter is determined; and based on the power consumption reference parameter and the power consumption adjustment parameter, the power consumption time parameter is determined.
[0085] The first power consumption adjustment parameter t1 is obtained by the size of the motor phase current, and there is a pre-stored relationship table between the motor phase current and the first power consumption adjustment parameter t1. Therefore, when the historical remaining power is greater than the first preset value, the power consumption time parameter is obtained .
[0086] In some embodiments, in response to the historical remaining power being less than the first preset value, the power consumption time parameter is determined based on the historical remaining power and a second preset value.
[0087] When the historical remaining power is less than the first preset value, the chemical reaction of the battery is more likely to occur, and the power consumption speed is accelerated, so the accuracy of the power consumption time can be reduced at this time, and the power consumption time parameter is determined as a specific value, which is convenient for calculating the current remaining power.
[0088] At this time, the second power consumption adjustment parameter t2 can be determined, and the power consumption time parameter .
[0089] A second preset value is set based on the power consumption curve of the battery. The second preset value can be a power value indicating that the battery is at a very low power, which can be 20% power, 15% power, 10% power, 5% power, etc.
[0090] When the historical remaining power is less than the first preset value and less than the second preset value, a third power consumption adjustment parameter t3 can be determined at this time, and the power consumption time parameter .
[0091] Please refer to Figure 5 , Figure 5 is the flowchart of the fifth embodiment of the battery power detection method of the present application.
[0092] In an optional embodiment, based on the power consumption time parameter and the historical remaining power, the step of determining the current remaining power comprises:
[0093] S401: Accumulate the running time of the motor;
[0094] S402: In response to the running time being greater than the power consumption time parameter, determine the current remaining power as the value of the historical remaining power minus the predetermined power consumption, and clear the running time.
[0095] When the motor running time meets the power consumption time parameter, it proves that the battery consumes a certain amount of power in this running time period, and when the current remaining power is updated, the power consumption time parameter needs to be determined again to adjust the dynamic power decrease.
[0096] In some embodiments, S403: In response to the motor being in a running state within a predetermined time range, determine the historical remaining power of the current running time period based on the current remaining power of the previous running time period.
[0097] When the motor starts running, the historical remaining power is determined based on the standby test correction, and when the motor is in a running state, the current remaining power is continuously updated, so the current remaining power of the previous running time period is directly used as the historical remaining power, and the power consumption time parameter is determined again.
[0098] Please refer to Figure 6 , Figure 6is a flowchart of the sixth embodiment of the battery power detection method of the present application.
[0099] The remaining power Qc, the power consumption reference parameter T0, the power consumption time parameter T, the first power consumption adjustment parameter t1, the second power consumption adjustment parameter t2, the third power consumption adjustment parameter t3, the running time Td, and the motor phase current Iout are configured to realize the dynamic decrease of the power of the motor in the running state.
[0100] In the above manner, the battery power detection method is provided, which can correct the power or detect the dynamic power consumption according to different motor states and battery power supply states. In the standby state of the motor stop running, the bus voltage and the historical stored power are obtained, and the original power is calibrated and reset to a certain extent according to the characteristic curve of the battery voltage at different discharge depths. In the running state of the motor, the power consumption time parameter is obtained according to the size of the bus voltage and the motor phase current and the accumulation of the running time, the remaining power of the battery is accurately estimated, the battery life is effectively improved, the situation of insufficient power during the running of the motor is effectively avoided, and the reliability and user experience of the equipment are improved. According to the hardware design characteristics of the common motor driver on the market, the battery power is estimated without relying on the acquisition of the battery discharge current, without the need to increase the bus current detection and additional acquisition circuit, and the hardware cost is reduced.
[0101] The second aspect of the present application provides an electronic device 100, please refer to Figure 7 , Figure 7 is a structural schematic diagram of an embodiment of the electronic device of the present application.
[0102] To solve the above technical problems, the second aspect of the present application provides an electronic device 100, wherein the electronic device 100 comprises a battery 101, a motor 102, a processor 103, and a memory 104; the battery 101 is electrically connected with the motor 102, and is used to supply power for the motor 102; the memory 104 is used to store computer program instructions, and the processor 103 executes the computer program instructions to realize the detection method of any one of the above.
[0103] The processor 103 can be built-in in the motor 102 or coupled with the motor 102. In some embodiments, the motor driver built-in in the motor 102 can execute the computer program instructions as a kind of processor 103 to realize the detection method of any one of the above, and the memory 104 can also be included in the motor 102, so that the power of the battery 101 can be directly detected by the motor 102 in the electronic device.
[0104] In an optional embodiment, the memory 104 is also coupled with the motor 102, and is used to store the historical stored power and other power data and motor running data for detecting the power.
[0105] In some embodiments, the electronic device 100 can be a kind of non-road low-speed electric vehicle (such as a golf cart, a scenic sightseeing vehicle, an industrial park carrier, an agricultural transport vehicle, a sanitation operation vehicle, etc.). Due to its low speed, short distance, and light load characteristics, it is widely used in scenic spots, industrial parks, farms, and urban short-distance transportation scenarios. Such electric vehicles have high requirements for the cost, reliability, and environmental adaptability of the battery 101, while the demand for energy density and range is relatively low. Lead-acid batteries have become the preferred power source for such vehicles due to their low cost, high safety, mature technology, and easy maintenance. Through the battery power detection method of the present application, the current remaining power of the vehicle can be accurately and effectively determined, ensuring the long-term and safe operation of the vehicle, and improving the practical value of lead-acid batteries.
[0106] The third aspect of the present application provides a computer readable storage medium 200. Please refer to Figure 8 , Figure 8 is a structural schematic diagram of an embodiment of the computer readable storage medium of the present application.
[0107] The computer readable storage medium 200 of the present embodiment stores program instructions 201, which can be executed to perform the battery power detection method described above. The computer readable storage medium 200 can be a hard disk, a storage chip, an SD card, an optical disc, etc. in an electronic device, or a cloud server, etc.
[0108] Unlike the prior art, the present application provides a battery power detection method, device, and computer readable storage medium.
[0109] In the several embodiments provided by the present application, it should be understood that the disclosed system, device, can be implemented in other ways. Obviously, the embodiments described above are only a part of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of the present application. For example, the above-described device embodiments are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual ones can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0110] It should be noted that if the embodiments of the present application involve directionality indication (such as up, down, left, right, front, back, etc.), the directionality indication is only used to explain the relative position relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directionality indication also changes accordingly.
[0111] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "coupling", "connecting", "connecting", "setting", "installing" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication inside two elements. For those skilled in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0112] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0113] In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the fact that a person skilled in the art can realize it, and when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor is it within the scope of protection claimed by the present application.
[0114] The above is only the embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method of detecting battery power, comprising: The battery is used to power the motor, and the detection method comprises: obtaining motor state and battery power supply state; wherein the motor state comprises standby state and running state, and the battery power supply state comprises initial power-on and non-initial power-on state; based on the motor state and the battery power supply state, the historical remaining capacity is obtained, including: in response to the motor state being the standby state, the bus voltage is obtained; based on the bus voltage, the theoretical capacity is determined; based on the battery power supply state and the theoretical capacity, the historical remaining capacity is determined, specifically including: in response to the battery power supply state being the initial power-on state, the historical storage capacity is obtained, and the historical remaining capacity is determined based on the historical storage capacity and the theoretical capacity; in response to the battery power supply state being the non-initial power-on state, the historical remaining capacity is obtained; based on the historical remaining capacity and the theoretical capacity, the historical remaining capacity is corrected; in response to the motor being in the running state, the power consumption time parameter is determined based on the historical remaining capacity; based on the power consumption time parameter and the historical remaining capacity, the current remaining capacity is determined.
2. The detection method according to claim 1, characterized in that, The detection method further comprises: in response to the motor power failure, the current remaining capacity is stored as the historical storage capacity.
3. The method of claim 1, wherein, The step of obtaining the historical storage capacity in response to the battery power supply state being the initial power-on state and determining the historical remaining capacity based on the historical storage capacity and the theoretical capacity comprises: in response to the historical storage capacity being greater than the capacity reset threshold, the historical remaining capacity is the historical storage capacity; and / or, in response to the bus voltage being greater than the battery full voltage, it is confirmed that the historical remaining capacity is full; and / or, a first difference value is obtained based on the theoretical capacity and the historical storage capacity; a first reset value is obtained based on the first difference value; and the historical remaining capacity is determined based on the historical storage capacity and the first reset value.
4. The method of claim 1, wherein The step of correcting the historical remaining capacity based on the historical remaining capacity and the theoretical capacity in response to the battery power supply state being the non-initial power-on state comprises: in response to the historical remaining capacity being greater than the theoretical capacity, a second difference value is obtained based on the historical remaining capacity and the theoretical capacity; a second reset value is obtained based on the second difference value; the corrected historical remaining capacity is determined based on the historical remaining capacity and the second reset value.
5. The method of claim 1, wherein The step of determining the power consumption time parameter based on the historical remaining capacity in response to the motor being in the running state comprises: in response to the historical remaining capacity being greater than a first preset value, a power consumption reference parameter and a motor phase current are obtained; a power consumption adjustment parameter is determined based on the motor phase current; the power consumption time parameter is determined based on the power consumption reference parameter and the power consumption adjustment parameter.
6. The detection method according to claim 5, characterized in that, The detection method further comprises: in response to the remaining capacity being less than a first preset value, the power consumption time parameter is determined based on the historical remaining capacity and a second preset value; wherein the second preset value is less than the first preset value.
7. The method of claim 1, wherein, The step of determining the current remaining capacity based on the power consumption time parameter and the historical remaining capacity comprises: accumulating a running time of the motor; in response to the running time being greater than the power consumption time parameter, determining the current residual power as a value of the historical residual power minus a predetermined power consumption, and clearing the running time.
8. The method of claim 1, wherein, the step of obtaining the historical residual power based on the motor state and the battery power supply state comprises: in response to the motor being in the running state within a predetermined time range, determining the historical residual power of a current running time period based on the current residual power of a previous running time period.
9. An electronic device, comprising: The electronic device comprises a battery, a motor, a processor and a memory; the battery and the motor are electrically connected, and the battery is configured to supply power to the motor; the battery and the processor are coupled to each other, the processor and the memory are coupled to each other, the memory is configured to store computer program instructions, and the processor is configured to execute the computer program instructions to implement the detection method according to any one of claims 1-8 when working.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions can be executed by the processor to implement the detection method according to any one of claims 1-8.
Citation Information
Patent Citations
Electric vehicle battery capacity monitoring method and device and electric vehicle monitoring system
CN115524622A
Method for estimating residual capacity of on-vehicle battery
JP2001004723A