Method, device and program product for power balancing of dual batteries of a drone
By acquiring battery parameters in real time through the dual-battery system of the drone, and using a dynamic equalization control method optimized by recursive least squares and sliding time window, the problems of battery internal resistance mismatch and static equalization scheme lag were solved, achieving precise current distribution and efficient energy utilization, thereby improving endurance and system adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEILONGJIANG HUIDA TECHNOLOGY CO LTD
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-31
AI Technical Summary
Existing dual-battery systems for drones suffer from internal resistance mismatch due to differences in battery manufacturing tolerances and cycle counts, resulting in uneven current distribution. This causes some batteries to prematurely trigger over-discharge protection, leading to significant energy waste. Furthermore, existing static balancing solutions lack real-time online identification capabilities, making it difficult to achieve precise synchronization under high-dynamic flight loads.
A recursive least squares identification model with a forgetting factor is adopted to obtain the terminal voltage, output current and shell temperature of the dual batteries in real time, calculate the equivalent resistance and current available capacity of each battery, and perform weighted discharge current allocation based on this. Dynamic current adjustment is achieved through a bidirectional power regulation module. Combined with sliding time window and forgetting factor optimization, the control strategy is adaptively adjusted.
It achieves precise current distribution under high dynamic loads, avoids the risk of over-discharge, improves energy utilization and flight endurance, ensures the robustness and adaptability of the battery throughout its entire life cycle, and significantly improves dynamic response speed.
Smart Images

