A portable speaker battery endurance optimization method and system based on dynamic load monitoring

By monitoring battery voltage and load current in real time within the portable speaker and dynamically adjusting the shutdown threshold, the problem of accidental shutdown in the power management system is solved, thereby optimizing battery life and improving user experience.

CN121710502BActive Publication Date: 2026-05-15SHENZHEN ZUNTE DIGITAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN ZUNTE DIGITAL CO LTD
Filing Date
2026-02-11
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing portable speaker power management systems cannot accurately distinguish the cause of voltage drops when faced with high-power sound quality demands, leading to accidental shutdowns, wasted battery capacity, and poor user experience. This problem becomes more pronounced as the battery ages.

Method used

By setting a high-frequency sampling circuit in the portable speaker to monitor the battery port voltage and load current in real time, and combining the current change slope and loop impedance calculated by the microcontroller unit, the shutdown threshold is dynamically adjusted to achieve separation of physical voltage drop and chemical voltage. In addition, an anti-accidental touch time window and adaptive correction function are introduced to optimize battery life.

Benefits of technology

It effectively avoids accidental shutdowns caused by line impedance, maximizes the battery's discharge potential, improves system robustness and user experience, and ensures accurate battery detection and range optimization throughout the battery's lifespan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121710502B_ABST
    Figure CN121710502B_ABST
Patent Text Reader

Abstract

The application discloses a portable speaker battery endurance optimization method and system based on dynamic load monitoring. The method uses a micro control unit to cooperate with a high-frequency sampling circuit in a main power supply circuit to collect battery port voltage and load current in real time; the load state is identified by calculating the current change slope, and when it is determined as a large dynamic instantaneous load, a dynamic compensation judgment mode is entered. The system calls pre-stored loop impedance parameters, calculates the virtual voltage drop generated by the line and the battery internal resistance combined with the real-time load current, and dynamically adjusts the static shutdown voltage threshold to generate a dynamic protection threshold. Shutdown is only performed when the port voltage is lower than the dynamic threshold and the duration exceeds the anti-mis-touch time window. The application restores the real chemical voltage by stripping the physical voltage drop, prevents battery over-discharge, avoids mis-shutdown during large dynamic audio playback, and prolongs the effective working time of the speaker.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power management and control technology for consumer electronics, and in particular to a method and system for optimizing the battery life of portable speakers based on dynamic load monitoring. Background Technology

[0002] Currently, to meet users' demands for low-frequency dynamics and high-power sound quality, portable speakers often require their built-in audio power amplifiers to draw high-amplitude pulse currents from the battery pack within a short period. During actual product development and electrical characteristic testing, it can be observed that lithium-ion battery packs inherently possess DC internal resistance. Furthermore, the power MOSFETs on the battery protection board, battery connector contacts, current sensing components, and copper traces on the PCB power layer all constitute an inherent series impedance in the physical circuit. When playing audio signals containing strong drum beats or high-dynamic bass passages, a several-ampere instantaneous current flows through this impedance network, generating a significant physical voltage drop according to Ohm's law. This voltage drop is directly superimposed on the battery's electromotive force, causing a substantial drop in the port voltage monitored by the power management unit within milliseconds, temporarily lower than the actual chemical voltage inside the battery.

[0003] Existing power protection schemes typically use a single fixed voltage threshold as the shutdown criterion. Once the detected voltage drops below the set value, the system determines the battery is depleted and triggers a shutdown command. This static judgment logic cannot distinguish whether the voltage drop is caused by the depletion of battery chemical capacity or by a physical voltage drop caused by a large current flowing through the line impedance. Therefore, even when the battery still has remaining power, a transient impact from an audio signal causing the voltage reading to momentarily touch the shutdown line can trigger an erroneous shutdown. This not only wastes the battery's effective capacity and shortens the actual playback time but also disrupts the user's listening experience. Furthermore, as the number of battery charge-discharge cycles increases, its internal resistance exhibits a non-linear growth trend. Without a targeted compensation mechanism, such misjudgments will occur more frequently when the device faces dynamic loads in the later stages of use. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for optimizing the battery life of portable speakers based on dynamic load monitoring, so as to solve the problems mentioned in the background art.

[0005] In a first aspect, the present invention provides a method for optimizing the battery life of a portable speaker based on dynamic load monitoring. The method is applied to a portable speaker comprising a power management unit and a microcontroller unit, and includes the following steps:

[0006] The microcontroller unit collects the port voltage value at the battery terminal and the load current value flowing through the main power supply circuit in real time through a high-frequency sampling circuit set in the main power supply circuit.

