Battery electric quantity detection method and device, and computer readable storage medium
By obtaining the motor status and battery power status, and correcting the battery power based on historical remaining power and power consumption time parameters, the problem of inaccurate battery power detection is solved, and accurate battery power estimation is achieved, thereby improving battery life and device reliability.
Patent Information
- Application Number
- CN202511182174.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-22
AI Technical Summary
Inaccurate battery charge detection can easily lead to overcharging or over-discharging, increasing user replacement costs and wasting resources, and affecting the service life and reliability of batteries and electronic devices.
By obtaining the motor status and battery power status, the remaining battery capacity is accurately estimated based on historical remaining capacity and power consumption time parameters. The capacity is corrected according to the motor status and bus voltage, reducing dependence on battery discharge current and avoiding increased hardware costs.
It achieves accurate detection of battery power, avoids insufficient power, improves battery life and equipment reliability, and reduces hardware costs.
Smart Images

Figure CN120669136A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a method for detecting battery power, a device thereof, and a computer-readable storage medium. Background Art
[0002] In modern industry and daily life, motor-driven electronic devices are widely used in various scenarios. The efficient operation of electronic devices depends on a stable power supply. Batteries, as an important energy storage device, provide a flexible and convenient power source for these electronic devices.
[0003] Battery charge is easily affected by various external factors, including operating conditions and ambient temperature. Inaccurate battery charge monitoring can easily lead to overcharging or over-discharging, accelerating battery aging, increasing replacement costs, and wasting resources. Accurate battery charge monitoring helps users intuitively understand the battery's power status and choose the appropriate charging time, extending the lifespan of batteries and electronic devices.
[0004] Therefore, establishing an accurate and effective battery power detection method is of great significance to ensuring the long-term and safe operation of the vehicle and improving the practical value of the battery. Summary of the Invention
[0005] The present application provides a battery power detection method and its 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 battery life, effectively avoid insufficient power during motor operation, and improve device reliability and user experience.
[0006] To solve the above technical problems, the first aspect of the present application provides a method for detecting battery power, wherein the battery is used to power a motor, and the detection method includes: obtaining the motor status and the battery power status; obtaining the historical remaining power based on the motor status and the battery power status; in response to the motor being in the running state, determining the power consumption time parameter based on the historical remaining power; and determining the current remaining power based on the power consumption time parameter and the historical remaining power.
[0007] Among them, the step of obtaining the historical remaining power based on the motor status and the battery power supply status includes: obtaining the bus voltage in response to the motor status being 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 status and the theoretical power.
[0008] The step of determining the historical remaining power based on the battery power status and the theoretical power includes: obtaining the historical stored power in response to the battery power status being the first power-on; and determining the historical remaining power based on the historical stored power and the theoretical power.
[0009] In response to the motor losing power, the current remaining power is stored as the historical storage power.
[0010] Among them, the step of determining the historical remaining power based on the historical stored power and the theoretical power includes: in response to the historical stored power being greater than the power reset threshold, the historical remaining power is the historical stored power; and / or, in response to the bus voltage being greater than the battery full-charge voltage, confirming that the historical remaining power is fully charged; and / or, obtaining a first difference based on the theoretical power and the historical stored power; obtaining a first reset value based on the first difference; and determining the historical remaining power based on the historical stored power and the first reset value.
[0011] Among them, the step of determining the historical remaining power based on the battery power status and the theoretical power includes: obtaining the historical remaining power in response to the battery power status being a non-initial power-on state; and correcting the historical remaining power based on the historical remaining power and the theoretical power.
[0012] Among them, in response to the battery power supply state being a non-initial power-on state, the step of correcting the historical remaining power based on the historical remaining power and the theoretical power includes: in response to the historical remaining power being greater than the theoretical power, obtaining a second difference based on the historical remaining power and the theoretical power; obtaining a second reset value based on the second difference; and determining the corrected historical remaining power based on the historical remaining power and the second reset value.
[0013] Among them, in response to the motor being in the running state, the step of determining the power consumption time parameter based on the historical remaining power includes: in response to the historical remaining power being greater than a first preset value, obtaining the power consumption reference parameter and the motor phase current; based on the motor phase current, determining the power consumption adjustment parameter; based on the power consumption reference parameter and the power consumption adjustment parameter, determining the power consumption time parameter.
[0014] Among them, in response to the motor being in the running state, the step of determining the power consumption time parameter based on the historical remaining power includes: in response to the historical remaining power being less than the first preset value, determining the power consumption time parameter based on the historical remaining power and the second preset value.
[0015] Among them, based on the power consumption time parameter and the historical remaining power, the step of determining the current remaining power includes: accumulating the running time of the motor; in response to the running time being greater than the power consumption time parameter, determining the current remaining power to be the value of the historical remaining power minus the predetermined power consumption, and clearing the running time to zero.
[0016] Among them, the step of obtaining the historical remaining 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, determining the historical remaining power of the current running time period based on the current remaining power of the previous running time period.
[0017] In order to solve the above technical problems, the second aspect of the present application provides an electronic device, wherein the electronic device includes a battery, a motor, a processor, and a memory; the battery is electrically connected to the motor to power the motor; the battery and the processor are coupled to each other, and the processor and the memory are coupled to each other, and the memory is used to store computer program instructions, and the processor executes the computer program instructions when working to implement any of the above detection methods.
[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 a processor to implement any of the above detection methods.
[0019] Different from the existing technology, the battery charge detection method and device provided in this application, as well as a computer-readable storage medium, can accurately estimate the remaining battery charge by performing charge correction or dynamic power consumption detection based on different motor states and battery power supply states, effectively improving battery life, effectively avoiding low battery conditions during motor operation, and improving device reliability and user experience. Estimating battery charge does not rely on obtaining battery discharge current, eliminating the need for additional bus current detection and acquisition circuitry, reducing hardware costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flow chart of a first embodiment of the method for detecting battery power of the present application; Figure 2 This is a flow chart of a second embodiment of the method for detecting battery power of the present application; Figure 3 This is a flow chart of a third embodiment of the method for detecting battery power of the present application; Figure 4 1 is a flow chart of a fourth embodiment of the method for detecting battery power of the present application; Figure 5 This is a flowchart of a fifth embodiment of the method for detecting battery power of the present application; Figure 6 This is a flow chart of a sixth embodiment of the method for detecting battery power of the present application; Figure 7 This is a schematic structural diagram of an embodiment of the electronic device of the present application; Figure 8 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0021] The present application is described in detail below with reference to the accompanying drawings and implementation methods.
[0022] This application first provides a battery power detection method, please refer to Figure 1 , Figure 1 It is a flowchart of the first embodiment of the battery power detection method of the present application.
[0023] Among them, the detection methods include: S101: Acquire motor status and battery power status.
[0024] The motor is electrically connected to the battery. When the battery powers the motor, regardless of whether the motor is running or in standby, the motor driver of the motor can collect motor status information, battery status information and the driver's own status information through various internal sensors and feedback mechanisms. The motor status information may 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 status can be obtained. The motor driver also obtains battery status information and its own status information. After processing and algorithm calculation, the actual battery power supply status can be obtained. The battery power supply status may include power-on status, etc. When the motor driver completes the initialization self-test and confirms that the battery is normal and ready to power the vehicle, it means that the battery power supply status is that power-on has been completed, and the motor driver can also record control instructions to achieve closed-loop control.
[0025] S102: Obtain historical remaining power based on the motor status and the battery power supply status.
[0026] The accurate historical remaining power provides a calculation benchmark for the current remaining power, which can more accurately estimate the battery charge and discharge capacity and the current remaining power.
[0027] The battery charge level is a dynamic process. Due to battery characteristics, a battery that has not been used for a long time will self-discharge, causing the charge to decrease. Charging the battery after the device is turned off or in standby mode can also cause the charge to increase. The battery load will change when the motor moves at different power levels, causing the charge to fluctuate. In addition, due to temperature influences or battery aging, the historical remaining charge level obtained in these cases may be inaccurate. Based on the motor status and battery power supply status, the historical remaining charge level needs to be corrected or reset to obtain an accurate historical remaining charge level.
[0028] S103: In response to the motor being in the running state, determining a power consumption time parameter based on historical remaining power.
[0029] When the motor is running, the battery provides power, which consumes more power and reduces the power consumption. To a certain extent, due to the chemical characteristics of the battery, the power consumption time parameter setting corresponds to the battery power. In particular, when the battery power is low, its voltage drops faster, resulting in an increased discharge rate. Therefore, 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 motion state. When the motor power is higher, the power consumption will be greater. This can be determined based on a relationship curve pre-established and stored in the motor driver.
[0030] S104: Determine the current remaining power based on the power consumption time parameter and the historical remaining power.
[0031] When the motor's operating time meets the power consumption time parameter, it proves that the battery has consumed a certain amount of power. The current remaining power is then updated based on the historical remaining power. This can more accurately estimate the battery power, optimize battery life, and improve motor performance, thereby improving the overall performance of the device and user experience. It can be applied in various application scenarios, including electric vehicles, industrial production machinery, water pumps, and other equipment.
[0032] See also Figure 2 , Figure 2 It is a flow chart of the second embodiment of the battery power detection method of the present application.
[0033] In an optional embodiment, the step of obtaining the historical remaining power based on the motor state and the battery power supply state includes: S201: Acquire motor status and battery power status.
[0034] S202: In response to the motor being in the standby state, obtaining a bus voltage.
[0035] S203: Determine theoretical power based on the bus voltage.
[0036] The upper bus voltage is set to be the DC bus voltage of the motor driver, which is the voltage of the battery output voltage after being stepped up or down, and is used to drive the motor.
[0037] There is a certain relationship between the bus voltage of the battery and the remaining power of the battery. According to the principle of the open circuit voltage method, the relationship curve between the bus voltage and power is obtained and pre-stored in the motor driver. The theoretical power is calculated by the bus voltage value.
[0038] S204: Determine the historical remaining power based on the battery power status and the theoretical power.
[0039] When the motor is in standby mode, the power fluctuation is generally small. When the theoretical power obtained does not match the battery power status, it is likely that the battery has not been used for a long time, resulting in a decrease in power, or after the device is turned off or in standby mode, charging the battery will also cause the power to increase. At this time, the historical remaining power obtained is likely to be inaccurate. The historical remaining power needs to be corrected or reset to obtain an accurate historical remaining power.
[0040] See also Figure 3 , Figure 3 It is a flowchart of the third embodiment of the battery power detection method of the present application.
[0041] In an optional embodiment, the step of determining the historical remaining power based on the battery power status and the theoretical power includes: S301: Acquire motor status and battery power status.
[0042] S302: In response to the battery power supply state being the first power-on state, obtaining historical stored power.
[0043] The electronic control obtains battery status information and its own status information, and can obtain the actual battery power supply status. The battery power supply status may include power-on status, etc. When the motor driver completes the initialization self-test and confirms that the battery is normal and ready to power the vehicle, it means that the battery power supply status has been powered on.
[0044] In some embodiments, the battery power supply state may include initial power-on and non-initial power-on. The battery power supply state is initial power-on when the device is powered on from a completely power-off state and the battery driver completes initialization and self-tests to confirm that the battery is properly powered. The battery power supply state is non-initial power-on when the device has previously completed a power-on process and the driver directly returns to the previous working state when it is powered on again.
[0045] S303: Determine the historical remaining power based on the historical stored power and the theoretical power.
[0046] When the power is first turned on, the motor driver has not yet generated the control command for the motor to run. In order to prevent the battery from fluctuating due to charging, self-power failure, damage or replacement, the historical remaining power will be corrected based on the historical stored power and theoretical power to achieve initialization when powered on.
[0047] Among them, S304: in response to the motor losing power, storing the current remaining power as the historical stored power.
[0048] When the battery is charging or the device is shut down, the motor loses power and the historically stored power will be stored in a non-volatile storage until the next time the device is powered on and the battery power supply state is the initial power-on, and the motor driver obtains it. This non-volatile storage can be a readable storage medium that comes with the motor driver or is coupled to another motor driver. In other embodiments, the historically stored power can be updated and stored synchronously when the current remaining power is updated.
[0049] S305: In response to the battery power supply state being a non-initial power-on state, obtaining historical remaining power.
[0050] S306: Correcting the historical remaining power based on the historical remaining power and the theoretical power.
[0051] After the motor has run, it is in standby state. It is considered that the battery power supply state is not the first power-on state. The motor driver has obtained the current remaining power. The current remaining power at this time is used as the historical remaining power and power correction is performed.
[0052] In an optional implementation, determining the historical remaining power based on the historical stored power and the theoretical power in step S303 specifically includes: 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; To meet actual application needs, when the historical stored power obtained at the first 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 very small at this time and users generally do not arrange to charge the battery. Therefore, the setting does not restore the displayed current remaining power to avoid affecting the user experience.
[0053] The power reset threshold can be 98% power, 95% power, 92% power, 90% power, 85% power, etc., and can be set according to the battery capacity or the operating conditions of the motor.
[0054] Alternatively, when the historical stored power is less than the power reset threshold, it is considered that charging may occur at this time, or the motor state changes causing the power to rise or fall, and inspection and correction reset are required.
[0055] In other embodiments, when the historically stored power level is less than the power reset threshold, in order to ensure user experience, the power level may be set to be corrected only downwards, without being corrected upwards.
[0056] In some embodiments, in response to the bus voltage being greater than the battery full-charge voltage, the historical remaining capacity is confirmed to be fully charged.
[0057] During the charging process, the battery receives a voltage from the charger that is higher than the battery's full-charge voltage to ensure that the external charging current can flow into the battery. When the bus voltage reaches or exceeds the battery's full-charge voltage, the battery is considered to be nearly fully charged.
[0058] In some embodiments, a first difference is obtained based on the theoretical power and the historical stored power; a first reset value is obtained based on the first difference; and a historical remaining power is determined based on the historical stored power and the first reset value.
[0059] You can set the historical stored power as Q0 and the theoretical power as Q1 to calculate the first difference , calculate the first reset quantity q1 according to △1, so the historical remaining power is .
[0060] The relationship between △1 and q1 is an empirical value. In some embodiments, , specifically it can be , or In other embodiments, it may also be , where a1 and b1 are empirical values.
[0061] In an optional embodiment, in response to the battery power supply state being a non-initial power-on state, the step of correcting the historical remaining power based on the historical remaining power and the theoretical power in step S306 specifically includes: In response to the historical remaining power being greater than the theoretical power, a second difference is obtained based on the historical remaining power and the theoretical power; a second reset value is obtained based on the second difference; and a corrected historical remaining power is determined based on the historical remaining power and the second reset value.
[0062] In some embodiments, the second difference is calculated by setting the historical remaining power as Qc and the theoretical power as Q1. , calculate the second reset amount q2 based on △2, so the historical remaining power is .
[0063] The relationship between Δ2 and q2 is an empirical value. In some embodiments, it is set , specifically it can be In other embodiments, it may also be , where a2 and b2 are empirical values.
[0064] Each time the motor is in standby mode, the battery needs to delay for a certain period of time due to the influence of the load, that is, the motor state, and collect the bus voltage again to obtain the theoretical voltage for correction.
[0065] Understandably, since the motor has just stopped running or been powered on, the idle time is very short. The bus voltage obtained at this time is actually not completely suitable for obtaining the battery power based on the open circuit voltage method. In order to effectively shorten the idle time, it is necessary to measure the reset amount through empirical values and to check or correct the historical remaining power.
[0066] Please refer to Figure 4 , Figure 4 This is a flowchart of the fourth embodiment of the battery charge detection method of the present application. The method sets the historical remaining charge Qc, the historical stored charge Q0, the theoretical charge Q1, the first difference △1, the second difference △2, the first reset amount q1, the second reset amount q2, and the charge reset threshold P1 to achieve charge reset and self-calibration when the motor is in standby mode.
[0067] In an optional embodiment, in response to the motor being in the running state, the step of determining the power consumption time parameter based on the historical remaining power includes: In some embodiments, in response to the historical remaining power being greater than a first preset value, obtaining a power consumption reference parameter and a motor phase current; Among them, the first preset value can be 50% power, 30% power, and 25% power. At this time, the battery chemical reaction is relatively stable, and the power consumption is easy to determine. The power consumption of the corresponding power in the corresponding operating time period can be finely divided to achieve dynamic power reduction.
[0068] Set the power consumption baseline parameter T0 to 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 AC motor. It is a value that the motor driver can directly obtain, without the need for additional current sensors. According to Joule's law, the motor's energy consumption is proportional to the square of the current. The motor's phase current is directly related to the load. When the load increases, the motor needs to output more power, so the phase current increases. Therefore, the magnitude of the phase current can more accurately reflect the battery consumption.
[0069] Based on the motor phase current, the power consumption adjustment parameter is determined; based on the power consumption reference parameter and the power consumption adjustment parameter, the power consumption time parameter is determined.
[0070] The first power consumption adjustment parameter t1 is obtained by the magnitude of the motor phase current. There is a pre-stored relationship table between the motor phase current and the first power consumption adjustment parameter t1. When the historical remaining power is greater than the first preset value, the power consumption time parameter is obtained. .
[0071] In some embodiments, in response to the historical remaining power being less than a first preset value, a power consumption time parameter is determined based on the historical remaining power and a second preset value.
[0072] 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 decreases faster. Therefore, the accuracy of the power consumption time can be reduced at this time, and the power consumption time parameter can be determined to be a specific value to facilitate the calculation of the current remaining power.
[0073] At this time, the second power consumption adjustment parameter t2 can be determined, and the power consumption time parameter .
[0074] A second preset value is set based on the battery power consumption curve. The second preset value may be a power value indicating that the battery is at an extremely low power level, such as 20% power, 15% power, 10% power, 5% power, etc.
[0075] 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, and the power consumption time parameter is .
[0076] See also Figure 5 , Figure 5 This is a flowchart of the fifth embodiment of the battery power detection method of the present application.
[0077] In an optional embodiment, the step of determining the current remaining power based on the power consumption time parameter and the historical remaining power includes: S401: Accumulate the running time of the motor; S402: In response to the operating time being greater than the power consumption time parameter, determining the current remaining power to be the value of the historical remaining power minus the predetermined power consumption, and resetting the operating time.
[0078] When the motor running time meets the power consumption time parameter, it proves that the battery has consumed a certain amount of power during this running time period. When the current remaining power is updated, the power consumption time parameter needs to be re-determined to adjust the dynamic power reduction.
[0079] In some embodiments, S403 : in response to the motor being in the operating state within a predetermined time range, determining a historical remaining power of the current operating time period based on the current remaining power of the previous operating time period.
[0080] When the motor starts running, the historical remaining power is determined based on the inspection and correction during standby. When the motor is in operation, the current remaining power is continuously updated, so the current remaining power of the previous operating time period is directly used as the historical remaining power, and the power consumption time parameters are re-determined.
[0081] See also Figure 6 , Figure 6 It is a flow chart of the sixth embodiment of the battery power detection method of the present application.
[0082] The remaining power Qc, power consumption reference parameter T0, power consumption time parameter T, first power consumption adjustment parameter t1, second power consumption adjustment parameter t2, third power consumption adjustment parameter t3, running time Td, and motor phase current Iout are set to realize dynamic reduction of power of the motor in the running state.
[0083] Through the above method, a battery power detection method is provided, which can perform power correction or dynamic power consumption detection according to different motor states and battery power supply states. When the motor stops running and is in standby state, by obtaining the bus voltage and historical stored power, the original power is calibrated and reset to a certain extent according to the characteristic curve of different battery discharge depths and battery voltage. When the motor is running, the power consumption time parameter is obtained based on the bus voltage and motor phase current, as well as the accumulated running time, and the remaining battery power is accurately estimated, effectively improving the battery life. It can effectively avoid the occurrence of insufficient power during motor operation, and improve the reliability of the equipment and user experience. Based on the hardware design characteristics of the common motor drivers on the market, it does not rely on obtaining the battery discharge current to estimate the battery power, and there is no need to add bus current detection and additional acquisition circuits, thereby reducing hardware costs.
[0084] The second aspect of the present application provides an electronic device 100, please refer to Figure 7 , Figure 7 It is a structural diagram of an embodiment of the electronic device of the present application.
[0085] In order to solve the above technical problems, the second aspect of the present application provides an electronic device 100, wherein the electronic device 100 includes a battery 101, a motor 102, a processor 103, and a memory 104; the battery 101 is electrically connected to the motor 102 for powering the motor 102; the memory 104 is used to store computer program instructions, and the processor 103 executes the computer program instructions when working to implement any of the above detection methods.
[0086] The processor 103 can be built into the motor 102 or coupled to the motor 102. In some embodiments, the motor driver built into the motor 102 can be used as a processor 103 to execute computer program instructions to implement any of the above-mentioned detection methods. The motor 102 can also include a memory 104, so that the electronic device can directly detect the power level of the battery 101 only through the motor 102.
[0087] In an optional embodiment, the memory 104 is further coupled to the motor 102 for storing power data such as historical stored power and motor operation data for detecting power.
[0088] In some embodiments, the electronic device 100 may be an off-road, low-speed electric vehicle (such as a golf cart, a scenic sightseeing vehicle, an industrial park transport vehicle, an agricultural transport vehicle, a sanitation vehicle, etc.). Due to its low speed, short distance, and light load characteristics, it is widely used in scenic areas, industrial parks, farms, urban short-distance transportation, and other scenarios. This type of electric vehicle has high requirements for the cost, reliability, and environmental adaptability of the battery 101, but relatively low requirements for energy density and cruising range. Lead-acid batteries have become the preferred power source for such vehicles due to their low cost, high safety, mature technology, and easy maintenance. The battery power detection method of the present application can accurately and effectively determine the current remaining power of the vehicle, ensuring the long-term and safe operation of the entire vehicle, while also enhancing the practical value of the lead-acid battery.
[0089] The third aspect of the present application provides a computer readable storage medium 200. Figure 8 , Figure 8 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application.
[0090] The computer-readable storage medium 200 of this embodiment stores program instructions 201, and the program instructions 201 can be executed as any of the above-mentioned battery power detection methods. The computer-readable storage medium 200 can be a readable and writable storage tool such as a hard disk, storage chip, SD card, optical disk, etc. in an electronic device, or it can be a cloud server, etc.
[0091] Different from the prior art, the present application provides a battery power detection method and device, and a computer-readable storage medium.
[0092] In the several embodiments provided in this application, it should be understood that the disclosed systems and devices can be implemented in other ways. For the technical solutions in the embodiments of this application, it is obvious that the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. For example, the device implementation methods described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0093] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), such directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0094] In the description of this application, it should be noted that, unless otherwise expressly specified or limited, the terms "coupled," "connected," "connected," "set," and "installed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0095] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
[0096] In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0097] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for detecting battery power, characterized in that: The battery is used to power the motor, and the detection method includes: Get the motor status and battery power status; Obtaining historical remaining power based on the motor state and the battery power supply state; In response to the motor being in the running state, determining a power consumption time parameter based on the historical remaining power; The current remaining power is determined based on the power consumption time parameter and the historical remaining power.
2. The detection method according to claim 1, characterized in that The step of obtaining a historical remaining power based on the motor state and the battery power supply state includes: In response to the motor being in a standby state, obtaining a bus voltage; determining a theoretical amount of electricity based on the bus voltage; The historical remaining power is determined based on the battery power status and the theoretical power.
3. The detection method according to claim 2, characterized in that The step of determining the historical remaining power based on the battery power status and the theoretical power includes: In response to the battery being powered on for the first time, obtaining historical stored power; The historical remaining power is determined based on the historical stored power and the theoretical power.
4. The detection method according to any one of claims 1 to 3, characterized in that The detection method further includes: in response to the motor losing power, storing the current remaining power as a historical stored power.
5. The detection method according to claim 3, characterized in that The step of determining the historical remaining 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 remaining power being the historical stored power; and / or, In response to the bus voltage being greater than the battery full-charge voltage, confirming that the historical remaining capacity is fully charged; and / or, A first difference is obtained based on the theoretical power and the historical stored power; a first reset value is obtained based on the first difference; and a historical remaining power is determined based on the historical stored power and the first reset value.
6. The detection method according to claim 2, characterized in that The step of determining the historical remaining power based on the battery power status and the theoretical power includes: In response to the battery power supply state being a non-initial power-on state, obtaining a historical remaining power; The historical remaining power is corrected based on the historical remaining power and the theoretical power.
7. The detection method according to claim 6, characterized in that In response to the battery power supply state being a non-initial power-on state, the step of correcting the historical remaining power based on the historical remaining power and the theoretical power includes: In response to the historical remaining power being greater than the theoretical power, obtaining a second difference based on the historical remaining power and the theoretical power; obtaining a second reset value based on the second difference; A corrected historical remaining power is determined based on the historical remaining power and the second reset value.
8. The detection method according to claim 1, wherein In response to the motor being in the running state, the step of determining the power consumption time parameter based on the historical remaining power includes: In response to the historical remaining power being greater than a first preset value, obtaining a power consumption reference parameter and a motor phase current; determining a power consumption adjustment parameter based on the motor phase current; A power consumption time parameter is determined based on the power consumption reference parameter and the power consumption adjustment parameter.
9. The detection method according to claim 1, wherein In response to the motor being in the running state, the step of determining the power consumption time parameter based on the historical remaining power includes: In response to the remaining power being less than a first preset value, the power consumption time parameter is determined based on the historical remaining power and a second preset value.
10. The detection method according to claim 1, characterized in that The step of determining the current remaining power based on the power consumption time parameter and the historical remaining power includes: accumulating the running time of the motor; In response to the running time being greater than the power consumption time parameter, the current remaining power is determined to be a value obtained by subtracting a predetermined power consumption from the historical remaining power, and the running time is reset to zero.
11. The detection method according to claim 1, characterized in that The step of obtaining a historical remaining power based on the motor state and the battery power supply state includes: In response to the motor being in the operating state within a predetermined time range, the historical remaining power of the current operating time period is determined based on the current remaining power of the previous operating time period.
12. An electronic device, characterized in that: The electronic device includes a battery, a motor, a processor, and a memory; the battery is electrically connected to the motor for powering 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 used to store computer program instructions, and the processor executes the computer program instructions when working to implement the detection method according to any one of claims 1 to 11.
13. 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 a processor to implement the detection method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method and device for detecting battery remaining capacity of electric vehicle
CN103558560A
Electric vehicle battery capacity monitoring method and device and electric vehicle monitoring system
CN115524622A
Method for estimating residual capacity of on-vehicle battery
JP2001004723A
Remaining battery amount estimation device of electric vehicle
JP2012239290A
Electric charging apparatus, electronic apparatus, residual battery capacity detection method and battery residual capacity display control method
US20040150368A1