Charging control method and device of Bluetooth headset, equipment and storage medium
By conducting detailed circuit modeling of the charging box and headphones of Bluetooth headphones and optimizing the collaborative charging of multiple agents, combined with deep learning technology, the accuracy and flexibility of the existing charging control methods are solved, and an efficient and safe charging strategy is achieved , extends battery life and improves user experience.
Patent Information
- Application Number
- CN202411498136.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing Bluetooth headset charging control method has problems such as insufficient modeling of the charging system, lack of flexibility in charging strategies, and poor collaborative charging effect of multiple devices. It is difficult to take into account the charging efficiency and user experience, and it is difficult to effectively utilize historical data and user usage mode. Optimize charging strategy.
By modeling the charging box, left and right earphones and their batteries in detail, combining Kalman filters and adaptive PID control algorithms to achieve constant current and constant voltage charging control, using multi-stage charging strategy processors and multi-agent reinforcement learning technology Co-charge optimization, and dynamic adaptive charging strategies are generated through multimodal timing diagram attention network model analysis of charging history and usage patterns.
It improves charging efficiency and battery life, enhances the stability and safety of the charging system, optimizes the user experience, reduces unnecessary charging times and risks, adapts to user needs, and improves the level of product intelligence.
Smart Images

Figure CN119093555A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of earphone charging technology, and in particular to a charging control method, device, equipment and storage medium for a Bluetooth earphone. Background Art
[0002] As the mainstream choice for portable audio devices, the charging control technology of Bluetooth headsets has always been a hot topic of research. Traditional charging methods often use fixed charging strategies, which are difficult to adapt to the usage habits of different users and changes in battery status, resulting in low charging efficiency and shortened battery life. With the development of artificial intelligence technology, intelligent charging control has become possible, but how to effectively integrate multi-source heterogeneous data and achieve accurate charging management still faces challenges.
[0003] Existing charging control methods generally have problems such as inaccurate charging system modeling, lack of flexibility in charging strategies, and poor collaborative charging of multiple devices. In particular, when dealing with dynamic power distribution between the charging box and the left and right earphones, it is difficult to balance charging efficiency and user experience. In addition, how to effectively use historical charging data and user usage patterns to optimize charging strategies is also a difficulty in current research. Summary of the invention
[0004] The present invention provides a charging control method, device, equipment and storage medium for a Bluetooth headset. The present invention can adaptively adjust charging parameters to achieve coordinated charging between a charging box and the headset, and analyze long-term usage data through deep learning technology, thereby continuously optimizing the charging strategy, extending battery life and improving user experience.
[0005] In a first aspect, the present invention provides a charging control method for a Bluetooth headset, the charging control method for a Bluetooth headset comprising: Conduct circuit modeling for the charging box, left and right earphones, and their batteries to obtain a charging system model. Based on the charging system model, the battery voltage is sampled by a digital controller and the PWM duty cycle is adjusted to obtain constant current charging control parameters; According to the constant current charging control parameter and the preset voltage threshold, the PWM duty cycle is adjusted using a PID control algorithm to obtain a constant voltage charging control parameter; Inputting the constant current charging control parameter and the constant voltage charging control parameter into a multi-stage charging strategy processor to obtain a multi-stage charging scheme; Based on the multi-stage charging scheme, the main controller coordinates the charging priority and power distribution of the charging box and the left and right earphones to obtain collaborative charging control data; The collaborative charging control data is input into a multimodal time-series graph attention network model, and a dynamic adaptive charging strategy is obtained by performing a multi-dimensional analysis of the charging history, usage pattern, and battery health status.
[0006] In a second aspect, the present invention provides a charging control device for a Bluetooth headset, the charging control device for the Bluetooth headset comprising: A modeling module is used to perform circuit modeling on the charging box, left and right earphones and their batteries to obtain a charging system model; A first regulating module is used to sample the battery voltage and adjust the PWM duty cycle through a digital controller based on the charging system model to obtain a constant current charging control parameter; A second adjustment module is used to adjust the PWM duty cycle using a PID control algorithm according to the constant current charging control parameter and a preset voltage threshold to obtain a constant voltage charging control parameter; A processing module, used for inputting the constant current charging control parameter and the constant voltage charging control parameter into a multi-stage charging strategy processor to obtain a multi-stage charging scheme; An allocation module, configured to coordinate the charging priority and power allocation between the charging box and the left and right earphones through the main controller based on the multi-stage charging scheme to obtain collaborative charging control data; The analysis module is used to input the collaborative charging control data into a multimodal time-series graph attention network model, and obtain a dynamic adaptive charging strategy by performing multi-dimensional analysis on the charging history, usage mode and battery health status.
[0007] The third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned Bluetooth headset charging control method.
[0008] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for controlling charging of a Bluetooth headset.
[0009] In the technical solution provided by the present invention, by carrying out detailed circuit modeling of the charging box, left and right earphones and their batteries, a charging system model including a power supply, a charging management chip, a battery equivalent circuit and a load is obtained, which provides an accurate theoretical basis for subsequent charging control and helps to improve charging efficiency and accuracy. The battery state estimation and adaptive PID control algorithm based on Kalman filter are adopted to realize accurate control of constant current charging and constant voltage charging processes, and the charging parameters can be adjusted in real time according to the battery state, thereby improving the stability and safety of charging. Through the multi-level charging strategy processor, the intelligent switching of the four stages of trickle, fast, standard and constant voltage is realized, and the fuzzy processing is introduced to realize smooth transition, effectively balancing the charging speed and battery life. The main controller is used to coordinate the charging priority and power allocation of the charging box and the left and right earphones, and combined with the multi-agent reinforcement learning technology, the collaborative charging optimization between multiple devices is realized, and the overall charging efficiency is improved. Through the multimodal time series graph attention network model, the charging history, usage mode and battery health status are analyzed in multiple dimensions, and the generation of dynamic adaptive charging strategy is realized, which can predict and adapt to the user's usage habits and further optimize the charging process. Multiple safety mechanisms are introduced during the charging process, such as thermal management constraint analysis and safety assessment, which effectively reduce the risks of overcharging, over-discharging and temperature abnormalities, and improve the reliability and safety of the charging system. By comprehensively considering the battery health status, usage frequency prediction and charging strategy optimization, unnecessary charging times and improper charging behaviors are effectively reduced, extending the battery life. Based on the analysis and prediction of user usage habits, the charging strategy can better adapt to individual needs, such as automatically charging before the user may use the headphones, improving the product's intelligence level and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0011] Figure 1 Schematic diagram of the steps of the charging control method of the Bluetooth headset in an embodiment of the present invention; Figure 2 Schematic diagram of the structure of a charging control device for a Bluetooth headset in an embodiment of the present invention. DETAILED DESCRIPTION
[0012] Embodiments of the present invention provide a charging control method, device, equipment and storage medium for a Bluetooth headset. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0013] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the charging control method of the Bluetooth headset in the embodiment of the present invention includes: Step S1, circuit modeling of the charging box, left and right earphones and their batteries to obtain a charging system model; It is understandable that the execution subject of the present invention may be a charging control device for a Bluetooth headset, or may be a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0014] Specifically, the input power of the charging box is parameter extracted, and the extracted power parameters include characteristic data such as voltage, current and ripple, which reflect the output characteristics of the power supply under different loads and working conditions. Based on the power supply characteristic data, the power supply is regarded as an equivalent circuit, and an equivalent circuit model is performed on it to obtain a power supply equivalent circuit model, which reflects the behavioral characteristics of the power supply in the entire charging system. The input and output characteristics of the charging management chip are measured, and the transfer function of the chip under different working conditions is obtained through experimental testing to describe the relationship between the input voltage and output current of the chip. The chip transfer function is input into the system identification algorithm, the dynamic response characteristics of the chip are analyzed, and the dynamic model of the charging management chip is obtained to describe the working characteristics and dynamic changes of the charging management chip under different input and load conditions. At the same time, the batteries of the charging box and the left and right earphones are charged and discharged to obtain the actual capacity and internal resistance data of the battery. Based on the battery capacity and internal resistance data, the Thevenin equivalent circuit model of the battery is constructed. The model can effectively simulate the characteristic changes of the battery during the charging and discharging process through the combination of equivalent voltage source and resistor, and reflect the dynamic performance of the battery under different current loads. The power consumption of the charging box and the left and right earphones is measured in different working modes to obtain the load characteristic curve under different conditions, which reflects the relationship between the current consumption of the system and the load change. The load characteristic curve is input into the curve fitting algorithm to obtain the load equivalent circuit model, which can characterize the load behavior of the system under various working conditions. Based on the power supply equivalent circuit model, the dynamic model of the charging management chip, the battery equivalent circuit model and the load equivalent circuit model, the circuit topology is connected to obtain the charging system model.
[0015] Step S2: Based on the charging system model, the battery voltage is sampled by a digital controller and the PWM duty cycle is adjusted to obtain constant current charging control parameters; Specifically, the charging system model is discretized to obtain a discrete time state space equation. Based on the discrete time state space equation, a Kalman filter is designed, which is used to track the state change of the battery in real time to obtain a battery state estimator. Through the battery state estimator, the battery voltage is estimated in real time to obtain a battery voltage estimation value. The battery voltage estimation value is compared with the preset target current value to obtain a current error value. In order to convert the current error value into an actual charging control signal, a proportional-integral controller (PI controller) is used, which calculates the adjustment amount of the PWM duty cycle based on the current error value and generates an initial PWM control signal. The initial PWM control signal is subjected to dead zone compensation processing to reduce the control error caused by the dead zone effect and obtain a compensated PWM control signal. The compensated PWM control signal is input into a current ripple prediction model, which is used to predict the current ripple value generated under the current PWM control signal. Based on the predicted current ripple value, the current fluctuation in the current charging process is pre-evaluated, and the compensated PWM control signal is adaptively adjusted to reduce the influence of the current ripple on the charging process, and finally an optimized PWM control signal is obtained. The optimized PWM control signal is input into the charging management chip, which controls the actual output of the charging current according to the signal. In order to improve the control performance of the system, the actual output current value is collected in real time to obtain closed-loop feedback data. Based on the feedback data, the recursive least squares method is used to update the parameters of the charging system model online to better reflect the system characteristics under the current charging state and obtain more accurate constant current charging control parameters.
[0016] Step S3, according to the constant current charging control parameter and the preset voltage threshold, the PID control algorithm is used to adjust the PWM duty cycle to obtain the constant voltage charging control parameter; Specifically, the constant current charging control parameters are input into the voltage prediction model. Based on the historical charging data and battery characteristics, the model can predict the change trend of the battery voltage under the current charging conditions and obtain the battery voltage prediction value. The battery voltage prediction value is compared with the preset voltage threshold, and the voltage error value is calculated to reflect the deviation between the current battery voltage and the target voltage. In order to improve the adaptability and response speed of the PID controller, the fuzzy logic algorithm is used to dynamically adjust the parameters of the PID controller based on the voltage error value. The fuzzy logic algorithm automatically adjusts the proportional, integral and differential coefficients of the PID controller according to the voltage error value and the rate of change to obtain an adaptive PID controller. The adaptive PID controller effectively improves the system's responsiveness to different charging states, so that it can more accurately adjust the PWM duty cycle during the charging process. After the voltage error value is input into the adaptive PID controller, the initial PWM duty cycle adjustment amount is obtained, and the adjustment amount determines the change amplitude of the PWM signal at the next moment. The initial PWM duty cycle adjustment amount is limited to limit the adjustment amount within a safe range to obtain an effective PWM duty cycle adjustment amount. Based on the effective PWM duty cycle adjustment amount, the current PWM duty cycle is updated to obtain the updated PWM duty cycle, thereby realizing dynamic adjustment of the charging process. The updated PWM duty cycle signal is input into the charging management chip to control the output of the charging current, thereby adjusting the battery voltage. At the same time, the actual output voltage value is collected to obtain real-time charging data. The real-time charging data is filtered to remove high-frequency noise and obtain a smoothed voltage feedback signal. The Smith predictor is used to compensate for system delays. During the charging process, due to factors such as sensor measurement delays and control signal transmission delays, the actual charging system will have a certain time lag, which may cause a response lag in the control system and affect the control effect. The Smith predictor compensates for the delay effect by pre-establishing a system delay model and generating a compensated control signal. The compensated control signal is weighted and fused with the original PID controller output signal to obtain the final constant voltage charging control parameters.
[0017] Step S4, inputting the constant current charging control parameter and the constant voltage charging control parameter into the multi-stage charging strategy processor to obtain a multi-stage charging plan; Specifically, the constant current charging control parameters and the constant voltage charging control parameters are input into the battery state evaluation model, which can evaluate the current state data of the battery in real time, including multiple indicators such as the battery voltage, current, temperature, state of charge (SOC) and battery health (SOH). Based on the current state data of the battery, the charging stage of the battery is determined, such as the initial charging stage, the constant current charging stage, the constant voltage charging stage or the trickle charging stage, and a charging stage identifier is assigned to each stage. According to the charging stage identifier, the corresponding basic charging strategy is selected from the preset charging strategy library. The preset charging strategy library stores multiple strategies for different charging stages, such as a low current pre-charging strategy for the initial charging stage, a fast charging strategy for the constant current stage, and a constant voltage holding strategy for the constant voltage stage. After the basic charging strategy is selected, the parameters of the basic charging strategy are optimized according to the current battery state and actual usage conditions, and a candidate charging strategy set is generated, which includes multiple optimization strategies that may be applied to the current charging state. The candidate charging strategy set is input into the charging simulation model for multiple simulations. The charging simulation model simulates the performance of different charging strategies in the actual charging process, and evaluates the performance indicators of each strategy in multiple dimensions such as charging efficiency, charging time, battery temperature rise, and life impact. Through the simulation results, the strategy evaluation results of each candidate charging strategy are obtained. Based on the strategy evaluation results, the comprehensive score of each candidate charging strategy is calculated. The evaluation results of each dimension are weighted and summarized according to certain weights to reflect the overall performance of the strategy. The strategy with the highest comprehensive score is selected as the optimal charging strategy. The optimal charging strategy is decomposed into four stages: trickle, fast, standard, and constant voltage, and a preliminary multi-stage charging scheme is obtained. These charging stages have different charging current and voltage settings, which are used in different stages of battery charging. For example, the trickle stage is used for low-current pre-charging when the battery voltage is low, the fast charging stage is used for high-current charging when the battery SOC is low, the standard charging stage is used for medium-current charging when the battery SOC is close to saturation, and the constant voltage stage is used for low-current charging when the battery is close to full charge. Dividing the optimal charging strategy into these charging stages makes the charging process more accurate and safe, and effectively improves the charging efficiency and life of the battery. Fuzzy processing is performed on the conversion conditions of each stage in the preliminary multi-stage charging scheme. Fuzzy processing introduces fuzzy logic rules so that the transition conditions between different charging stages are no longer a single threshold judgment, but a range containing fuzzy boundaries. This avoids the problem of frequent charging stage switching due to battery state fluctuations or measurement errors, improves the stability and continuity of the charging process, and obtains the final multi-stage charging solution.
[0018] Step S5: Based on the multi-stage charging scheme, the main controller coordinates the charging priority and power allocation of the charging box and the left and right earphones to obtain collaborative charging control data; Specifically, the battery power of the charging box and the left and right earphones is monitored in real time, and the current power state data of each component is collected, including the current battery power, voltage and current information, to reflect the remaining power and usage status of each battery unit in real time. The current power state data is input into the battery life prediction model. The model predicts the battery health indicators of each component based on historical usage data and battery degradation rules, including the remaining usable life (RUL), health state (SOH) and future battery performance trends of the battery. Based on the battery health indicators, the charging priority index is calculated to generate an initial charging priority sequence to reflect the charging demand and urgency of each battery unit under current conditions. The higher the priority index, the worse the battery state or the lower the remaining power of the device, so it needs to be charged first. At the same time, the user's usage habit data is analyzed in time series to obtain the prediction result of the headphone usage frequency. This analysis predicts the user's usage frequency of the left and right earphones in the future period of time by analyzing the user's historical usage data, such as which time periods the left and right earphones are often used and the usage duration. The headphone usage frequency prediction result is weighted fused with the initial charging priority sequence to obtain the adjusted charging priority sequence. Based on the adjusted charging priority sequence, the optimal power allocation scheme is calculated to obtain the initial power allocation strategy. The optimal power allocation scheme is to reasonably allocate the power share to the charging box and the left and right earphones under the premise of a certain total charging power, so that the devices with higher priority can be fully charged or reach a certain power as soon as possible, and the devices with lower priority can obtain the remaining charging power as much as possible without affecting the charging of the priority devices. The initial power allocation strategy is subjected to thermal management constraint analysis. The temperature rise of each component under different charging powers is calculated by combining the temperature sensor data of the device and the temperature characteristics of the battery. The temperature constraint condition is incorporated into the optimization target of the power allocation strategy to obtain the temperature-constrained power allocation scheme. The temperature-constrained power allocation scheme is collaboratively optimized by multi-agent reinforcement learning. The multi-agent reinforcement learning algorithm can learn the optimal collaborative charging strategy between components under complex multi-objective conditions. Through continuous trial and error and adjustment, each agent (i.e., the charging box and the left and right earphones) learns how to coordinate the allocation of charging power in different charging stages and states to maximize the overall charging efficiency and safety of the system. The resulting collaborative charging strategy can dynamically adapt to different charging scenarios and battery states, while optimizing charging efficiency and minimizing the loss of battery life. According to the collaborative charging strategy, collaborative charging control data is generated. The control data includes information such as the specific charging power, charging time, and switching conditions of each stage in each charging stage, which can effectively guide the main controller to dynamically coordinate and manage various components during the charging process, and realize intelligent collaborative charging between the charging box and the left and right earphones.
[0019] Step S6: Input the collaborative charging control data into the multimodal time series graph attention network model, and obtain a dynamic adaptive charging strategy by performing multi-dimensional analysis on the charging history, usage pattern, and battery health status.
[0020] Specifically, the collaborative charging control data is decomposed into three sub-datasets: charging history data, usage pattern data, and battery health data. A time series graph is constructed for the charging history data, and the charging history data is arranged in order with time as the axis. The charging state changes at different times are represented by establishing the relationship between nodes and edges to obtain the charging history time series graph. Then the time series graph is input into the time series graph convolution layer for feature extraction. The time series graph convolution layer contains 3 graph convolution sublayers, each of which uses Chebyshev polynomial approximation for convolution operation, so as to efficiently capture the local and global features of the charging state in the time series graph, obtain the graph feature representation, and describe the evolution pattern of charging behavior over time. At the same time, the usage pattern data is sequence embedded, and the user's usage habit data is converted into a continuous feature vector sequence to obtain the usage pattern sequence feature. The sequence feature is input into the multi-head self-attention mechanism, which consists of 8 attention heads. Each attention head independently calculates the linear projection of the query, key, and value, and performs a scaled dot product attention operation on this basis to capture the long-range dependency and fine-grained context information in the sequence data. By weighting and aggregating the results of different attention heads, attention-weighted features are obtained, which reflect the global structure of user usage patterns and highlight important information in different usage scenarios. When extracting features from battery health data, the relevant data is input into the gated recurrent unit. The gated recurrent unit contains an update gate and a reset gate, which updates the hidden state by controlling the flow of information, so that the dynamic features of the battery health status can be effectively extracted from the time series data to obtain the time series health features. The update gate determines to what extent the state of the previous moment and the input information of the current moment affect the hidden state of the current moment, while the reset gate determines how to forget the information of the previous moment. This design enables GRU to capture the time series features of battery health status, including the trend of battery performance over time and potential degradation patterns. The graph feature representation, attention-weighted features and time series health features are fused. By adopting residual connections and layer normalization, the features of different modalities are effectively integrated to obtain multimodal fusion features. Residual connections can alleviate the problem of gradient vanishing in deep networks, and layer normalization can accelerate the training process and improve the generalization ability of the model. The multimodal fusion features contain comprehensive information about charging history, user usage patterns, and battery health status. The multimodal fusion features are input into the fully connected layer and processed using Dropout regularization and ReLU activation function to obtain the potential representation of the charging strategy. Dropout regularization can prevent the model from overfitting, while the ReLU activation function can enhance the nonlinear expression ability of the model, thereby extracting the potential representation of the charging strategy. The potential representation of the charging strategy is decoded and the probability distribution of multiple charging parameters is output using the Softmax function.Charging parameters include charging current, voltage threshold, charging stage duration, etc. The output of these parameters is converted into probability distribution through the Softmax function to determine their optimal values under different charging conditions. Based on the probability distribution of charging parameters, a dynamic adaptive charging strategy is obtained. This strategy can automatically adjust charging parameters at different charging stages according to the current battery status, historical charging behavior, and user usage habits, realize intelligent charging control, improve charging efficiency, extend battery life, and optimize user experience.
[0021] In the embodiment of the present invention, by carrying out detailed circuit modeling of the charging box, left and right earphones and their batteries, a charging system model including a power supply, a charging management chip, a battery equivalent circuit and a load is obtained, which provides an accurate theoretical basis for subsequent charging control and helps to improve charging efficiency and accuracy. The battery state estimation and adaptive PID control algorithm based on Kalman filter are adopted to realize accurate control of constant current charging and constant voltage charging processes, and the charging parameters can be adjusted in real time according to the battery state, thereby improving the stability and safety of charging. Through the multi-level charging strategy processor, the intelligent switching of the four stages of trickle, fast, standard and constant voltage is realized, and the fuzzy processing is introduced to realize smooth transition, effectively balancing the charging speed and battery life. The main controller is used to coordinate the charging priority and power allocation of the charging box and the left and right earphones, and combined with the multi-agent reinforcement learning technology, the collaborative charging optimization between multiple devices is realized, and the overall charging efficiency is improved. Through the multimodal time series graph attention network model, the charging history, usage mode and battery health status are analyzed in multiple dimensions, and the generation of dynamic adaptive charging strategy is realized, which can predict and adapt to the user's usage habits and further optimize the charging process. Multiple safety mechanisms are introduced during the charging process, such as thermal management constraint analysis and safety assessment, which effectively reduce the risks of overcharging, over-discharging and temperature abnormalities, and improve the reliability and safety of the charging system. By comprehensively considering the battery health status, usage frequency prediction and charging strategy optimization, unnecessary charging times and improper charging behaviors are effectively reduced, extending the battery life. Based on the analysis and prediction of user usage habits, the charging strategy can better adapt to individual needs, such as automatically charging before the user may use the headphones, improving the product's intelligence level and user satisfaction.
[0022] In a specific embodiment, the process of executing step S1 may specifically include the following steps: Extract parameters of the input power of the charging box to obtain power characteristic data, and based on the power characteristic data, perform equivalent circuit modeling on the power supply to obtain a power equivalent circuit model; The input and output characteristics of the charging management chip are measured to obtain the chip transfer function, and the chip transfer function is input into the system identification algorithm to obtain the dynamic model of the charging management chip; Perform charge and discharge tests on the batteries of the charging box and the left and right earphones to obtain battery capacity and internal resistance data. Based on the battery capacity and internal resistance data, construct the battery Thevenin equivalent circuit to obtain the battery equivalent circuit model. The power consumption of the charging box and the left and right earphones is measured under different working conditions to obtain a load characteristic curve, and the load characteristic curve is input into a curve fitting algorithm to obtain a load equivalent circuit model; Based on the power supply equivalent circuit model, the charging management chip dynamic model, the battery equivalent circuit model and the load equivalent circuit model, the circuit topology connection is performed to obtain the charging system model.
[0023] Specifically, the input power of the charging box is parameter extracted to obtain power characteristic data. This includes measuring the input voltage ( )、Input current( ) and the ripple voltage and transient response of the power supply under different load conditions. Through these measurement data, the static and dynamic characteristics of the power supply are characterized. For example, if the measured input voltage changes over time as , the input current changes with time as , the instantaneous power of the power supply is expressed by the following formula: ; in, Indicates the input power at time The instantaneous power, Indicates the input voltage, Represents the input current. The instantaneous power characteristics of the input power are obtained through this formula, and its average power and power fluctuation parameters are calculated. The power supply is modeled as an equivalent circuit based on the characteristic data. For example, for an active power supply, it is equivalent to an ideal power supply and a series internal resistance A model is constructed in which the ideal power supply represents the open-circuit voltage of the power supply, and the internal resistance represents the output impedance characteristics of the power supply. This model can more accurately describe the voltage and current distribution of the power supply under different load conditions. The input and output characteristics of the charging management chip are measured. The input of the charging management chip includes the power supply voltage, the charging current setting signal, and the feedback signal, while the output is the charging current, the charging voltage, and the status indication signal. In order to construct a dynamic model of the charging management chip, its transfer function is measured under different input voltages and different load conditions. The transfer function is expressed as the relationship between the input signal and the output signal. For example, if the input voltage is , the output current is , the dynamic response of the chip is represented by the following transfer function: ; in, represents the transfer function of the charge management chip, is the complex frequency variable in the Laplace transform, and Represent the Laplace transform form of output current and input voltage respectively. The transfer function data under different input conditions are obtained through experimental measurement, and then input into the system identification algorithm to obtain the dynamic model of the charging management chip. This model can describe the gain and phase characteristics of the chip under different frequency conditions, as well as the dynamic response performance under different input conditions. For the battery part of the charging box and the left and right earphones, charge and discharge tests are carried out to obtain the key parameters of the battery, including battery capacity ( ) and internal resistance ( ). These data are obtained through constant current charge and discharge experiments, that is, a constant current is applied to the battery, the voltage changes over time are recorded, and the capacity and internal resistance of the battery are calculated. Based on these data, the Thevenin equivalent circuit is used to describe the characteristics of the battery. The Thevenin equivalent circuit usually includes an open circuit voltage source ( ) and a series internal resistor ( ), its mathematical expression is: ; in, Indicates the battery terminal voltage, Represents the battery current, represents the open circuit voltage of the battery, Represents the internal resistance of the battery. Through this model, the voltage, current and power changes of the battery during the charging and discharging process are described. The power consumption of the charging box and the left and right earphones in different working states is measured, including charging state, standby state and discharging state. By measuring the power consumption data in different states, the load characteristic curve is drawn to reflect the power consumption of the system under different voltage and current conditions. The load characteristic curve is input into the curve fitting algorithm to obtain the equivalent circuit model of the load. The load equivalent circuit model is usually represented by a combination of a dynamic resistor and a capacitor to describe the energy consumption characteristics of the system under different states. Based on the power supply equivalent circuit model, the charging management chip dynamic model, the battery equivalent circuit model and the load equivalent circuit model, the model of the entire charging system is constructed through the circuit topology connection. For example, in the actual charging system, the power supply model is used as the input source, connected to the battery model through the charging management chip model, and then the battery charging and discharging process is represented by the load model. On the simulation platform, each sub-model is connected according to the actual circuit topology, and the necessary feedback and control links are added to finally obtain a complete charging system model.
[0024] In a specific embodiment, the process of executing step S2 may specifically include the following steps: The charging system model is discretized to obtain a discrete time state space equation, and based on the discrete time state space equation, a Kalman filter is designed to obtain a battery state estimator; The battery voltage is estimated in real time by using a battery state estimator to obtain a battery voltage estimation value, and the battery voltage estimation value is compared with a preset target current value to obtain a current error value; Based on the current error value, a proportional-integral controller is used to calculate the PWM duty cycle adjustment amount to obtain an initial PWM control signal, and a dead zone compensation process is performed on the initial PWM control signal to obtain a compensated PWM control signal; Inputting the compensated PWM control signal into the current ripple prediction model to obtain a predicted current ripple value, and adaptively adjusting the compensated PWM control signal based on the predicted current ripple value to obtain an optimized PWM control signal; The optimized PWM control signal is input into the charging management chip, and the actual output current value is collected to obtain closed-loop feedback data. Based on the closed-loop feedback data, the parameters of the charging system model are updated using the recursive least squares method to obtain the constant current charging control parameters.
[0025] Specifically, the charging system is modeled as a continuous-time state-space equation. The state-space equation consists of a state equation and an output equation, which describes the dynamic behavior of the system. Assume that the state equation of the charging system model in continuous time is expressed as: ; in, Indicates system status About time The derivative of is the system matrix, which represents the state transition relationship of the system. is the input matrix, representing the control input Impact on system status. In the charging system, the system status Including variables such as battery state of charge (SOC), battery voltage, current, etc., and the control input It represents the control signal such as PWM duty cycle. In order to perform digital control, the continuous time model is discretized to obtain the discrete time state space equation. The discretization process uses the zero-order hold method to convert the state space model into a sampling time interval. Discretization is performed to obtain the state space equation under discrete time: ; ; in, For discrete time The system status at the moment, is the input signal, For system output, such as battery voltage , , , are the system matrices under discrete time respectively. Through discretization, the original continuous time dynamic model is converted into a form that can be implemented in a digital controller. Based on the discrete time state space equation, a Kalman filter is designed to estimate the state of the battery. The Kalman filter is a recursive optimal state estimation algorithm that can estimate the system state in the presence of noise interference. The system state is estimated through two steps: prediction and update. In each sampling period, the Kalman filter first predicts the system state at the next moment, then corrects the predicted value according to the new measurement value, and outputs the estimated system state. The prediction step of the Kalman filter is expressed as: ; ; in, Indicates The predicted value of the state at the moment, It is The estimated state value at time is the predicted value of the state covariance matrix, reflecting the credibility of the state estimation, is the process noise covariance matrix. Then in the update step, according to the currently measured battery voltage With the predicted battery voltage The difference between (called the residual) corrects the predicted state estimate: ; ; ; in, is the Kalman gain, which represents the weight of the new measurement data on the state estimation, is the measurement noise covariance matrix, It is The state estimation value updated at all times is the output of the battery state estimator. Through the above recursive process, the battery voltage is estimated in real time to obtain the battery voltage estimation value. The battery voltage estimation value is compared with the preset target current value to obtain the current error value. Based on the error value, a proportional-integral (PI) controller is used to calculate the adjustment amount of the PWM duty cycle. The output of the PI controller is expressed as: ; in, Indicates The control input at the moment, that is, the initial PWM control signal, Indicates the current error value at the current moment, and are proportional and integral coefficients respectively. In order to eliminate the dead zone effect caused by the switching characteristics of power electronic equipment, the initial PWM control signal is subjected to dead zone compensation to obtain the compensated PWM control signal. Dead zone compensation is achieved by adding a compensation term To correct the initial PWM control signal so that it can overcome the dead zone effect, the specific expression is: ; in, Represents the dead zone compensation amount. The compensated PWM control signal can more accurately reflect the output intention of the PI controller and reduce the control deviation caused by the dead zone effect. The compensated PWM control signal is input into the current ripple prediction model. The current ripple prediction model calculates the current ripple value generated under the current PWM signal based on parameters such as switching frequency, load impedance and filter inductance. Assume that the maximum amplitude of the ripple current is , then use the following formula to estimate: ; in, is the input voltage, is the PWM duty cycle, is the switching cycle, is the filter inductor. By calculating and predicting the current ripple value, it is evaluated whether the current PWM signal may cause excessive current fluctuations and affect the stability of the charging process. According to the predicted current ripple value, the compensated PWM control signal is adaptively adjusted to reduce the impact of current ripple on charging control and obtain the optimized PWM control signal. The optimized PWM control signal is input into the charging management chip to control the actual charging current of the battery. In order to improve the control accuracy, the actual output current value is collected in real time to obtain closed-loop feedback data. Based on these feedback data, the recursive least squares method is used to update the parameters of the charging system model online. The recursive least squares method can adjust the model parameters in real time when the system parameters change to maintain the model's accurate description of the system. The update formula of the recursive least squares method is as follows: ; ; ; in, represents the model parameters at the current moment, To measure the output, is the regression vector, which contains input and historical state information, is the covariance matrix, is the forgetting factor. Through the above updating process, more accurate constant current charging control parameters are obtained to achieve high-precision control of the charging process.
[0026] In a specific embodiment, the process of executing step S3 may specifically include the following steps: Inputting the constant current charging control parameter into the voltage prediction model to obtain a battery voltage prediction value, and comparing the battery voltage prediction value with a preset voltage threshold to obtain a voltage error value; Based on the voltage error value, the PID controller parameters are dynamically adjusted using a fuzzy logic algorithm to obtain an adaptive PID controller, and the voltage error value is input into the adaptive PID controller to obtain an initial PWM duty cycle adjustment amount; The initial PWM duty cycle adjustment amount is limited to obtain an effective PWM duty cycle adjustment amount, and based on the effective PWM duty cycle adjustment amount, the current PWM duty cycle is updated to obtain an updated PWM duty cycle; The updated PWM duty cycle is input into the charging management chip, and the actual output voltage value is collected to obtain real-time charging data, and the real-time charging data is filtered to obtain a smoothed voltage feedback signal; Based on the smoothed voltage feedback signal, the Smith predictor is used to compensate for the system delay to obtain the compensated control signal, which is then weightedly fused with the original PID output to obtain the constant voltage charging control parameters.
[0027] Specifically, the constant current charging control parameters are input into the voltage prediction model to predict the voltage change trend of the battery under the current charging conditions. The voltage prediction model is based on the equivalent circuit model of the battery, such as the Thevenin model or the composite model, and uses historical charging data and current charging parameters, such as charging current, battery temperature and other information, to predict the battery voltage at a certain point in the future. Assume that the battery voltage at the current moment is , the charging current is , the open circuit voltage of the battery is , the internal resistance is , then the battery voltage prediction model is expressed as: ; in, for The predicted battery voltage value after time, The open circuit voltage of the battery, which usually increases gradually during the charging process. is the internal resistance of the battery, which reflects the internal loss of the battery. Through this model, the value of the battery voltage at the future moment is estimated to obtain the predicted value of the battery voltage. The predicted value of the battery voltage is compared with the preset voltage threshold to obtain the voltage error value. The voltage error value represents the deviation between the current predicted voltage and the target voltage. If the predicted voltage exceeds the voltage threshold, it means that the battery is close to saturation and the charging current should be appropriately reduced; if the predicted voltage is lower than the threshold, the charging current should be appropriately increased to improve the charging efficiency. Based on the voltage error value, the fuzzy logic algorithm is used to dynamically adjust the parameters of the PID controller to generate an adaptive PID controller. The fuzzy logic algorithm maps the input voltage error value to the proportion of the PID controller by defining a set of fuzzy rules ( ),integral( ) and differential ( ) coefficient. Automatically adjust the parameters of the PID controller according to different error conditions, thereby improving the adaptability of the controller. For example, the fuzzy rule definition: when the voltage error is large, increase To enhance the response speed of the system; when the error changes rapidly, increase To suppress overshoot; when the error exists for a long time, increase to eliminate the steady-state error. These rules are expressed in the following form: If the voltage error (e) is positive and large, then For the great, For small, is medium; if the voltage error (e) is negative and small, then For the middle, For the middle, is small. Based on fuzzy rules, the fuzzy logic algorithm calculates the corresponding PID parameters and dynamically adjusts the PID controller to obtain an adaptive PID controller. The voltage error value is input into the adaptive PID controller to calculate the initial PWM duty cycle adjustment. The output of the PID controller is usually expressed as: ; in, is the initial PWM duty cycle adjustment, is the current voltage error value, , , They are the proportional, integral and differential coefficients of the adaptive PID controller respectively. In this way, the parameters of the PID controller are automatically adjusted under different error conditions to achieve more precise control. The initial PWM duty cycle adjustment is limited to prevent the PWM duty cycle adjustment output by the controller from being too large or too small, causing the charging current to exceed the safe range or the charging speed to be too slow. The limiting process usually limits the PWM duty cycle to a reasonable range, for example, setting the maximum value of the duty cycle to 90% and the minimum value to 10%. The specific limiting process is expressed by the following expression: ; in, is the effective PWM duty cycle adjustment after limiting, and They are the upper and lower limits of the PWM duty cycle respectively. Based on the effective PWM duty cycle adjustment amount, the current PWM duty cycle is updated to obtain the updated PWM duty cycle. The updated PWM duty cycle signal is input into the charging management chip to control the charging current and voltage of the battery. In this process, the actual output voltage value is collected in real time to obtain real-time charging data. The real-time charging data is filtered. The filtering process uses a low-pass filter or a Kalman filter to remove high-frequency noise and unstable signals to obtain a smoothed voltage feedback signal. The expression of the filtering process is expressed as: ; in, is the filtered voltage signal, is the measured original voltage signal, is the filter coefficient, usually between 0 and 1, indicating the weighted ratio of new and old data. Through filtering, the high-frequency fluctuations of the voltage signal during the charging process are effectively eliminated to obtain a smooth voltage feedback signal. Based on the smoothed voltage feedback signal, the Smith predictor is used to compensate for the system delay. The Smith predictor eliminates the delay effect of the system by introducing a prediction model that includes a delay model. The delayed part is separated from the system model and compensated by prediction. The control signal compensated by the Smith predictor can be closer to the ideal control effect and reduce the control error caused by delay. The compensated control signal is weightedly fused with the output of the original PID controller to obtain the final constant voltage charging control parameters. The weighted fusion process is expressed as: ; in, is the final control signal, is the output of the original PID controller, is the control signal after Smith predictor compensation, is a weighting coefficient used to balance the weights of the two signals. Through weighted fusion, the system response speed is improved while the adverse effects of delay are reduced, and more stable and accurate constant voltage charging control parameters are obtained.
[0028] In a specific embodiment, the process of executing step S4 may specifically include the following steps: Inputting constant current charging control parameters and constant voltage charging control parameters into a battery state evaluation model to obtain battery current state data, and determining an initial charging stage based on the battery current state data to obtain a charging stage identifier; According to the charging stage identifier, a corresponding basic charging strategy is selected from a preset charging strategy library to obtain an initial charging strategy, and parameters of the initial charging strategy are optimized to generate a candidate charging strategy set; The candidate charging strategy set is input into the charging simulation model for multiple simulations to obtain the strategy evaluation results. Based on the strategy evaluation results, the comprehensive score of each candidate charging strategy is calculated to select the optimal charging strategy. The optimal charging strategy is decomposed into four stages: trickle, fast, standard and constant voltage, to obtain a preliminary multi-stage charging scheme. The conversion conditions of each stage in the preliminary multi-stage charging scheme are fuzzy processed to obtain the final multi-stage charging scheme.
[0029] Specifically, the constant current charging control parameters and the constant voltage charging control parameters are input into the battery state evaluation model to obtain the current state data of the battery. The constant current charging control parameters include the current charging current, the maximum allowable current, the target SOC (state of charge) and other information, while the constant voltage charging control parameters include the target voltage, the maximum voltage and the like. These parameters reflect the specific control targets during the charging process. The battery state evaluation model calculates the current state data of the battery in real time by inputting these parameters and combining the actual measurement data of the battery, such as the current voltage, current, temperature, SOC, etc. The battery state data usually includes the battery's SOC (State of Charge), SOH (State of Health), temperature (T), charging current (I) and battery internal resistance (R). SOC indicates the current charge level of the battery, which is estimated by the coulomb counting method or the open circuit voltage method; SOH reflects the health of the battery, indicating the capacity retention rate and internal resistance increase of the battery relative to a new battery. For the battery state data at a certain moment, it is represented as a vector: ; in, Indicates the battery time The state vector at the moment, SOC is the state of charge, SOH is the state of health, T is the temperature, I is the charging current, and R is the internal resistance. Based on the state vector, the evaluation model determines the current working state of the battery, and determines the charging stage of the battery in combination with the charging parameters. For example, when the SOC of the battery is low and the temperature is moderate, the battery enters the constant current charging stage; when the SOC is high and close to 100%, it enters the constant voltage charging stage, and the initial charging stage identifier is obtained. According to the charging stage identifier, the corresponding basic charging strategy is selected from the preset charging strategy library. The preset charging strategy library stores various strategy templates for different battery types and charging stages, including different charging currents, charging times, and voltage control curves. For example, for lithium batteries, the charging strategy includes three stages: constant current charging stage, constant voltage charging stage, and trickle charging stage. For example, the basic charging strategy stipulates that the charging current in the constant current stage is 80% of the maximum allowable current, the voltage in the constant voltage stage is maintained at 4.2V, and the charging current in the trickle stage is reduced to less than 100mA. The parameters of the initial charging strategy are optimized according to the current battery state and environmental conditions to generate a candidate charging strategy set. The parameter optimization process dynamically adjusts the parameters of the charging strategy based on information such as battery temperature, internal resistance, and health status. For example, if the current battery temperature is high, the charging current is appropriately reduced to prevent battery aging or safety problems caused by excessive temperature; if the battery SOH is poor, the voltage and current need to be reduced to extend the battery life. The optimized candidate charging strategy set is expressed as: ; in, represents the candidate charging strategy set, Indicates candidate charging strategies, is the number of candidate strategies. Each candidate strategy Including multiple charging parameters, such as maximum current, maximum voltage, charging stage duration, etc. Through the combination of different strategies, a variety of candidate strategies that adapt to different battery states are formed. The candidate charging strategy set is input into the charging simulation model for multiple simulations. The charging simulation model can simulate the changes in voltage, current, temperature and SOC of the battery under different charging strategies, as well as indicators such as charging efficiency and charging time. Through multiple simulations, the strategy evaluation results of each candidate charging strategy are obtained. The evaluation results include charging time )、Charging efficiency( )、Battery temperature rise( )、SOC increment( ), etc. Each evaluation result is represented by a function: ; in, Representation strategy The evaluation result vector of It is charging time. is the charging efficiency, is the battery temperature rise, is the SOC increment. Based on the evaluation results, the comprehensive score of each candidate charging strategy is calculated. The comprehensive score adopts the weighted summation method to weight each evaluation index according to the preset weight. The calculation formula of the comprehensive score is expressed as: ; in, Candidate strategy The comprehensive score of is the weight coefficient of each evaluation index. The strategy with a higher comprehensive score performs better under the current battery state. By comparing the comprehensive scores of all candidate strategies, the strategy with the highest score is selected as the optimal charging strategy. The selected optimal charging strategy is decomposed into four stages: trickle, fast, standard and constant voltage, and a preliminary multi-stage charging scheme is obtained. These charging stages correspond to different current and voltage control strategies. For example, in the trickle charging stage, the current is very small (generally below 50mA), which is used for small current pre-charging when the battery voltage is low; in the fast charging stage, the current is large (up to 80-90% of the maximum charging current), which is used to quickly increase the SOC; the current is moderate in the standard charging stage, which is used to balance the charging efficiency and temperature rise; the constant voltage stage keeps the voltage unchanged, and the current gradually decreases until it is full. Thereby effectively improving the charging efficiency and battery life. In order to make the multi-stage charging scheme more adaptable to complex charging environments and battery states, the transition conditions of each stage in the preliminary multi-stage charging scheme are fuzzy processed to avoid frequent charging state changes caused by strict threshold switching. The fuzzy processing fuzzifies the transition conditions of different stages by setting fuzzy rules. For example, when the SOC is between 80% and 85%, it smoothly transitions from the fast charging stage to the standard charging stage, reducing the impact of frequent switching of the charging stage on the battery and charging system, and obtaining a smoother charging curve and charging experience. After fuzzy processing, the final multi-stage charging solution can dynamically adjust the charging strategy according to the real-time status of the battery and the external environment.
[0030] In a specific embodiment, the process of executing step S5 may specifically include the following steps: Monitor the battery power of the charging box and the left and right earphones in real time to obtain the current power status data, and input the current power status data into the battery life prediction model to obtain the battery health status indicators of each component; Based on the battery health status indicator, the charging priority index is calculated to obtain the initial charging priority sequence, and the user usage habit data is analyzed in time series to obtain the headphone usage frequency prediction result; The headphone usage frequency prediction result is weightedly integrated with the initial charging priority sequence to obtain an adjusted charging priority sequence; Based on the adjusted charging priority sequence, the optimal power allocation scheme is calculated to obtain the initial power allocation strategy, and the thermal management constraint analysis is performed on the initial power allocation strategy to obtain the temperature-constrained power allocation scheme; The temperature-constrained power allocation scheme is collaboratively optimized using multi-agent reinforcement learning to obtain a collaborative charging strategy, and collaborative charging control data is generated based on the collaborative charging strategy.
[0031] Specifically, the battery power of the charging box and the left and right earphones is monitored in real time to obtain the current power status data of each battery. The current power status data includes information such as the battery state of charge (SOC), battery voltage, battery current, and temperature. These data are collected in real time through the voltage, current sensor, and temperature sensor in the battery management system (BMS), reflecting the remaining power and current working status of each battery cell. For example, SOC indicates the remaining capacity of the battery relative to the rated capacity of the battery, expressed as a percentage. Assume that the rated capacity of the battery is , then SOC is expressed as: ; Among them, SOC represents the percentage of the battery's state of charge. is the current remaining battery power, is the rated capacity of the battery. Through real-time monitoring, the charge status of each battery cell is obtained. The current charge status data is input into the battery life prediction model, which uses historical charge and discharge data, current working conditions, and battery degradation models to predict the health of the battery. The battery health status is usually expressed as SOH, which reflects the performance retention of the battery relative to a new battery. Assume that the capacity of the new battery is , and the current effective capacity of the battery is , then SOH is expressed as: ; Among them, SOH is the health status percentage of the battery, is the current effective capacity of the battery, is the capacity of a new battery. The battery life prediction model outputs other health indicators, such as the increase in internal resistance and the rate of capacity decay, which comprehensively reflect the aging degree and future availability of the battery. Based on the health indicators of each battery cell, the charging priority index of each battery cell is calculated. The charging priority index indicates the urgency of charging each battery cell under current conditions, which depends on factors such as the remaining power, health status, and current temperature of the battery. Assuming the charging priority index It is expressed by the following formula: ; in, , and are weight coefficients, which respectively represent the influence weights of SOC, SOH and temperature on charging priority; is the temperature influencing factor, which is zero in the normal temperature range and positive in high or low temperature environments, and is used to increase the urgency of charging at abnormal temperatures. According to this formula, the charging priority index is calculated for each battery cell. The higher the priority index of a battery cell, the earlier it needs to be charged to prevent over-discharge or battery performance degradation due to poor health. Sort the battery cells from high to low according to the priority index to obtain the initial charging priority sequence. Perform time series analysis on user usage habit data to obtain the prediction results of the headphone usage frequency. The frequency of headphone usage is predicted by analyzing historical usage data, including information such as the daily usage time of the headphone, the usage period, and the duration of a single use. Use a time series analysis model, such as an ARIMA model or an LSTM network, to predict the frequency distribution of headphone usage in the future. For example, suppose the predicted frequency distribution of headphone usage for a user in the next day is: ; in, Indicates at time Frequency of use, is the maximum frequency of use, is a parameter that controls the attenuation rate of the used frequency. is the main usage period of the user. Based on this distribution, the peak and trough periods of headset usage are determined, and the power demand of the headset in different time periods is inferred. The headset usage frequency prediction result is weighted fused with the initial charging priority sequence to obtain the adjusted charging priority sequence. The weighted fusion process is expressed by the following formula: ; in, Represents the final charging priority index, is a weighting coefficient, which indicates the weight of battery health status and user usage habits in charging priority decision. is the initial charging priority index, The result of the headphone usage frequency prediction. Through the weighted fusion process, the current state of the battery and future usage requirements are comprehensively considered to reasonably arrange the charging priority of each battery unit. Based on the charging priority sequence, the optimal power allocation scheme is calculated. The optimal power allocation scheme is to reasonably allocate the power share to the charging box and the left and right earphones under the premise of limited charging power, so that devices with higher priority can be fully charged or reach the predetermined power target earlier, while devices with lower priority are allocated the remaining charging power. According to the charging priority index of each device , constrain the power allocation of each device so that the power allocation ratio satisfies: ; ; in, , and are the charging priority indexes of the left earphone, right earphone and charging box respectively. The initial power allocation strategy is determined in this way. A thermal management constraint analysis is performed on the initial power allocation strategy to obtain a temperature-constrained power allocation solution. The thermal management constraint analysis calculates the temperature rise of each device based on the current battery temperature, ambient temperature and charging current, and compares the temperature rise with the safe temperature threshold. Assume that the temperature rise model of a device is: ; in, is the temperature rise, is the charging power, is the thermal resistance, is the heat dissipation area. When a certain threshold is exceeded, the charging power is reduced to obtain a temperature-constrained power allocation scheme. The temperature-constrained power allocation scheme is collaboratively optimized by multi-agent reinforcement learning. The multi-agent reinforcement learning algorithm can learn the optimal collaborative charging strategy between various devices under complex multi-objective conditions. Each agent (i.e., the charging box, left earphone, and right earphone) continuously tries and adjusts the power allocation scheme under different charging states and environmental conditions, and learns the optimal strategy through a reward and penalty mechanism. The final collaborative charging strategy can dynamically adapt to different charging scenarios and battery states to achieve optimal power allocation. Based on the collaborative charging strategy, collaborative charging control data is generated. The control data includes information such as the specific charging power, charging time, and switching conditions of each stage under each charging stage, which can effectively guide the main controller to dynamically coordinate and manage the various components during the charging process, thereby realizing intelligent collaborative charging between the charging box and the left and right earphones.
[0032] In a specific embodiment, the process of executing step S6 may specifically include the following steps: Decompose the collaborative charging control data into three sub-datasets: charging history data, usage pattern data, and battery health status data; Construct a time series graph for the charging history data to obtain a charging history time series graph, and input the charging history time series graph into the time series graph convolution layer. The time series graph convolution layer contains three graph convolution sublayers. Each sublayer uses Chebyshev polynomial approximation to perform convolution operations to obtain graph feature representation. Perform sequence embedding on the usage pattern data to obtain usage pattern sequence features, which are then fed into a multi-head self-attention mechanism. The multi-head self-attention mechanism contains eight attention heads, each of which independently calculates the linear projection of the query, key, and value, and then performs a scaled dot product attention operation to obtain attention-weighted features. Extract features from the battery health data to obtain a battery health feature vector, and input the battery health feature vector into a gated recurrent unit. The gated recurrent unit includes an update gate and a reset gate. By controlling the flow of information, the hidden state is updated to obtain a time series health feature. The graph feature representation, attention weighted features and temporal health features are fused, and residual connection and layer normalization are used to obtain multimodal fusion features. The multimodal fusion features are input into the fully connected layer, and the Dropout regularization and ReLU activation function are used to obtain the potential representation of the charging strategy; The charging strategy potential representation is decoded, and the Softmax function is used to output the probability distribution of multiple charging parameters to obtain a dynamic adaptive charging strategy.
[0033] Specifically, the collaborative charging control data is decomposed into three sub-datasets: charging history data, usage pattern data, and battery health data. The charging history data includes the records of the changes in charging current, charging voltage, charging time, charging temperature, etc. over time, reflecting the charging behavior of the battery in the past period of time. The usage pattern data includes the frequency of use of the headset, the duration of use, and the period of use, etc. These data can characterize the user's usage habits of the headset in different time periods. The battery health data includes information such as the battery's state of health (SOH), state of charge (SOC), and internal resistance (IR), which can describe the current performance and future service life of the battery. A time series graph is constructed for the charging history data to obtain a charging history time series graph. The time series graph is a graph model used to represent the structure of time series data. The charging state (such as current, voltage, temperature, etc.) at each time point is used as a node of the graph, and these nodes are connected in time order to form a directed graph. In the time series graph, each node contains the charging state data at that time point, and is also connected to the nodes at adjacent time points through edges. The edge weight represents the similarity or time interval between the states. The goal of constructing a timing graph is to capture the time dependencies and trend patterns in the charging history data. The charging history timing graph is input into the timing graph convolution layer for feature extraction. The timing graph convolution layer contains three graph convolution sublayers, each of which uses the Chebyshev polynomial approximation method for convolution operations. The graph convolution network updates the representation of each node by aggregating the information of neighboring nodes. The Chebyshev polynomial approximation can perform graph convolution operations quickly and efficiently without calculating the eigendecomposition of the graph Laplacian matrix. Suppose a node in the timing graph The characteristic is expressed as , No. The graph convolution operation of the layer is expressed as: ; Among them, N Representation Node The set of neighbor nodes of For the The coefficients of the Chebyshev polynomials of the layer, is the graph Laplacian matrix The Chebyshev polynomial approximation of , Represents neighbor nodes In the Through the processing of three graph convolution sublayers, the information of neighbor nodes can be aggregated layer by layer, the global and local patterns in the charging history data can be captured, and the graph feature representation of each node can be obtained. At the same time, the usage pattern data is subjected to sequence embedding. Sequence embedding is a process of converting discrete usage pattern data (such as time period, usage frequency, etc.) into continuous feature vectors. By using the embedding matrix , mapping each discrete usage pattern data into a vector of fixed dimension. Assume that the usage pattern data for a certain period of time is , the embedding operation is expressed as: ; in, For time period The embedding representation of is the embedding matrix, is a discrete representation of usage pattern data. Through the embedding operation, the sequence data is converted into a continuous feature representation. The usage pattern sequence features are input into the multi-head self-attention mechanism. The multi-head self-attention mechanism contains 8 attention heads, each of which independently calculates the linear projection of the query (Q), key (K), and value (V), and then performs a scaled dot product attention operation. For each attention head , the attention operation is expressed as: ; in, , and are the projection matrices for query, key, and value, respectively, is the dimension of the key vector, softmax Used to calculate attention weights. The multi-head self-attention mechanism can capture long-range dependencies and multi-scale information in sequence data and obtain attention weighted features. . For the battery health data, feature extraction is performed to obtain a battery health feature vector. The battery health feature vector usually includes information such as SOH, SOC, internal resistance, and temperature. The feature vector is input into the gated recurrent unit for timing feature extraction. The gated recurrent unit controls the flow of information in the hidden state by updating the gate and resetting the gate to capture the dynamic changes in the battery health state. The state update formula of the gated recurrent unit is: in, is the hidden state at the current moment, To update the gate, control the state of the previous moment Impact on the current state, For candidate status, To reset the door, determine the state at the previous moment Whether to reset. Through the information processing mechanism of the gated recurrent unit, the temporal health feature representation is obtained . The graph features are represented as , attention weighted features and time series health characteristics Perform feature fusion. Feature fusion uses residual connection and layer normalization to preserve the information integrity of different modal features. Residual connection effectively prevents the gradient vanishing problem by adding original features to feature fusion, while layer normalization speeds up the convergence of the model and improves generalization ability. The formula for feature fusion is expressed as: ; in, is the fused multimodal feature representation, and LayerNorm(·) represents the layer normalization operation. Through feature fusion, information from different data modalities can be integrated to improve the understanding of battery status and usage patterns. The input is processed in the fully connected layer. The fully connected layer maps the high-dimensional multimodal features to the potential representation space of the charging strategy through linear transformation and nonlinear activation function. The ReLU activation function is used to introduce nonlinearity, and Dropout regularization is used to prevent the model from overfitting. The output of the fully connected layer is expressed as: ; in, is a potential representation of the charging strategy, is the weight matrix of the fully connected layer, is the bias term, is a nonlinear activation function. Through the processing of this layer, the potential representation of the charging strategy is obtained. The potential representation of the charging strategy is input into the policy decoder. The policy decoder uses the Softmax function to map the potential representation of the charging strategy to the probability distribution of multiple charging parameters. The expression of the Softmax function is: ; in, Indicates charging parameters The probability of is the potential representation of Charging parameter values, is the total number of charging parameters. Through the Softmax function, the values of different charging parameters are mapped to probability distribution to obtain the possibility of different charging schemes.
[0034] The above describes the charging control method of the Bluetooth headset in the embodiment of the present invention. The following describes the charging control device of the Bluetooth headset in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a charging control device for a Bluetooth headset includes: A modeling module is used to perform circuit modeling on the charging box, left and right earphones and their batteries to obtain a charging system model; The first regulating module is used to sample the battery voltage and adjust the PWM duty cycle through a digital controller based on the charging system model to obtain constant current charging control parameters; The second adjustment module is used to adjust the PWM duty cycle using a PID control algorithm according to the constant current charging control parameter and the preset voltage threshold to obtain a constant voltage charging control parameter; A processing module, used for inputting constant current charging control parameters and constant voltage charging control parameters into a multi-stage charging strategy processor to obtain a multi-stage charging scheme; A distribution module is used to coordinate the charging priority and power distribution of the charging box and the left and right earphones through the main controller based on a multi-level charging solution to obtain collaborative charging control data; The analysis module is used to input the collaborative charging control data into the multimodal time-series graph attention network model, and obtain a dynamic adaptive charging strategy by performing multi-dimensional analysis of the charging history, usage pattern, and battery health status.
[0035] Through the cooperation of the above components, the charging box, left and right earphones and their batteries are modeled in detail, and the charging system model including power supply, charging management chip, battery equivalent circuit and load is obtained, which provides an accurate theoretical basis for subsequent charging control and helps to improve charging efficiency and accuracy. The battery state estimation and adaptive PID control algorithm based on Kalman filter are adopted to realize the precise control of constant current charging and constant voltage charging process, and the charging parameters can be adjusted in real time according to the battery state, which improves the stability and safety of charging. Through the multi-level charging strategy processor, the intelligent switching of the four stages of trickle, fast, standard and constant voltage is realized, and the fuzzy processing is introduced to achieve smooth transition, which effectively balances the charging speed and battery life. The main controller is used to coordinate the charging priority and power allocation of the charging box and the left and right earphones, and combined with multi-agent reinforcement learning technology, the collaborative charging optimization between multiple devices is realized, which improves the overall charging efficiency. Through the multimodal time series graph attention network model, the charging history, usage mode and battery health status are analyzed in multiple dimensions, and the generation of dynamic adaptive charging strategy is realized, which can predict and adapt to the user's usage habits and further optimize the charging process. Multiple safety mechanisms are introduced during the charging process, such as thermal management constraint analysis and safety assessment, which effectively reduce the risks of overcharging, over-discharging and temperature abnormalities, and improve the reliability and safety of the charging system. By comprehensively considering the battery health status, usage frequency prediction and charging strategy optimization, unnecessary charging times and improper charging behaviors are effectively reduced, extending the battery life. Based on the analysis and prediction of user usage habits, the charging strategy can better adapt to individual needs, such as automatically charging before the user may use the headphones, improving the product's intelligence level and user satisfaction.
[0036] The present invention also provides a computer device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the charging control method of the Bluetooth headset in the above-mentioned embodiments.
[0037] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the charging control method for the Bluetooth headset.
[0038] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0039] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0040] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A charging control method for a Bluetooth headset, characterized in that: The method comprises: Conduct circuit modeling for the charging box, left and right earphones, and their batteries to obtain a charging system model. Based on the charging system model, the battery voltage is sampled by a digital controller and the PWM duty cycle is adjusted to obtain constant current charging control parameters; According to the constant current charging control parameter and the preset voltage threshold, the PWM duty cycle is adjusted using a PID control algorithm to obtain a constant voltage charging control parameter; Inputting the constant current charging control parameter and the constant voltage charging control parameter into a multi-stage charging strategy processor to obtain a multi-stage charging plan; Based on the multi-stage charging solution, the main controller coordinates the charging priority and power distribution between the charging box and the left and right earphones to obtain collaborative charging control data; The collaborative charging control data is input into a multimodal time-series graph attention network model, and a dynamic adaptive charging strategy is obtained by performing multi-dimensional analysis on charging history, usage pattern and battery health status.
2. The charging control method of the Bluetooth headset according to claim 1, characterized in that: The circuit modeling of the charging box, left and right earphones, and their batteries is performed to obtain a charging system model, including: Extract parameters of the input power of the charging box to obtain power characteristic data, and perform equivalent circuit modeling of the power supply based on the power characteristic data to obtain a power equivalent circuit model; Measure the input and output characteristics of the charge management chip to obtain a chip transfer function, and input the chip transfer function into a system identification algorithm to obtain a dynamic model of the charge management chip; Perform charge and discharge tests on the batteries of the charging case and the left and right earbuds to obtain battery capacity and internal resistance data. Based on the battery capacity and internal resistance data, construct a battery Thevenin equivalent circuit to obtain a battery equivalent circuit model. Measure the power consumption of the charging box and the left and right earphones in different working states to obtain a load characteristic curve, and input the load characteristic curve into a curve fitting algorithm to obtain a load equivalent circuit model; Based on the power supply equivalent circuit model, the charging management chip dynamic model, the battery equivalent circuit model and the load equivalent circuit model, circuit topology connection is performed to obtain a charging system model.
3. The charging control method of the Bluetooth headset according to claim 2, characterized in that: Based on the charging system model, the battery voltage is sampled by a digital controller and the PWM duty cycle is adjusted to obtain constant current charging control parameters, including: Discretizing the charging system model to obtain a discrete-time state-space equation, and designing a Kalman filter based on the discrete-time state-space equation to obtain a battery state estimator; Using the battery state estimator to estimate the battery voltage in real time to obtain a battery voltage estimate value, and comparing the battery voltage estimate value with a preset target current value to obtain a current error value; Based on the current error value, a proportional-integral controller is used to calculate a PWM duty cycle adjustment amount to obtain an initial PWM control signal, and a dead-zone compensation process is performed on the initial PWM control signal to obtain a compensated PWM control signal; Inputting the compensated PWM control signal into a current ripple prediction model to obtain a predicted current ripple value, and adaptively adjusting the compensated PWM control signal based on the predicted current ripple value to obtain an optimized PWM control signal; The optimized PWM control signal is input into the charging management chip, and the actual output current value is collected to obtain closed-loop feedback data. Based on the closed-loop feedback data, the parameters of the charging system model are updated using the recursive least squares method to obtain constant current charging control parameters.
4. The charging control method of the Bluetooth headset according to claim 3, characterized in that: The method of adjusting the PWM duty cycle using a PID control algorithm according to the constant current charging control parameter and the preset voltage threshold to obtain a constant voltage charging control parameter includes: Inputting the constant current charging control parameter into a voltage prediction model to obtain a battery voltage prediction value, and comparing the battery voltage prediction value with a preset voltage threshold to obtain a voltage error value; Based on the voltage error value, dynamically adjusting PID controller parameters using a fuzzy logic algorithm to obtain an adaptive PID controller, and inputting the voltage error value into the adaptive PID controller to obtain an initial PWM duty cycle adjustment; performing a limiting process on the initial PWM duty cycle adjustment amount to obtain an effective PWM duty cycle adjustment amount, and updating the current PWM duty cycle based on the effective PWM duty cycle adjustment amount to obtain an updated PWM duty cycle; Inputting the updated PWM duty cycle into the charging management chip, collecting the actual output voltage value to obtain real-time charging data, and filtering the real-time charging data to obtain a smoothed voltage feedback signal; Based on the smoothed voltage feedback signal, a Smith predictor is used to compensate for system delay to obtain a compensated control signal, and the compensated control signal is weightedly fused with the original PID output to obtain a constant voltage charging control parameter.
5. The charging control method of the Bluetooth headset according to claim 4, characterized in that: The step of inputting the constant current charging control parameter and the constant voltage charging control parameter into a multi-stage charging strategy processor to obtain a multi-stage charging solution includes: Inputting the constant current charging control parameter and the constant voltage charging control parameter into a battery state assessment model to obtain battery current state data, and determining an initial charging stage based on the battery current state data to obtain a charging stage identifier; According to the charging stage identifier, a corresponding basic charging strategy is selected from a preset charging strategy library to obtain an initial charging strategy, and parameters of the initial charging strategy are optimized to generate a candidate charging strategy set; Inputting the candidate charging strategy set into a charging simulation model for multiple simulations to obtain strategy evaluation results, and calculating a comprehensive score for each candidate charging strategy based on the strategy evaluation results to select the optimal charging strategy; The optimal charging strategy is decomposed into four stages: trickle, fast, standard, and constant voltage, to obtain a preliminary multi-stage charging scheme. The transition conditions of each stage in the preliminary multi-stage charging scheme are fuzzy processed to obtain a final multi-stage charging scheme.
6. The charging control method of the Bluetooth headset according to claim 5, characterized in that: Based on the multi-stage charging solution, the main controller coordinates the charging priority and power distribution between the charging box and the left and right earphones to obtain collaborative charging control data, including: Monitor the battery level of the charging case and the left and right earbuds in real time to obtain current battery status data, and input the current battery status data into a battery life prediction model to obtain battery health indicators for each component; Based on the battery health indicator, a charging priority index is calculated to obtain an initial charging priority sequence, and a time series analysis is performed on the user usage habit data to obtain a headphone usage frequency prediction result; Performing weighted fusion on the headphone usage frequency prediction result and the initial charging priority sequence to obtain an adjusted charging priority sequence; Calculating an optimal power allocation scheme based on the adjusted charging priority sequence to obtain an initial power allocation strategy, and performing a thermal management constraint analysis on the initial power allocation strategy to obtain a temperature-constrained power allocation scheme; The temperature-constrained power allocation scheme is collaboratively optimized using multi-agent reinforcement learning to obtain a collaborative charging strategy, and collaborative charging control data is generated according to the collaborative charging strategy.
7. The charging control method of the Bluetooth headset according to claim 6, characterized in that: The collaborative charging control data is input into a multimodal time-series graph attention network model, and a dynamic adaptive charging strategy is obtained by performing a multi-dimensional analysis of charging history, usage patterns, and battery health status, including: Decomposing the collaborative charging control data into three sub-datasets: charging history data, usage pattern data, and battery health status data; Constructing a timing graph for the charging history data to obtain a charging history timing graph, and inputting the charging history timing graph into a timing graph convolution layer, wherein the timing graph convolution layer includes three graph convolution sublayers, each of which performs a convolution operation using Chebyshev polynomial approximation to obtain a graph feature representation; Performing sequence embedding on the usage pattern data to obtain usage pattern sequence features, inputting the usage pattern sequence features into a multi-head self-attention mechanism, wherein the multi-head self-attention mechanism includes 8 attention heads, each of which independently calculates a linear projection of the query, key, and value, and then performs a scaled dot product attention operation to obtain an attention-weighted feature; Extracting features from the battery health data to obtain a battery health feature vector, inputting the battery health feature vector into a gated recurrent unit, wherein the gated recurrent unit includes an update gate and a reset gate, and updates a hidden state by controlling information flow to obtain a time series health feature; Performing feature fusion on the graph feature representation, the attention weighted feature, and the temporal health feature, using residual connection and layer normalization to obtain a multimodal fusion feature; Input the multimodal fusion features into the fully connected layer, use Dropout regularization and ReLU activation function to obtain the potential representation of the charging strategy; The charging strategy potential representation is subjected to strategy decoding, and a Softmax function is used to output the probability distribution of multiple charging parameters to obtain a dynamic adaptive charging strategy.
8. A charging control device for a Bluetooth headset, characterized in that: Used to execute the charging control method of the Bluetooth headset according to any one of claims 1 to 7, the charging control device of the Bluetooth headset comprising: A modeling module is used to perform circuit modeling of the charging box, left and right earphones, and their batteries to obtain a charging system model; A first adjustment module is configured to sample the battery voltage and adjust the PWM duty cycle through a digital controller based on the charging system model to obtain constant current charging control parameters; A second adjustment module is used to adjust the PWM duty cycle using a PID control algorithm according to the constant current charging control parameter and the preset voltage threshold to obtain a constant voltage charging control parameter; a processing module, configured to input the constant current charging control parameter and the constant voltage charging control parameter into a multi-stage charging strategy processor to obtain a multi-stage charging plan; A distribution module is used to coordinate the charging priority and power distribution of the charging box and the left and right earphones through the main controller based on the multi-stage charging scheme to obtain coordinated charging control data; An analysis module is used to input the collaborative charging control data into a multimodal time-series graph attention network model, and obtain a dynamic adaptive charging strategy by performing a multi-dimensional analysis of charging history, usage patterns, and battery health status.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and is characterized in that when the processor executes the computer program, the charging control method of the Bluetooth headset according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is enabled to execute the charging control method for a Bluetooth headset according to any one of claims 1 to 7.
Citation Information
Cited By
Lithium battery dynamic charging method based on user behaviors and environmental conditions
CN119674287A
Dynamic charging method for lithium batteries based on user behavior and environmental conditions
CN119674287B
Self-adaptive charging power supply control method and system
CN119995107A
Electric quantity distribution protection system of mobile phone power adapter
CN120109971A
High-efficiency frequency converter control method and system based on multi-level topology
CN120498281A