Figure CN122495658A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of unmanned aerial vehicle (UAV) technology, and more particularly to a power balancing method, apparatus, and program product for dual batteries in UAVs. Background Technology
[0002] With the widespread application of drone technology, energy management and safety of its power system have become crucial to ensuring the continuous execution of flight missions. To improve the payload capacity and flight stability of long-endurance drones, the use of dual-battery or multi-battery parallel power supply systems has become the mainstream technology in the industry.
[0003] Traditional dual-battery systems for drones often employ a simple parallel strategy based on a fixed voltage threshold. This fails to adequately consider the internal resistance mismatch caused by variations in battery manufacturing tolerances and cycle counts. This results in uneven current distribution during discharge, causing some batteries to prematurely trigger over-discharge protection, leading to significant energy waste. Furthermore, existing static balancing schemes lack real-time online identification of battery internal physical parameters, exhibiting significant feedback lag when dealing with high-dynamic flight loads and making precise synchronization during discharge difficult. In addition, fixed control logic cannot adapt to parameter drift throughout the battery's lifespan, causing a substantial decline in balancing performance after long-term use and reducing the aircraft's dynamic stability. Summary of the Invention
[0004] The technical problem to be solved by this disclosure is to address the aforementioned deficiencies in the prior art, and to provide a power balancing method, device, and program product for dual batteries in unmanned aerial vehicles.
[0005] This disclosure solves the above-mentioned technical problems through the following technical solution:
[0006] This disclosure provides a power balancing method for dual batteries in a drone, the power balancing method comprising:
[0007] Obtain the terminal voltage, output current, and casing temperature of the dual batteries;
[0008] Based on the terminal voltage, the output current, and the casing temperature, the equivalent resistance and current available capacity of each battery cell are obtained by using an identification model employing a recursive least squares method with a forgetting factor.
[0009] Based on the equivalent resistance and current available capacity of the dual batteries, the discharge current allocation ratio of each battery is calculated using a weighted average.
[0010] Based on the discharge current allocation ratio and the total load current requirement, the target discharge current of each battery cell is calculated.
[0011] A target current command is generated based on the target discharge current to control the discharge current of each battery cell to reach the corresponding target discharge current.
[0012] Optionally, obtaining the terminal voltage, output current, and casing temperature of the dual batteries includes:
[0013] The voltage of the dual batteries is acquired by a voltage sensor, the output current of the dual batteries is acquired by a current sensor, and the casing temperature of the dual batteries is acquired by a temperature sensor; wherein the voltage sensor, the current sensor, and the temperature sensor adopt a hardware-level synchronous triggering mechanism to ensure that the multidimensional data are strictly aligned on the time axis.
[0014] Optionally, the step of obtaining the equivalent resistance and current usable capacity of each battery cell based on the terminal voltage, the output current, and the casing temperature using a recursive least squares identification model with a forgetting factor includes:
[0015] Based on the terminal voltage and the output current, the parameter vector of the second-order RC (resistance-capacitance) equivalent circuit model of the battery is obtained by the recursive least squares method with forgetting factor; wherein, the parameter vector includes ohmic internal resistance, polarization resistance and polarization capacitance.
[0016] Based on the ohmic internal resistance, the polarization resistance, the polarization capacitance, the terminal voltage, and the output current, the equivalent resistance and the open-circuit voltage in equilibrium state are calculated.
[0017] Based on the open-circuit voltage of the equilibrium state and the preset open-circuit voltage-available capacity mapping table, the current corrected available capacity of each battery cell is obtained.
[0018] The available capacity in ampere-hours is calculated using the ampere-hour integration method, and the current available capacity is obtained by correcting the available capacity in ampere-hours using the current corrected available capacity.
[0019] Optionally, the weighted calculation of the discharge current allocation ratio of each battery cell based on the equivalent resistance and current available capacity of the dual batteries includes:
[0020] Based on the current available capacity of the dual batteries, the percentage of available capacity of each battery is calculated.
[0021] Based on the equivalent resistance of the dual batteries, the internal resistance compensation term for each battery is calculated; wherein, the internal resistance compensation term is negatively correlated with the internal resistance;
[0022] The discharge current allocation ratio is obtained by weighted summation of the available capacity percentage and the internal resistance compensation term.
[0023] Optionally, the power equalization method further includes:
[0024] The forgetting factor is dynamically adjusted according to the flight phase; wherein, the value of the forgetting factor is adjusted by adjusting the window length of the sliding time window, the value of the forgetting factor is negatively correlated with the window length, the sliding time window is used to control the contribution of historical data to the current prediction result, and the window length represents the length of the latest dataset participating in the current calculation.
[0025] Optionally, the power equalization method further includes:
[0026] The equalization error is continuously monitored during flight; wherein the equalization error is the ratio of the absolute value of the difference between the current available capacity of the two batteries to a preset synchronization tolerance band.
[0027] When the equalization error exceeds the preset equalization threshold for a consecutive preset first number of sampling periods, the UAV is determined to be in an unbalanced state, triggering an adaptive parameter update mechanism to reinitialize the initial parameters of the identification model, and sampling the historical data of the most recent preset second number of sampling periods to recalculate the identification model again after initialization.
[0028] Optionally, the power equalization method further includes:
[0029] Upon power-up, based on the current casing temperature and a preset casing temperature-internal resistance mapping table, the initial internal resistance of each battery cell is obtained, and the initial internal resistance is used as the equivalent resistance in the identification model and stored.
[0030] Optionally, the power equalization method further includes:
[0031] Upon power-up, the equivalent resistance of each battery cell stored in the identification model is used as the initial internal resistance, and the open-circuit voltage is calculated based on the initial internal resistance and the current terminal voltage.
[0032] Based on the open-circuit voltage and the preset open-circuit voltage-available capacity mapping table, the initial corrected available capacity of each battery is obtained, and the initial corrected available capacity is used as the current available capacity in the identification model.
[0033] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement the aforementioned power balancing method for dual batteries in a drone.
[0034] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned power balancing method for dual batteries in a drone.
[0035] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.
[0036] The positive advancements of this disclosure are as follows: By employing a dynamic equalization control method based on real-time parameter identification, it overcomes the limitations of traditional static voltage equalization methods in terms of insufficient perception of the battery's internal state. It can track the internal resistance and capacity drift of the battery in real time due to aging, temperature changes, and usage history, thereby accurately allocating the discharge current at any flight stage and effectively suppressing state-of-charge divergence. Under high dynamic load scenarios, thanks to the synergistic optimization of the sliding time window and the forgetting factor, the system response speed is significantly improved, avoiding the risk of over-discharge caused by control lag. Through temperature compensation and a pre-flight self-learning mechanism (saving historical flight data), the robustness and adaptability of the equalization strategy throughout the entire battery life cycle are ensured, greatly improving the energy utilization rate and flight endurance of the dual-battery system. It achieves adaptive synchronous discharge without relying on fixed thresholds or empirical rules. Attached Figure Description
[0037] Figure 1 A flowchart illustrating a power balancing method for dual batteries in a drone, as provided in Embodiment 1 of this disclosure;
[0038] Figure 2 A flowchart illustrating a specific implementation of step S12 of a power balancing method for dual batteries in a drone provided in Embodiment 1 of this disclosure;
[0039] Figure 3 A flowchart illustrating a specific implementation of step S13 of a power balancing method for dual batteries in a drone provided in Embodiment 1 of this disclosure;
[0040] Figure 4 A flowchart illustrating another specific implementation of a power balancing method for dual batteries in a drone provided in Embodiment 1 of this disclosure;
[0041] Figure 5 A flowchart illustrating another specific implementation of a power balancing method for dual batteries in a drone provided in Embodiment 1 of this disclosure;
[0042] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Embodiment 2 of this disclosure. Detailed Implementation
[0043] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.
[0044] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0045] Example 1
[0046] Figure 1 A flowchart illustrating a power balancing method for dual batteries in an unmanned aerial vehicle (UAV) provided as an exemplary embodiment of this disclosure is included. The power balancing method comprises:
[0047] S11. Obtain the terminal voltage, output current, and casing temperature of the dual batteries.
[0048] S12. Based on the terminal voltage, output current, and casing temperature, the equivalent resistance and current available capacity of each battery cell are obtained by using an identification model with a recursive least squares method and a forgetting factor.
[0049] S13. Based on the equivalent resistance of the dual batteries and the current available capacity, the discharge current allocation ratio of each battery is calculated using a weighted average.
[0050] S14. Based on the discharge current allocation ratio and the total load current requirement, the target discharge current of each battery is calculated.
[0051] S15. Generate a target current command based on the target discharge current to control the discharge current of each battery cell to reach the corresponding target discharge current.
[0052] Among these, constructing an efficient energy configuration system for drones, capable of adjusting energy output in real time according to the power requirements of different flight stages, is of great significance for maintaining the power reserves of drones under complex operating conditions and improving the redundancy of the overall system. Dual-battery synchronous discharge balancing technology is a core component for improving battery energy utilization efficiency and extending the overall flight time.
[0053] The power balancing method for dual-battery drones in this embodiment aims to ensure that different batteries maintain a consistent state of charge during discharge by monitoring the output state of each battery pack in real time and adjusting its discharge current distribution. The realization of this balancing mechanism relies not only on high-precision sensor sampling but also on establishing a robust control model for the complex electrochemical dynamics of the batteries, thereby achieving optimal energy allocation under different environmental and load conditions.
[0054] The terminal voltage, output current, and casing temperature of the two batteries can be synchronously sampled using high-precision sensors. These high-precision sensors can include: a differential amplifier circuit with a voltage sampling accuracy better than 0.001 volts as a voltage sensor; a Hall effect sensor with a current sampling accuracy better than 0.005 amperes as a current sensor; and a digital temperature sensing unit with a temperature sampling resolution better than 0.5°C (degrees Celsius) as a temperature sensor. All three sensors employ a hardware-level synchronous triggering mechanism to ensure strict alignment of multidimensional data on the time axis.
[0055] Each battery cell employs a second-order RC equivalent circuit model to dynamically estimate its internal resistance parameters, including ohmic internal resistance, first polarization resistance, first polarization capacitance, second polarization resistance, and second polarization capacitance. This allows for the estimation of state data such as the equivalent internal resistance of each cell. For example: Equivalent internal resistance = Ohmic internal resistance + First polarization resistance + Second polarization resistance. The second-order RC equivalent circuit model for batteries is existing technology and will not be elaborated upon here.
[0056] The Recursive Least Squares (RLS) method with a forgetting factor calculates the internal resistance parameters of the second-order RC equivalent circuit model. Then, based on the internal resistance parameters, it calculates the equivalent internal resistance and the current open-circuit voltage in equilibrium. Finally, based on the current open-circuit voltage and other data, it calculates the current available capacity (i.e., the state of charge, SOC).
[0057] The forgetting factor can be dynamically adjusted based on the flight phase. Specifically, the flight phase can be determined based on the fluctuation amplitude of the current discharge current. The value of the forgetting factor is adjusted by changing the window length of the sliding time window. The value of the forgetting factor is negatively correlated with the window length. The sliding time window is used to control the contribution of historical data to the current prediction result. The window length represents the length of the latest dataset participating in the current calculation. That is, the window length of the sliding time window is adjusted according to the fluctuation amplitude of the current discharge current. The recursive least squares method with forgetting factor and the sliding time window have a deeply coupled synergistic relationship. For example, a smaller window length is used during the cruise phase to enhance the weight of historical data, while a larger window length is used during rapid acceleration or wind disturbance phases to improve the model's response sensitivity to transient changes.
[0058] When the rate of change of current is detected to exceed a threshold, the window length is automatically shortened, achieving adaptive scaling of the sliding time window. Shortening the window allows the recursive least squares method to focus on the latest data that reflects high dynamic characteristics, thus enabling the vector of internal resistance parameters to... It can quickly capture sudden changes in internal resistance under high current, improving the real-time identification capability.
[0059] The recursive least squares method with the forgetting factor after determining the forgetting factor is an existing technique and will not be elaborated here.
[0060] The current available capacity can be corrected by using the current available capacity calculated from the current open-circuit voltage, thus obtaining the current available capacity. The ampere-hour integration method reflects charge conservation and has extremely high relative accuracy and continuity over a short period of time, enabling it to smoothly capture subtle fluctuations in current. While the SOC obtained based on model identification can eliminate the accumulated error of the ampere-hour integration, the identification result at a single point may show jumps or fluctuations when there are drastic current fluctuations or sensor noise interference. These two methods can be used to compensate for each other.
[0061] When the equivalent resistance of the two batteries is equal, the discharge current allocation ratio is determined proportionally to the current available capacity. The calculation of the theoretical discharge current allocation ratio is based on the principle of energy conservation, that is, under the premise that the total load power remains unchanged, the instantaneous discharge power of the two batteries is proportional to their current available capacity. That is, the larger the current available capacity, the higher the corresponding discharge current allocation ratio. For example, if the two batteries are the first battery and the second battery, and the current available capacity of the first battery is 30% and the current available capacity of the second battery is 60%, then the discharge current allocation ratio of the first battery is 33% to output 33% of the total power, and the discharge current allocation ratio of the second battery is 67% to output 67% of the total power.
[0062] When the equivalent resistances of the two batteries are not equal, internal resistance compensation is triggered, generating a correction bias (i.e., internal resistance compensation term). This moderately reduces the discharge current distribution ratio (i.e., target current share) of the battery with higher internal resistance (e.g., the first battery), thereby reducing the output current of the high internal resistance battery, reducing its internal heat loss, and forcing the SOC decline curves of the two batteries to tend to coincide. The internal resistance compensation term cancels out the uneven ohmic loss caused by the difference in internal resistance, thus ensuring that the slope of the change in state of charge remains synchronized.
[0063] Based on a predetermined target discharge current, a target current command is generated to control the discharge current of each battery cell to reach the corresponding target discharge current. This achieves dynamic regulation of the actual output current of the two batteries, making their discharge rates more consistent. The bidirectional power regulation module can control the discharge current of the two batteries according to the target current command, ensuring that the discharge current of each battery cell reaches the corresponding target discharge current.
[0064] The bidirectional power regulation module consists of two independent DC-DC converters, each connected to a battery cell and the main power supply bus. Its duty cycle is controlled by a pulse-width modulation (PWM) signal to precisely regulate the output current of a single battery cell. This module also features reverse energy flow capability, allowing temporary transfer of charge from a battery with a higher state of charge to one with a lower state of charge when the reverse energy flow trigger condition is met. However, this is limited to short-term fine-tuning to avoid deep cycle damage.
[0065] The reverse energy flow can be triggered when an abnormally large difference in the state of charge (SOC) between the two cells is detected, and this difference cannot be resolved within a predetermined time using conventional current proportional regulation. Reverse energy flow is only used for short-term compensation to prevent deep cycle damage and ensure that the remaining charge percentages of the two cells return to the same level before entering the low-charge range.
[0066] The control frequency of the bidirectional power regulation module is no less than 10 kHz, ensuring that the smoothness and accuracy of current regulation can still be maintained under high-frequency dynamic load changes. At the same time, the module has built-in multiple protection logics for overcurrent, overheating and short circuit. Under abnormal operating conditions, it can automatically cut off the regulation path and switch to safe parallel mode to ensure flight safety.
[0067] The main control unit of the UAV can adopt a dual-core processor architecture, with one core dedicated to sensor data acquisition and preprocessing, and the other core running parameter identification and equalization control algorithms. The two cores exchange data with low latency through shared memory to ensure that the real-time performance of the control closed loop meets the millisecond-level response requirements.
[0068] In this embodiment, a dynamic equalization control method based on real-time parameter identification overcomes the limitation of traditional static voltage equalization methods in insufficient perception of the battery's internal state. It can track the internal resistance and capacity drift of the battery due to aging, temperature changes, and usage history in real time, thereby accurately allocating the discharge current at any flight stage and effectively suppressing state of charge divergence. Under high dynamic load scenarios, thanks to the synergistic optimization of the sliding time window and forgetting factor, the system response speed is significantly improved, avoiding the risk of over-discharge caused by control lag. Through temperature compensation and a pre-flight self-learning mechanism (saving historical flight data), the robustness and adaptability of the equalization strategy throughout the entire battery life cycle are ensured, greatly improving the energy utilization rate and flight endurance of the dual-battery system. It achieves adaptive synchronous discharge without relying on fixed thresholds or empirical rules.
[0069] In an optional embodiment, step S11 includes:
[0070] The voltage sensors acquire the terminal voltage of the dual batteries, the current sensors acquire the output current of the dual batteries, and the temperature sensors acquire the casing temperature of the dual batteries. The voltage, current, and temperature sensors employ a hardware-level synchronous triggering mechanism to ensure strict alignment of the multi-dimensional data along the time axis.
[0071] Among them, the voltage sensor can adopt a differential amplifier circuit with a voltage sampling accuracy better than 0.001 volts, the current sensor can adopt a Hall effect sensor with a current sampling accuracy better than 0.005 amperes, and the temperature sensor can adopt a digital temperature sensing unit with a temperature sampling resolution better than 0.5℃.
[0072] This embodiment provides a specific implementation method for acquiring data using sensors.
[0073] In an optional embodiment, refer to Figure 2 Step S12 includes:
[0074] S121. Based on the terminal voltage and output current, the parameter vector of the second-order RC equivalent circuit model of the battery is obtained through recursive least squares method with forgetting factor. The parameter vector includes the ohmic internal resistance, polarization resistance, and polarization capacitance.
[0075] S122. Based on the ohmic internal resistance, polarization resistance, polarization capacitance, terminal voltage and output current, the equivalent resistance and the open-circuit voltage in equilibrium state are calculated.
[0076] S123. Based on the open-circuit voltage in equilibrium and a preset mapping table of open-circuit voltage and available capacity, the current corrected available capacity of each battery cell is obtained.
[0077] S124. The available capacity in ampere-hours is calculated using the ampere-hour integration method. The available capacity in ampere-hours is then corrected using the current corrected available capacity to obtain the current available capacity.
[0078] The parameter vector, open-circuit voltage, and current available capacity are represented by the following formulas:
[0079]
[0080]
[0081]
[0082]
[0083]
[0084] Where k represents the current time, i.e., the kth sampling; This represents the parameter vector to be identified, which includes the ohmic internal resistance, the first polarization resistor, the first polarization capacitor, the second polarization resistor, and the second polarization capacitor; k-1 represents the previous time step. This represents the actual observed battery terminal voltage; A dimension vector containing current and historical voltage data; Represent the covariance matrix; Indicates the recursive gain; Indicates the forgetting factor; Indicates open-circuit voltage; Indicates terminal voltage; Indicates the internal resistance of the ohm; Indicates the output current; This represents the voltage of the first polarization stage, which is a parallel connection of the first polarization resistor and the first polarization capacitor. This indicates the voltage of the second polarization stage, which is a parallel connection of the second polarization resistor and the second polarization capacitor. Indicates the currently available capacity; Indicates the current available calibration capacity; Indicates charge / discharge efficiency; Indicates the battery's rated capacity; Indicates the sampling period; This indicates the preset correction coefficient.
[0085] The recursive least squares method with a forgetting factor recursively derives the optimal parameter estimates at time k by combining the known parameter estimates from time k-1 (the previous time step) with the newly acquired voltage and current data at time k (the current time step), thus obtaining the parameter vector at time k. Polarization resistance and polarization capacitor These parameters describe the polarization voltage of a battery during charging and discharging. Only by accurately identifying these polarization parameters can the influence of polarization voltage be eliminated from the measured terminal voltage, thereby accurately reconstructing the open-circuit voltage.
[0086] Based on the established ohmic internal resistance, first polarization resistor, first polarization capacitor, second polarization resistor, and second polarization capacitor, the calculation of the battery's equivalent internal resistance, first polarization voltage, and second polarization voltage is existing technology and will not be elaborated here.
[0087] In the ampere-hour integration method, accumulated losses are primarily used to construct a composite remaining capacity percentage estimation framework. The ampere-hour integration method itself is used for continuous cumulative calculation of capacity losses during flight, while the open-circuit voltage method provides an initial value correction for the remaining capacity percentage. The current corrected available capacity is obtained by looking up the open-circuit voltage in a table. Combining the ampere-hour integration method with the open-circuit voltage correction method, the current corrected available capacity, restored using recursive least squares (RLS) with a forgetting factor, is used to perform real-time closed-loop correction on the traditional ampere-hour integration result, eliminating accumulated errors.
[0088] In this embodiment, a specific implementation is provided to obtain the equivalent resistance and current available capacity of each battery cell by using an identification model based on terminal voltage, output current, and casing temperature and employing a recursive least squares method with a forgetting factor.
[0089] In an optional embodiment, refer to Figure 3 Step S13 includes:
[0090] S131. Based on the current available capacity of the dual batteries, calculate the percentage of available capacity of each battery.
[0091] S132. Based on the equivalent resistance of the dual-cell system, the internal resistance compensation term for each cell is calculated. The internal resistance compensation term is negatively correlated with the internal resistance.
[0092] S133. The discharge current allocation ratio is obtained by weighted summation based on the available capacity ratio and the internal resistance compensation term.
[0093] Once the discharge current allocation ratio is calculated, the target discharge current for each battery can be calculated based on the discharge current allocation ratio and the total load current requirement.
[0094] The following formulas are used to represent the discharge current distribution ratio and the target discharge current:
[0095]
[0096]
[0097]
[0098] Where n represents the battery serial number, This represents the proportion of the discharge current distributed in the nth battery section. This represents the target discharge current of the nth battery. Indicates the total load current requirement. This represents the percentage of usable capacity of the nth battery cell. This represents the total usable capacity percentage of all batteries. This indicates the internal resistance compensation term. Let represent the equivalent internal resistance of the nth battery cell. This represents the preset first weighting coefficient. This represents the preset second weighting coefficient.
[0099] The calculation method for the internal resistance compensation term can be set according to the actual situation.
[0100] This embodiment provides a specific implementation method for calculating the discharge current allocation ratio of each battery cell based on the equivalent resistance and current available capacity of the dual-cell system.
[0101] In an optional embodiment, the power equalization method further includes:
[0102] The forgetting factor is dynamically adjusted based on the flight phase. Specifically, the value of the forgetting factor is adjusted by changing the window length of the sliding time window. The forgetting factor value is negatively correlated with the window length. The sliding time window controls the contribution of historical data to the current prediction result, and the window length represents the length of the latest dataset participating in the current calculation.
[0103] In this process, the window length of the sliding time window is adjusted according to the fluctuation amplitude of the current discharge current. The recursive least squares method with a forgetting factor and the sliding time window are deeply coupled and synergistic. For example, a smaller window length is used during the cruise phase to enhance the weight of historical data, while a larger window length is used during rapid acceleration or wind disturbance phases to improve the model's response sensitivity to transient changes.
[0104] When the rate of change of current is detected to exceed a threshold, the window length is automatically shortened, achieving adaptive scaling of the sliding time window. Shortening the window allows the recursive least squares method to focus on the latest data that reflects high dynamic characteristics, thus enabling the vector of internal resistance parameters to... It can quickly capture sudden changes in internal resistance under high current, improving the real-time identification capability.
[0105] In this embodiment, the recursive least squares method with forgetting factor is deeply coupled with the sliding time window. During the cruise phase, the window length is taken to enhance the weight of historical data, while during the rapid acceleration or wind disturbance phase, the window length is taken to improve the model's response sensitivity to transient changes.
[0106] In an optional embodiment, refer to Figure 4 Power equalization methods also include:
[0107] S21. Continuously monitor the equalization error during flight. The equalization error is the ratio of the absolute value of the difference between the current available capacities of the two batteries to the preset synchronization tolerance band.
[0108] S22. When the equalization error exceeds the preset equalization threshold for a consecutive preset first number of sampling periods, the UAV is determined to be in an unbalanced state, triggering the adaptive parameter update mechanism to re-initialize the initial parameters of the identification model, and sampling the historical data of the most recent preset second number of sampling periods to recalculate it through the initialized identification model.
[0109] Among them, the preset first quantity (e.g., set to 3), the preset second quantity (e.g., set to 50), and the preset balance threshold can be set according to the actual situation.
[0110] Taking a preset first quantity of 3 and a preset second quantity of 50 as an example, when the balancing error exceeds the limit for three consecutive cycles, the drone is determined to be in an unbalanced state. At this time, the adaptive parameter update mechanism is activated, re-initializing the initial parameters such as the covariance matrix of the RLS algorithm (recursive least squares with a forgetting factor). Using historical data of terminal voltage and output current from the most recent 50 sampling cycles, the model is re-run through the least squares fitting algorithm. This set of high-dynamic feature data is used to correct the estimation error of the current remaining battery percentage, and the calibrated parameters are then used as the benchmark for subsequent real-time input.
[0111] In this embodiment, an adaptive parameter update mechanism is used to compensate for balancing errors when the system is unbalanced, so as to correct the estimation deviation of the current available capacity.
[0112] In an optional embodiment, the power equalization method further includes:
[0113] Upon power-up, based on the current casing temperature and the preset casing temperature-internal resistance mapping table, the initial internal resistance of each battery cell is obtained, and the initial internal resistance is used as the equivalent resistance in the identification model and stored.
[0114] The shell temperature and internal resistance mapping table is pre-calibrated based on the battery chemistry system, and the internal resistance estimation result is corrected according to the shell temperature (which reflects the current ambient temperature) during each power-on self-test to eliminate the impact of temperature drift on the identification accuracy.
[0115] Before the drone takes off, a complete battery parameter self-learning process is performed. The process includes static open-circuit voltage measurement, small current stepped discharge test, and initial internal resistance fitting. The obtained initial parameters serve as the benchmark for online identification during subsequent flights, ensuring that the system has a stable starting point consistency throughout its entire life cycle.
[0116] In this embodiment, the internal resistance estimation result is corrected based on the shell temperature and internal resistance mapping table and the shell temperature to eliminate the impact of temperature drift on the identification accuracy.
[0117] In an optional embodiment, refer to Figure 5 Power equalization methods also include:
[0118] S31. Upon power-up, the equivalent resistance of each battery stored in the identification model is used as the initial internal resistance, and the open-circuit voltage is calculated based on the initial internal resistance and the current terminal voltage.
[0119] S32. Based on the open-circuit voltage and the preset open-circuit voltage and available capacity mapping table, the initial corrected available capacity of each battery is obtained, and the initial corrected available capacity is used as the current available capacity in the identification model.
[0120] The estimation of current available capacity (state of charge) employs a composite architecture combining the ampere-hour integration method and the open-circuit voltage correction method. Using the identified internal resistance parameters, the terminal voltage is restored to the open-circuit voltage, and initial value correction is performed based on a pre-stored open-circuit voltage and available capacity mapping table (i.e., an open-circuit voltage and state of charge mapping table). Simultaneously, the cumulative energy loss is calculated using real-time current integration.
[0121] In this embodiment, the identified internal resistance parameter is used to restore the terminal voltage to the open-circuit voltage, and the initial value is corrected according to the pre-stored open-circuit voltage and available capacity mapping table.
[0122] The following is an example of implementing the power balancing method for dual batteries in a drone in this embodiment.
[0123] This power balancing method operates within the UAV's internal power management system, which includes a main control unit, two sets of high-precision sampling sensor arrays, and two sets of bidirectional power regulation modules.
[0124] The main control unit adopts a high-performance dual-core processor architecture. One processing core is dedicated to real-time acquisition of raw sensor data, signal conditioning, and multi-channel synchronous preprocessing, while the other processing core focuses on executing complex online parameter identification algorithms, current distribution strategy calculations, and power balancing control logic. The two processing cores interact with each other through internal high-speed shared memory, which is configured with a strict semaphore locking mechanism to ensure data consistency and real-time performance in the millisecond-level control closed loop, meeting the extremely high requirements of the UAV for the power system response speed under dynamic flight conditions.
[0125] Step 1: Real-time acquisition of voltage, current, and temperature data from the dual-battery system. High-precision sensors synchronously sample the terminal voltage, output current, and casing temperature of both batteries and transmit the sampled data to the main control unit. A high-precision sensor array is deployed at the output port of each battery. The voltage sampling circuit employs a differential amplification architecture with a sampling accuracy better than 0.001 volts. A high-impedance input stage isolates the battery bus from high-voltage interference, ensuring a very high signal-to-noise ratio for the acquired terminal voltage data. Current sampling is achieved using a Hall effect sensor with a sampling accuracy better than 0.005 amperes. This sensor exhibits extremely low zero-point drift characteristics, accurately capturing the full range of changes from weak standby current to peak flight current. Temperature sampling is performed by a distributed digital temperature sensing unit with a sampling resolution better than 0.5℃. The sensor probe is attached to the geometric center of the battery casing and the terminal connection point to obtain a representative average operating temperature. To eliminate data lag and misalignment in the time dimension, the main control unit's processing kernel generates a global synchronization trigger pulse signal, simultaneously driving the analog-to-digital converters of both sensor arrays to perform sampling conversion. This hardware-level synchronous triggering mechanism ensures that the terminal voltage, output current, and temperature data are strictly aligned on the time axis, with the error controlled within 10 microseconds.
[0126] Step 2: Based on the sampled data, a real-time identification model of battery internal resistance and state of charge is constructed. Using a recursive least squares method combined with a sliding time window mechanism, the equivalent internal resistance and current state of charge of each battery cell are dynamically estimated. The real-time identification model is based on a second-order resistor-capacitor equivalent circuit physical architecture, which includes an equivalent internal resistance representing electrolyte ohmic losses and two parallel resistor-capacitor links representing electrode polarization effects. After receiving the multi-dimensional synchronous data collected in Step 1, the processing kernel of the main control unit initiates the recursive least squares algorithm. This algorithm iteratively corrects the battery's internal resistance and polarization parameters by minimizing the sum of squared residuals between the predicted voltage and the actual measured voltage. During algorithm execution, a dynamic forgetting factor mechanism is introduced, the value of which is nonlinearly adjusted according to the real-time flight stage of the UAV. During the stable cruise phase, the forgetting factor is set to a small value to reduce random noise and improve the steady-state accuracy of the identification results. However, during periods of rapid acceleration, steep ascents, or severe gusts of wind, the system automatically increases the forgetting factor to 0.999 or higher to enhance the model's ability to capture transient features and ensure that the internal resistance estimation results can reflect the polarization voltage mutations under high current conditions in real time. This gives historical sampling data a higher weight and utilizes the statistical characteristics of long-term series to suppress sensor noise.
[0127] In the above process, the sliding time window mechanism is deeply coupled with the recursive least squares method. The window length of the sliding time window is not fixed, but adaptively scaled according to the fluctuation amplitude of the current discharge current. When the main control unit detects that the rate of change of the current exceeds a predetermined threshold within a predetermined time period, it determines that the system is in a dynamic excitation state. At this time, the window length of the sliding time window is automatically shortened so that the algorithm can focus on the latest high-dynamic data features and improve the real-time performance of identification. Conversely, during the stable discharge period with weak current fluctuations, the window length is extended to smooth data fluctuations. The estimation of the state of charge adopts a composite architecture combining the ampere-hour integration method and the open-circuit voltage correction method. Using the identified internal resistance parameters, the terminal voltage is restored to the open-circuit voltage, and the initial value is corrected according to the pre-stored open-circuit voltage and available capacity mapping table (i.e., the open-circuit voltage and state of charge mapping table). At the same time, the cumulative loss of power is calculated by combining real-time current integration. The ambient temperature compensation mechanism plays a role in the internal resistance identification process. By querying the pre-calibrated shell temperature and internal resistance mapping table, the main control unit corrects the internal resistance estimation result according to the current shell temperature. This correction takes into account the physical property that the electrolyte viscosity increases as the temperature decreases, which in turn leads to a nonlinear increase in the ohmic internal resistance, thereby eliminating the negative impact of temperature drift on identification accuracy.
[0128] Step 3: Based on the identified internal resistance and state of charge (SCC), calculate the theoretical discharge current distribution ratio of the two batteries under the current load conditions and generate the target current command. The calculation process strictly follows the principle of energy conservation. Its core logic is to optimize the distribution ratio of the two currents to make the SCC decline curves of the two batteries tend to coincide, while meeting the total load power requirements of the UAV. In specific calculations, the main control unit first obtains the real-time load current required by the total power supply bus, and then calculates the basic distribution ratio coefficient based on the current remaining available capacity of the two batteries. To compensate for the difference in ohmic losses caused by the different aging levels of the batteries, the algorithm introduces an internal resistance compensation term. When the equivalent internal resistance of the first battery is greater than that of the second battery, the internal resistance compensation term will generate a correction bias, appropriately reducing the target current share of the first battery, thereby reducing internal heat loss. The final target current distribution ratio is obtained by weighted summation of the available capacity ratio and the internal resistance compensation term, ensuring that the slope of the SCC change of the two batteries remains synchronized at any time point.
[0129] Step 4: The bidirectional power regulation module dynamically adjusts the actual output current of the two batteries according to the target current command, making the discharge rates of the two batteries tend to be consistent. The bidirectional power regulation module consists of two completely symmetrical and independent DC-DC converters, each connected to one battery and the main power supply bus. The converters adopt an interleaved parallel power topology. The second processing core of its main control unit controls the on and off of the power transistors by outputting high-frequency pulse width modulation signals, thereby precisely adjusting the output current of each branch. The control frequency of this module is set to no less than 10 kHz. This module has reverse energy flow capability. When an abnormal increase in the difference in state of charge between the two batteries is detected, the main control unit allows the power regulation module to temporarily transfer energy from the battery with the higher state of charge to the battery with the lower state of charge.
[0130] Step 5: Continuously monitor the system equalization error during flight. When the equalization error exceeds a preset threshold, trigger the adaptive parameter update mechanism to recalibrate the internal resistance identification model and current distribution strategy. The equalization error is defined as the ratio of the absolute value of the difference in state of charge between the two batteries to the preset synchronization tolerance band. The main control unit calculates this ratio in real time during each control cycle. If this ratio exceeds the set preset threshold for three consecutive sampling cycles, the system is determined to have entered an unbalanced state, possibly due to a sudden change in battery internal resistance or a drift in capacity estimation. At this time, the adaptive parameter update mechanism is forcibly activated. The system will temporarily interrupt the current recursive iteration process, reinitialize the initial parameters such as the covariance matrix of the internal resistance identification model, and, combined with the voltage-current response curve characteristics of the most recent 50 sampling cycles, use the least squares fitting algorithm to correct the estimation deviation of the state of charge.
[0131] It also includes a crucial pre-flight self-learning process. During the UAV's power-on self-test phase, the system controls each of the two batteries to perform a brief open-circuit voltage measurement, followed by a set of preset low-current stepped discharge tests. By monitoring the voltage drop response under this specific test sequence, the system fits the initial internal resistance and capacitance characteristic parameters of the batteries. These initial parameters are stored in non-volatile memory as a reference point for online identification during flight. This ensures that regardless of whether the batteries are in a brand-new condition or near the end of their lifespan, the system can start working from an accurate starting point, possessing robustness throughout its entire lifespan.
[0132] The bidirectional power regulation module incorporates multiple hardware-level protection logics. When a single branch current exceeds a safety threshold, the power transistor temperature exceeds a limit, or a short circuit occurs on the bus, the module's internal hardware comparator directly cuts off the pulse width modulation signal output, forcibly shutting down the regulation path. After a fault occurs, the system automatically switches to a safe parallel connection mode, which physically bypasses the two batteries and directly connects them to the bus, prioritizing the safety of the flight's power supply at the expense of equalization accuracy.
[0133] Example 2
[0134] Figure 6 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the power balancing method for dual batteries of a drone as described in any of the above embodiments. Figure 6 The electronic device 90 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0135] like Figure 6 As shown, the electronic device 90 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including memory 92 and processor 91).
[0136] Bus 93 includes a data bus, an address bus, and a control bus.
[0137] The memory 92 may include volatile memory, such as random access memory (RAM) 921 and / or cache memory 922, and may further include read-only memory (ROM) 923.
[0138] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) program module 924, such program module 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0139] The processor 91 executes various functional applications and data processing by running computer programs stored in the memory 92, such as the power balancing method for dual batteries of a drone provided in any of the above embodiments.
[0140] Electronic device 90 can also communicate with one or more external devices 94 (e.g., keyboard, pointing device, etc.). This communication can be performed through input / output (I / O) interface 95. Furthermore, electronic device 90 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 96. As shown, network adapter 96 communicates with other modules of electronic device 90 via bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0141] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0142] Example 3
[0143] This embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the power balancing method for dual batteries of a drone in Embodiment 1.
[0144] The program code for executing the computer program product of this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0145] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.
Claims
1. A power balancing method for dual batteries in a drone, characterized in that, The power equalization method includes: Obtain the terminal voltage, output current, and casing temperature of the dual batteries; Based on the terminal voltage, the output current, and the casing temperature, the equivalent resistance and current available capacity of each battery cell are obtained by using an identification model employing a recursive least squares method with a forgetting factor. Based on the equivalent resistance and current available capacity of the dual batteries, the discharge current allocation ratio of each battery is calculated using a weighted average. Based on the discharge current allocation ratio and the total load current requirement, the target discharge current of each battery cell is calculated. A target current command is generated based on the target discharge current to control the discharge current of each battery cell to reach the corresponding target discharge current.
2. The power balancing method for dual batteries in a drone as described in claim 1, characterized in that, The acquisition of the terminal voltage, output current, and casing temperature of the dual batteries includes: The voltage of the dual batteries is acquired by a voltage sensor, the output current of the dual batteries is acquired by a current sensor, and the casing temperature of the dual batteries is acquired by a temperature sensor; wherein the voltage sensor, the current sensor, and the temperature sensor adopt a hardware-level synchronous triggering mechanism to ensure that the multidimensional data are strictly aligned on the time axis.
3. The power balancing method for dual batteries in a drone as described in claim 1, characterized in that, Based on the terminal voltage, the output current, and the casing temperature, an identification model using recursive least squares with a forgetting factor is employed to obtain the equivalent resistance and current usable capacity of each battery cell, including: Based on the terminal voltage and the output current, the parameter vector of the second-order RC equivalent circuit model of the battery is obtained by the recursive least squares method with forgetting factor; wherein, the parameter vector includes ohmic internal resistance, polarization resistance and polarization capacitance. Based on the ohmic internal resistance, the polarization resistance, the polarization capacitance, the terminal voltage, and the output current, the equivalent resistance and the open-circuit voltage in equilibrium state are calculated. Based on the open-circuit voltage of the equilibrium state and the preset open-circuit voltage-available capacity mapping table, the current corrected available capacity of each battery cell is obtained. The available capacity in ampere-hours is calculated using the ampere-hour integration method, and the current available capacity is obtained by correcting the available capacity in ampere-hours using the current corrected available capacity.
4. The power balancing method for dual batteries in a UAV as described in claim 1, characterized in that, The weighted calculation of the discharge current allocation ratio for each battery cell based on the equivalent resistance and current available capacity of the dual-cell system includes: Based on the current available capacity of the dual batteries, the percentage of available capacity of each battery is calculated. Based on the equivalent resistance of the dual batteries, the internal resistance compensation term for each battery is calculated; wherein, the internal resistance compensation term is negatively correlated with the internal resistance; The discharge current allocation ratio is obtained by weighted summation of the available capacity percentage and the internal resistance compensation term.
5. The power balancing method for dual batteries in a UAV as described in claim 1, characterized in that, The power equalization method further includes: The forgetting factor is dynamically adjusted according to the flight phase; wherein, the value of the forgetting factor is adjusted by adjusting the window length of the sliding time window, the value of the forgetting factor is negatively correlated with the window length, the sliding time window is used to control the contribution of historical data to the current prediction result, and the window length represents the length of the latest dataset participating in the current calculation.
6. The power balancing method for dual batteries in a UAV as described in claim 1, characterized in that, The power equalization method further includes: The equalization error is continuously monitored during flight; wherein the equalization error is the ratio of the absolute value of the difference between the current available capacity of the two batteries to a preset synchronization tolerance band. When the equalization error exceeds the preset equalization threshold for a consecutive preset first number of sampling periods, the UAV is determined to be in an unbalanced state, triggering an adaptive parameter update mechanism to reinitialize the initial parameters of the identification model, and sampling the historical data of the most recent preset second number of sampling periods to recalculate the identification model again after initialization.
7. The power balancing method for dual batteries in a UAV as described in claim 1, characterized in that, The power equalization method further includes: Upon power-up, based on the current casing temperature and a preset casing temperature-internal resistance mapping table, the initial internal resistance of each battery cell is obtained, and the initial internal resistance is used as the equivalent resistance in the identification model and stored.
8. The power balancing method for dual batteries in a UAV as described in claim 1, characterized in that, The power equalization method further includes: Upon power-up, the equivalent resistance of each battery cell stored in the identification model is used as the initial internal resistance, and the open-circuit voltage is calculated based on the initial internal resistance and the current terminal voltage. Based on the open-circuit voltage and the preset open-circuit voltage-available capacity mapping table, the initial corrected available capacity of each battery is obtained, and the initial corrected available capacity is used as the current available capacity in the identification model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the power balancing method for dual batteries of a drone as described in any one of claims 1 to 8.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the power balancing method for dual batteries of a drone as described in any one of claims 1-8.