[0007] The slope of the current change is calculated based on the load current value, and the slope of the current change is compared with a preset transient response threshold to identify the current load state of the portable speaker.

[0008] When the load state is determined to be a steady-state load, the port voltage value is compared with a preset static shutdown voltage threshold. If the port voltage value is lower than the static shutdown voltage threshold, a shutdown command is executed.

[0009] When the load state is determined to be a large dynamic instantaneous load, the dynamic compensation decision mode is entered.

[0010] In the dynamic compensation decision mode, the loop impedance parameters pre-stored in the microcontroller are called, and the virtual voltage drop value generated by the line impedance and battery internal resistance is calculated by combining the load current value collected in real time.

[0011] The static shutdown voltage threshold is adjusted downward using the virtual voltage drop value to generate a dynamic protection threshold.

[0012] The power-off command is executed only when the port voltage value is lower than the dynamic protection threshold and the duration exceeds the preset anti-accidental touch time window; otherwise, the power-off command is blocked to maintain normal playback of the portable speaker.

[0013] Optionally, the steps for obtaining and initializing the loop impedance parameters include:

[0014] During the factory calibration phase of the portable speaker, the actual impedance values ​​of the current sensing resistor and PCB copper foil traces in the high-frequency sampling circuit are measured using a precision digital bridge in four-terminal test mode.

[0015] Obtain the nominal DC internal resistance value of the battery under standard fully charged conditions;

[0016] The actual impedance value and the nominal DC internal resistance value are weighted and summed to generate the loop impedance parameter, and the loop impedance parameter is stored in the non-volatile memory of the microcontroller unit.

[0017] Optionally, the sampling frequency setting step of the high-frequency sampling circuit includes:

[0018] Acquire voltage drop waveform data captured by a digital oscilloscope when the portable speaker plays low-frequency music with a wide dynamic range;

[0019] Analyze the duration of the falling edge of the voltage drop waveform and extract the minimum time width of the falling edge;

[0020] The sampling frequency is set to ten to twenty times the reciprocal of the minimum time width to ensure that the millisecond-level current mutation characteristics under the large dynamic instantaneous load can be fully captured.

[0021] Optionally, the calculation logic for the dynamic protection threshold satisfies the following formula:

[0022] ;

[0023] Among them, the Characterizing the dynamic protection threshold, the Characterizing the static shutdown voltage threshold, the The load current value acquired in real time represents the value of the load current. Characterizing the loop impedance parameter, the Characterized by the safety margin coefficient;

[0024] The safety margin coefficient is set to a value range of 0.85 to 0.95, which is used to retain a voltage margin to prevent deep battery discharge while compensating for the virtual voltage drop value.

[0025] Optionally, the configuration steps for the anti-accidental touch time window include:

[0026] The average duration of the low-frequency drum signal was statistically analyzed when the portable speaker played different genres of music.

[0027] The duration of the anti-accidental touch time window is set to a value greater than the average duration period;

[0028] When the port voltage value is lower than the dynamic protection threshold, the timer is started;

[0029] If the port voltage value rises above the dynamic protection threshold before the timer's duration reaches the anti-accidental touch time window, the timer is immediately reset and the dynamic compensation decision mode is exited.

[0030] Optionally, the method further includes a hysteresis recovery step after exiting the dynamic compensation decision mode:

[0031] When the load current value is detected to fall back to the preset steady-state current range, the dynamic protection threshold remains unchanged, and the recovery delay timer is started;

[0032] After the recovery delay timer ends, the judgment benchmark is linearly and smoothly transitioned from the dynamic protection threshold back to the static shutdown voltage threshold according to the preset voltage step rate, so as to prevent repeated jumps in the shutdown logic caused by the periodic oscillation of the audio signal.

[0033] Optionally, the loop impedance parameter has an adaptive correction function based on battery aging characteristics:

[0034] The microcontroller records the cumulative number of charge-discharge cycles of the portable speaker;

[0035] Based on the cumulative charge-discharge cycle count, the corresponding internal resistance increment compensation value is obtained by querying the preset battery aging characteristic curve table.

[0036] During each power-on initialization, the internal resistance increment compensation value is superimposed on the circuit impedance parameter to correct the impact of increased internal resistance due to battery aging on the calculation of the virtual voltage drop value.

[0037] Optionally, before executing the power-off command, the method further includes a graded volume intervention step:

[0038] Determine whether the drop in the port voltage value below the dynamic protection threshold is within a preset critical warning range;

[0039] If so, a limiting control signal will be sent to the audio power amplifier first to force a reduction in audio output gain;

[0040] After reducing the audio output gain, the port voltage value is checked again;

[0041] If the port voltage rises above the dynamic protection threshold, the current low-gain output state is maintained and the shutdown command is canceled; if the port voltage remains below the dynamic protection threshold, the shutdown command is executed.

[0042] Optionally, the method also includes hardware-level mandatory protection logic:

[0043] Set an absolute cutoff voltage threshold, which is lower than the theoretically calculated minimum value of the dynamic protection threshold;

[0044] Regardless of the load status determination result, once the port voltage value is lower than the absolute cutoff voltage threshold, the shutdown command is immediately triggered to prevent battery over-discharge accidents in the event of failure of the high-frequency sampling circuit or calculation error.

[0045] In a second aspect, the present invention provides a portable speaker battery life optimization system based on dynamic load monitoring, for implementing the method described in any one of the first aspects, the system comprising:

[0046] The data acquisition module is configured to drive the high-frequency sampling circuit to perform synchronous acquisition of voltage and current, and to perform digital filtering processing;

[0047] Impedance model storage module, configured to store the circuit impedance parameters and battery characteristic data calibrated by precision instruments;

[0048] The scene recognition and calculation module is configured to switch the monitoring mode according to the slope of the current change and calculate the dynamic protection threshold based on the loop impedance parameters;

[0049] The power logic control module is configured to output a shutdown or current limiting control signal to the power management chip based on the comparison result between the port voltage value and the dynamic protection threshold, combined with the anti-accidental touch time window and the graded volume intervention strategy.

[0050] The present invention has achieved the following beneficial effects:

[0051] This invention achieves effective separation of the physical voltage drop component and the chemical voltage component in the power supply circuit by constructing a precise model including the battery's internal resistance and line impedance within the microcontroller unit. Based on the circuit impedance parameters calibrated using precision instruments at the factory and combined with real-time collected load current, the system can accurately calculate the current line voltage drop value and dynamically adjust the shutdown threshold accordingly. This mechanism allows the speaker to intelligently tolerate temporary drops in port voltage when encountering large dynamic audio current surges; as long as the actual battery voltage after deducting the physical voltage drop remains within the safe range, the device can maintain normal playback. This method maximizes the battery's power output potential at the end of the discharge phase while ensuring the battery does not experience deep over-discharge, thus solving the problem of false shutdown caused by line impedance.

[0052] This invention also sets the high-frequency sampling frequency and the width of the anti-accidental touch time window based on the captured voltage drop waveform characteristics. By monitoring the current change slope in real time, the system only activates dynamic compensation when a transient high load is detected, balancing system computational efficiency and response speed. The set anti-accidental touch time window can effectively filter out voltage glitches caused by short drumbeat signals. Only when the low-voltage state lasts longer than the period of a normal low-frequency signal does the system confirm that the battery power is indeed depleted. This judgment logic based on the physical characteristics of the signal improves the robustness of the system.

[0053] Furthermore, this invention integrates an adaptive correction function based on battery aging characteristics and a graded volume intervention strategy. Addressing the physical characteristic that battery internal resistance increases with the number of cycles, the system can automatically call upon aging curve data to compensate for impedance parameters, ensuring the device's detection accuracy throughout its entire lifespan. Simultaneously, in the critical stage before the voltage reaches the shutdown threshold, the system prioritizes reducing audio gain to decrease load current, replacing abrupt power-off protection with a gentle auditory adjustment, further optimizing the user's continuous usage experience.

[0054] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0055] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0056] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0057] Figure 1 This is a flowchart of a portable speaker battery life optimization method based on dynamic load monitoring in an embodiment of the present invention;

[0058] Figure 2 This is a schematic diagram of a portable speaker battery life optimization system based on dynamic load monitoring, as described in an embodiment of the present invention. Detailed Implementation

[0059] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0060] It should be noted that the terms "microcontroller unit" and "power management unit" mentioned in this specific embodiment can be represented as an integrated SoC chip, a separate microcontroller, or a power management IC in actual engineering implementation. Furthermore, the specific test equipment (such as a Silent oscilloscope, TH2811D digital bridge, etc.) and test data cited in this embodiment are intended to illustrate the scientific basis and physical source of the technical parameters set in this invention, and do not constitute a limitation on the scope of protection of the claims.

[0061] like Figure 1As shown in the figure, the portable speaker battery life optimization method based on dynamic load monitoring provided by this invention is physically built on a high-precision, high-response embedded hardware system. Before describing the control method in detail, it is necessary to first describe the hardware environment in detail, because the core impedance model and dynamic compensation of this invention depend entirely on the physical characteristics and acquisition accuracy of the underlying hardware.

[0062] like Figure 2 As shown, the portable speaker described in this embodiment has an internal circuit architecture that mainly includes a power supply subsystem, a core control subsystem, a signal acquisition subsystem, and an audio execution subsystem.

[0063] The energy supply subsystem, serving as the power source for the entire device, employs a two-cell series (2S) lithium-ion battery pack with a nominal voltage of 7.4V and a fully charged voltage of 8.4V. A main power supply loop is formed between the positive output terminal of the battery pack and the system's main load (primarily a Class D audio power amplifier). In traditional circuit designs, the impedance of this loop is often ignored; however, in high-dynamic-range audio playback scenarios, loop impedance is a cause of voltage drops. This embodiment clearly defines the physical composition of the loop impedance, which includes not only the DC internal resistance (DCIR) of the battery cells themselves but also the on-resistance of the MOSFETs on the battery protection board. The contact resistance between the battery connector and the motherboard socket, the trace resistance of the copper foil on the PCB power layer, and the current sensing resistor that is specifically connected in series for current detection.

[0064] To achieve millisecond-level monitoring of load current, this embodiment incorporates a high-precision current-sensing resistor in series in the main power supply circuit. If the resistor's resistance is too large, excessive heat loss will occur during high-current (e.g., 5A) flow, reducing power efficiency; if the resistance is too small, the sampling voltage under low current will be too low and easily drowned out by background noise. Considering all factors, this embodiment preferably uses a manganese-copper alloy resistor with a resistance of 10 to 20 milliohms. It is particularly important to emphasize that, to eliminate the influence of PCB trace resistance on sampling accuracy, the current-sensing resistor is strictly connected using a four-terminal Kelvin connection method on the PCB layout. That is, the high current flows through the two power pads of the resistor, while the voltage sampling signal is led out through two other independent sensing pads inside the resistor and directly connected to the differential amplifier circuit at the back end. This physical connection method ensures that the acquired voltage drop accurately reflects the magnitude of the current flowing through the resistor, without being affected by solder contact resistance or copper foil resistance. Specifically, to achieve accurate acquisition of millisecond-level transient currents, the differential amplifier circuit employs a high-bandwidth, low-off-bias current-sensing operational amplifier (preferably INA240 or equivalent in this embodiment). Its voltage gain setting must match the input range of the microcontroller's ADC: assuming an ADC reference voltage of 3.3V, a current-sensing resistor of 10 milliohms, and a maximum allowable transient peak current of 6A (corresponding to a voltage drop of 60mV), the operational amplifier's gain is set to 50 times (50V / V) to amplify the weak current signal to 3.0V, fully utilizing the ADC's resolution. Simultaneously, an RC low-pass filter is configured at the operational amplifier's input, with a 10-ohm resistor and a 10-nanofacker capacitor, setting the cutoff frequency to approximately 1.6MHz. This frequency is significantly higher than the audio signal bandwidth, filtering out high-frequency switching noise while ensuring the rising edge of the audio transient current is not distorted.

[0065] The core control subsystem consists of a 32-bit microcontroller unit (MCU) with a floating-point arithmetic unit (FPU) and a clock frequency of at least 72MHz to meet the computing power requirements for real-time calculation of the dynamic impedance model. The MCU integrates a multi-channel, high-precision analog-to-digital converter (ADC), or an external high-speed ADC chip can be connected via an SPI interface. This ADC is responsible for synchronously acquiring the voltage difference across the current sensing resistor (characterizing the load current) and the voltage to ground at the battery port (characterizing the port voltage).

[0066] After establishing a sophisticated hardware acquisition platform, the method in this embodiment first performs real-time acquisition and preprocessing of multidimensional data. The key to this step lies in setting the sampling frequency, which must meet the requirement of complete capture of large dynamic transient features.

[0067] To address the issue that traditional low-frequency sampling cannot detect millisecond-level voltage drops in audio, this embodiment proposes a frequency-fixed strategy based on the reciprocal of transient characteristics. The specific steps are as follows: First, acquire voltage drop waveform data captured by a high-resolution digital oscilloscope (a high-precision digital storage oscilloscope with a bandwidth of at least 200MHz, such as the Siglent SDS 804X HD) when a portable speaker is playing low-frequency music with a wide dynamic range; analyze the falling edge duration of the voltage drop waveform and extract the minimum time width of the falling edge. (For example, the actual measurement is about 2ms).

[0068] To satisfy the sampling theorem and ensure smooth differentiation operations, this embodiment sets the sampling frequency of the ADC. The following formula constraints must be met:

[0069] ;

[0070] in, This is the sampling magnification factor, with a value range of 10 to 20. , For example, the calculation yields This means the system performs synchronous voltage and current acquisition every 100 microseconds. This high-frequency sampling mechanism can clearly capture the microscopic impact of low-frequency vibrations on the power supply system. In addition, the acquired raw data undergoes FIR digital filtering with a window size of 8 to 16 points to filter out high-frequency ripple noise from the switching power supply.

[0071] Based on the high-frequency acquired and filtered data, the microcontroller unit executes the core load state identification logic. Specifically, the microcontroller unit uses a discrete-time sliding window differential algorithm to calculate the current change slope. Let the sampling period be... (For example ), current moment The sampling current value is , forward calculation sampling points (e.g.) The current value is Then the slope of the current change The calculation formula is:

[0072] ;

[0073] The algorithm uses span The differential operation can effectively filter out single-point sampling noise and accurately extract the millisecond-level transient change characteristics of the load current.

[0074] Furthermore, the system calculates the rate of change of the load current in real time, i.e., the slope of the current change ( The slope physically characterizes the drasticness of power changes. The microcontroller compares the calculated absolute value of the slope with a preset transient response threshold. This threshold is set with reference to the current waveform characteristics captured in a laboratory environment by a high-sensitivity current probe (such as the MicSigCP503B) with a frequency response range covering DC to 10MHz: smooth vocals, string music, or light music have a smaller current slope; while plosive sounds, heavy drum beats, or electric bass slap techniques have a very large current slope.

[0075] This embodiment provides an engineering calibration method for the transient response threshold: During the speaker development phase, a standard pink noise signal is input to the audio input terminal, and the volume is adjusted to the maximum undistorted power level. Current waveform data is continuously acquired using the aforementioned high-frequency sampling circuit, and the peak value of the current change slope during steady-state playback is statistically analyzed and denoted as... The transient response threshold is set to... 1.2 to 1.5 times (for example, if the actual measurement) If the threshold is 0.5A / ms, then the threshold is set from 0.6A / ms to 0.75A / ms. This calibration method ensures that the threshold can dynamically adapt to speakers of different power levels, effectively distinguishing between regular high-volume music (steady state) and extreme drum beats (transient).

[0076] The system continuously monitors the load status, and only when the calculated current change slope is less than the transient response threshold, and the real-time acquired load current value simultaneously falls below the preset steady-state current upper limit (e.g., ... Only when the current change slope is small but the load current value remains high (e.g., when playing a continuous low-frequency long tone), the system will maintain the dynamic compensation decision mode to prevent false shutdown due to continuous large current physical voltage drop. For example, when playing soothing piano music or in standby mode, the current fluctuates but the amplitude is gradual. At this time, the drop in battery port voltage is mainly caused by the consumption of the battery's internal chemical capacity (SOC), and the voltage reading is accurate and reliable. Therefore, the system adopts traditional protection logic: directly comparing the port voltage with a preset static shutdown voltage threshold (e.g., 3.0V / cell, 6.0V for two cells). Once it falls below this threshold and remains so for a certain period of time, it is determined that the battery is depleted and shutdown is executed.

[0077] When the slope of the current change exceeds the transient response threshold, the system determines that it is currently in a large dynamic transient load mode. At this time, a huge current flows through the loop impedance, resulting in a significant physical voltage drop. The port voltage reading is severely distorted, consisting of the battery's actual electromotive force minus the physical voltage drop across the line. If the static threshold is still used at this point, it will inevitably lead to a false shutdown decision even when the battery still has residual power. Therefore, the system immediately switches to dynamic compensation decision mode.

[0078] Before dynamic compensation can be implemented, the system needs to construct an accurate impedance model. This embodiment provides an industrial-grade parameter calibration and initialization method.

[0079] During the factory calibration phase, a precision digital bridge (such as TH2811D) is used in four-terminal test mode to measure the actual impedance values ​​of the current sensing resistor in the high-frequency sampling circuit and the PCB copper foil traces. The physical measurement nodes for the four-terminal test mode described here are defined as follows: the current excitation terminal (Force terminal) is connected to the positive pad of the battery connector and the power input pin (VCC) of the audio power amplifier chip, respectively; the voltage sensing terminal (Sense terminal) is connected to the above two locations via Kelvin contact. Similarly, for the ground loop, the measurement point is from the negative pad of the battery connector to the power ground pin (PGND) of the audio power amplifier chip. The actual impedance value... This is the sum of the positive terminal impedance, negative terminal impedance, and current sensing resistor value. This end-to-end measurement method comprehensively encompasses all PCB copper trace resistances, via resistances, and solder contact resistances along the power path, ensuring that the physical model for virtual voltage drop calculations completely corresponds to the actual hardware. Simultaneously, the nominal DC internal resistance value of the battery under standard fully charged conditions is obtained. The microcontroller performs a weighted summation of these two sets of data to generate the initial loop impedance parameters. The calculation logic is as follows:

[0080] ;

[0081] in, and These are the weighting coefficients (in this embodiment, the default value is 1, meaning direct summation). The calculated... It is then permanently stored in the non-volatile memory of the microcontroller unit, ensuring that the impedance parameters of each device are strictly matched with its physical hardware characteristics.

[0082] When the load condition is determined to be a large dynamic instantaneous load, the microcontroller enters the dynamic compensation decision mode. Its core logic lies in stripping away the physical voltage drop and restoring the true chemical voltage state.

[0083] First, the microcontroller unit combines the real-time acquired load current value and the loop impedance parameters currently being called Calculate the virtual voltage drop caused by line impedance and battery internal resistance. :

[0084] ;

[0085] Subsequently, this virtual voltage drop value was used to determine the static shutdown voltage threshold. Adjustments are made to generate real-time dynamic protection thresholds. The calculation formula is as follows:

[0086] ;

[0087] When unfolded, it becomes:

[0088] ;

[0089] in, The safety margin coefficient is strictly defined as ranging from 0.85 to 0.95. This coefficient is introduced to reserve a 5% to 15% voltage drop as a safety buffer, preventing the battery terminal voltage from falling below the physical safety threshold (e.g., 2.5V) due to nonlinear changes in battery internal resistance or computational errors, thereby avoiding irreversible chemical damage to the battery. Only when the terminal voltage is below this value... Only then does the system determine that the battery is low.

[0090] Even after the dynamic threshold calculation is passed, this embodiment also adds an anti-accidental touch time window for the absolute robustness of the system.

[0091] Audio signals are extremely transient. A powerful bass drum beat typically lasts only tens to hundreds of milliseconds. Within this brief window, the voltage may drop below the dynamic threshold, but as the beat ends, the current decreases rapidly, and the voltage immediately recovers. If every drop is reacted to, the system will frequently trigger the shutdown countdown, and may even shut down unintentionally.

[0092] The anti-accidental touch time window configuration steps in this embodiment are based on acoustic analysis of music signals. By statistically analyzing the average duration of low-frequency signals in different music genres (rock, electronic, pop), it was found that the duration of most drum or bass notes is between 50ms and 300ms. To avoid this range, this embodiment sets the anti-accidental touch time window to a value greater than this average period, for example, 500ms to 1000ms.

[0093] In terms of operational logic, when the port voltage falls below the dynamic protection threshold, the MCU starts a timer. If the voltage rises above the threshold before the time window is reached (indicating the timeout has passed), the system determines the drop is invalid and immediately resets the timer. Only when the low-voltage state persists for more than the time window does the system confirm that the voltage drop is indeed caused by a truly depleted battery (the standard voltage after deducting the voltage drop is not met and cannot recover). Only then does the system officially execute the shutdown command.

[0094] When a large dynamic music segment passes (e.g., a song enters a rest or a gentle transition), the load current drops back to the steady-state range. At this point, the dynamic protection threshold needs to be restored to the static threshold. To prevent logic oscillations at the critical point (i.e., the threshold has just been restored, but the voltage has not yet recovered, leading to accidental shutdown), this embodiment introduces hysteresis recovery logic.

[0095] Specifically, when the load current value is detected to drop back to the preset steady-state current range (e.g., <200mA), the microcontroller does not act immediately. Instead, it maintains the current dynamic protection threshold unchanged and initiates a recovery delay timer (e.g., 2 seconds). This period is a physical buffer for the battery voltage to recover (there is a chemical hysteresis in the recovery of battery voltage).

[0096] After the recovery delay ends, the microcontroller linearly and smoothly transitions the judgment benchmark from the dynamic protection threshold back to the static shutdown voltage threshold according to a preset voltage step rate (e.g., increasing by 10 millivolts every 100 milliseconds). This soft-switching design minimizes transient risks during logic switching and ensures a consistent user experience.

[0097] Considering the aging effect of the lithium battery's internal resistance increasing with usage time, this embodiment embeds an adaptive correction algorithm in the microcontroller unit.

[0098] The microcontroller records the cumulative number of charge-discharge cycles of the speaker. During each power-on initialization, the system queries a preset battery aging characteristic curve table to obtain the corresponding internal resistance increment compensation value. In this embodiment, the counting logic for the cumulative charge-discharge cycle count adopts the Cumulative Discharge Capacity Method: the microcontroller integrates the current flowing through the current sensing resistor in real time, and when the cumulative discharged capacity reaches 100% of the battery's nominal capacity, it is counted as one valid cycle. Furthermore, the battery aging characteristic curve table is obtained based on standard accelerated aging tests: under a constant temperature environment of 25℃, the same model of battery cell is subjected to a 1C rate constant current charge-discharge cycle; every 50 cycles, the DC internal resistance increment of the battery is measured and recorded using an AC internal resistance tester (1kHz), and finally, the lookup table is generated. This method ensures that the impedance compensation parameters have clear experimental data support. In this embodiment, the battery aging characteristic curve table is stored in non-volatile memory in the form of a look-up table. This table is constructed based on standard battery cell cycle life test data, and its data structure example is as follows: when the number of cycles... When, the internal resistance increases ;when hour, ;when hour, ;when hour, The MCU reads... The values ​​are linearly interpolated to obtain real-time impedance compensation parameters. The dynamic loop impedance parameters are currently being used. Update according to the following formula:

[0099] ;

[0100] By increasing the internal resistance Superimposed on the initial impedance In this system, the virtual voltage drop calculation deviation caused by battery aging can be dynamically corrected. This self-evolution mechanism ensures that the speaker will not mistakenly shut down due to battery aging throughout its entire lifespan, and will always maintain optimal battery life performance.

[0101] This embodiment also introduces a tiered intervention mechanism before finally cutting off the power supply.

[0102] Specifically, when the port voltage is below the dynamic threshold but has not yet reached the physical baseline, the system enters a critical warning range. At this time, the MCU does not shut down but instead prioritizes sending control signals to the audio power amplifier. Specifically, the MCU can modify the power amplifier chip's registers via the I2C bus to enable the hard limiting function; or it can control the digital potentiometer via GPIO to attenuate the amplitude of the input audio signal (e.g., attenuate by 3dB).

[0103] The physical consequence of this action is that the speaker's output power decreases, and the load current increases. Instantaneous reduction. According to... As the current decreases, the line voltage drop decreases, and the port voltage... It will immediately recover. If the recovered voltage exceeds the dynamic threshold, the system successfully regains control of playback by reducing the volume. This achieves a smooth reduction in audio output pressure, avoiding abrupt changes in sound caused by a direct power outage.

[0104] Furthermore, the system sets an absolute cutoff voltage threshold (e.g., 2.7V), which is lower than the threshold calculated by any dynamic algorithm. Regardless of the microcontroller's mode or the algorithm's calculation result, once the hardware comparator detects that the port voltage is below 2.7V, the system will unconditionally trigger a shutdown signal. This ensures that the battery will not be over-discharged in extreme faults such as software malfunction or sampling resistor failure.

[0105] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for optimizing the battery life of a portable speaker based on dynamic load monitoring, characterized in that, The method is applied to a portable speaker that includes a power management unit and a microcontroller unit, and the method includes the following steps: The microcontroller unit collects the port voltage value at the battery terminal and the load current value flowing through the main power supply circuit in real time through a high-frequency sampling circuit set in the main power supply circuit. The slope of the current change is calculated based on the load current value, and the slope of the current change is compared with a preset transient response threshold to identify the current load state of the portable speaker. When the load state is determined to be a steady-state load, the port voltage value is compared with a preset static shutdown voltage threshold. If the port voltage value is lower than the static shutdown voltage threshold, a shutdown command is executed. When the load state is determined to be a large dynamic instantaneous load, the dynamic compensation decision mode is entered. In the dynamic compensation decision mode, the loop impedance parameters pre-stored in the microcontroller are called, and the virtual voltage drop value generated by the line impedance and battery internal resistance is calculated by combining the load current value collected in real time. The static shutdown voltage threshold is adjusted downward using the virtual voltage drop value to generate a dynamic protection threshold. The power-off command is executed only when the port voltage value is lower than the dynamic protection threshold and the duration exceeds the preset anti-accidental touch time window; otherwise, the power-off command is blocked to maintain normal playback of the portable speaker.

2. The method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 1, characterized in that, The steps for obtaining and initializing the loop impedance parameters include: During the factory calibration phase of the portable speaker, the actual impedance values ​​of the current sensing resistor and PCB copper foil traces in the high-frequency sampling circuit are measured using a precision digital bridge in four-terminal test mode. Obtain the nominal DC internal resistance value of the battery under standard fully charged conditions; The actual impedance value and the nominal DC internal resistance value are weighted and summed to generate the loop impedance parameter, and the loop impedance parameter is stored in the non-volatile memory of the microcontroller unit.

3. The method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 1, characterized in that, The sampling frequency setting steps of the high-frequency sampling circuit include: Acquire voltage drop waveform data captured by a digital oscilloscope when the portable speaker plays low-frequency music with a wide dynamic range; Analyze the duration of the falling edge of the voltage drop waveform and extract the minimum time width of the falling edge; The sampling frequency is set to ten to twenty times the reciprocal of the minimum time width.

4. The method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 1, characterized in that, The calculation logic for the dynamic protection threshold satisfies the following formula: ; Among them, the Characterizing the dynamic protection threshold, the Characterizing the static shutdown voltage threshold, the The load current value acquired in real time represents the value of the load current. Characterizing the loop impedance parameter, the Characterized by the safety margin coefficient; The safety margin coefficient is set to a value range of 0.85 to 0.95, which is used to retain a voltage margin to prevent deep battery discharge while compensating for the virtual voltage drop value.

5. The portable speaker battery life optimization method based on dynamic load monitoring according to claim 1, characterized in that, The configuration steps for the anti-accidental touch time window include: The average duration of the low-frequency drum signal was statistically analyzed when the portable speaker played different genres of music. The duration of the anti-accidental touch time window is set to a value greater than the average duration period; When the port voltage value is lower than the dynamic protection threshold, the timer is started; If the port voltage value rises above the dynamic protection threshold before the timer's duration reaches the anti-accidental touch time window, the timer is immediately reset and the dynamic compensation decision mode is exited.

6. The method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 1, characterized in that, The method also includes a hysteresis recovery step after exiting the dynamic compensation decision mode: When the load current value is detected to fall back to the preset steady-state current range, the dynamic protection threshold remains unchanged, and the recovery delay timer is started; After the recovery delay timer ends, the judgment benchmark is linearly and smoothly transitioned from the dynamic protection threshold back to the static shutdown voltage threshold according to the preset voltage step rate, so as to prevent repeated jumps in the shutdown logic caused by the periodic oscillation of the audio signal.

7. A method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 2, characterized in that, The loop impedance parameters have an adaptive correction function based on battery aging characteristics: The microcontroller records the cumulative number of charge-discharge cycles of the portable speaker; Based on the cumulative charge-discharge cycle count, the corresponding internal resistance increment compensation value is obtained by querying the preset battery aging characteristic curve table. During each power-on initialization, the internal resistance increment compensation value is superimposed on the circuit impedance parameter to correct the impact of increased internal resistance due to battery aging on the calculation of the virtual voltage drop value.

8. The method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 1, characterized in that, Before executing the shutdown command, the method further includes a graded volume intervention step: Determine whether the drop in the port voltage value below the dynamic protection threshold is within a preset critical warning range; If so, a limiting control signal will be sent to the audio power amplifier first to force a reduction in audio output gain; After reducing the audio output gain, the port voltage value is checked again; If the port voltage rises above the dynamic protection threshold, the current low-gain output state is maintained and the shutdown command is canceled; if the port voltage remains below the dynamic protection threshold, the shutdown command is executed.

9. A method for optimizing the battery life of a portable speaker based on dynamic load monitoring according to claim 1, characterized in that, The method also includes hardware-level mandatory protection logic: Set an absolute cutoff voltage threshold, which is lower than the theoretically calculated minimum value of the dynamic protection threshold; Regardless of the load status determination result, once the port voltage value is lower than the absolute cutoff voltage threshold, the shutdown command is immediately triggered to prevent battery over-discharge accidents in the event of failure of the high-frequency sampling circuit or calculation error.

10. A portable speaker battery life optimization system based on dynamic load monitoring, used to implement the method according to any one of claims 1 to 9, characterized in that, The system includes: The data acquisition module is configured to drive the high-frequency sampling circuit to perform synchronous acquisition of voltage and current, and to perform digital filtering processing. Impedance model storage module, configured to store the circuit impedance parameters and battery characteristic data calibrated by precision instruments; The scene recognition and calculation module is configured to switch the monitoring mode according to the slope of the current change and calculate the dynamic protection threshold based on the loop impedance parameters; The power logic control module is configured to output a shutdown or current limiting control signal to the power management chip based on the comparison result between the port voltage value and the dynamic protection threshold, combined with the anti-accidental touch time window and the graded volume intervention strategy.