An energy-saving control method and system for a portable lamp
By acquiring battery state parameters, calculating available energy budget, and generating target current planning curve, combined with closed-loop control and ambient illuminance estimation, the problems of nonlinear battery output and inaccurate battery life in low-temperature environments are solved, achieving stable lighting and high energy efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG WEIDASI ELECTRIC CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-05-26
AI Technical Summary
In low-temperature environments, the energy-saving control methods and systems for portable lamps suffer from problems such as nonlinear battery output, easy dimming jitter, inaccurate battery life, and accidental shutdown when stationary. Especially in field operations such as high-altitude scientific research, border patrol and communication base station maintenance, existing technologies are unable to maintain the stability of lighting output and predictability of battery life under limited power supply conditions.
By acquiring the battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance output by the battery management unit, the available energy budget is calculated, and a planning curve showing the target current changing over time is generated. Combined with closed-loop control and ambient illuminance estimation, PWM duty cycle adjustment is performed to ensure that the actual current tracks the target current, thereby achieving stable illumination for the portable lamp.
It reduces brightness fluctuations caused by power supply variations in low-temperature environments, improves the predictability of battery life, reduces accidental lighting outages due to inactivity or lack of interaction, and enhances the availability of continuous lighting in complex field conditions.
Smart Images

Figure CN122093971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of portable lighting equipment control technology, and in particular to an energy-saving control method and system for a portable lamp. Background Technology
[0002] In field operations such as high-altitude scientific research, border patrol, and communication base station maintenance, portable lamps often operate continuously for long periods in low-temperature environments. The lighting needs to remain stable for several hours or even all night, while minimizing energy consumption to extend battery life. Existing portable lamps generally use LED light sources and achieve brightness adjustment through PWM dimming, constant current drive, and multi-level control. At the same time, to reduce power consumption when no one is using them, some products have introduced energy-saving strategies such as ambient light adaptive dimming, human body / occupancy sensing control, and timed sleep mode, which reduce brightness or turn off the lighting when enhanced ambient light or lack of human activity is detected.
[0003] However, under harsh operating conditions such as sub-zero temperatures, the aforementioned energy-saving control methods are prone to control instability and range deviation. Low temperatures cause the internal resistance of lithium batteries to increase and the usable capacity to decrease. Under load, the voltage drop is more pronounced, and the battery output capacity fluctuates with temperature, state of charge, and instantaneous load. The drive and dimming control of portable lamps are usually based on the assumption that "the input power supply can meet the drive adjustment range." When the power supply voltage drops or approaches the undervoltage / voltage drop zone, the response of the output current and luminous flux to control quantities (such as PWM duty cycle and target current setpoint) is nonlinear, which can easily lead to brightness fluctuations, flickering, and inconsistent output between different brightness levels. During this process, the control side's behavior of increasing the duty cycle or target output to maintain the set brightness may cause the battery to be subjected to higher instantaneous discharge pressure under low temperature conditions, thereby further aggravating the voltage drop and usable capacity decay, resulting in significant errors in the assessment of the range and remaining power.
[0004] Existing technologies also include solutions for low battery warnings or shutdown protection through battery voltage detection. However, these solutions are mostly used for threshold alarms or protection cut-offs and lack a closed-loop correction mechanism for drive control to address changes in battery output capacity under low temperature conditions. This makes it difficult to maintain the stability and predictability of lighting output when power supply is limited.
[0005] Furthermore, field surveillance missions typically require handheld lights to maintain a minimum level of illumination even when no one is directly operating them or when personnel remain stationary for extended periods, in order to meet the needs of constant monitoring and emergency response. Existing energy-saving strategies based on motion / occupancy detection using infrared, microwave, and other methods largely rely on "motion events" to determine the presence of personnel. When personnel are stationary, make small movements, or are in sensor blind spots, the system may determine that no one is present and trigger the lights to shut off or enter deep sleep mode, causing unexpected interruptions in lighting. When an emergency check is needed, the lights must be reactivated or manually operated, affecting continuous monitoring and on-site safety. Some products reduce the probability of false alarms by extending the light-off delay or disabling automatic functions, but this leads to increased standby power consumption or reduced energy-saving effects, making it difficult to balance the requirements of long battery life in low temperatures and continuous low-light illumination.
[0006] Therefore, in low-temperature, long-duration operation scenarios, existing energy-saving control methods and systems for portable lamps still have shortcomings in terms of output stability, predictability of battery life, and prevention of accidental shutdown under power-limited conditions. Summary of the Invention
[0007] This application provides an energy-saving control method and system for a portable lamp, which solves the problems of nonlinear battery output due to low temperature, easy dimming jitter and inaccurate battery life, and easy accidental shutdown when stationary.
[0008] In a first aspect, embodiments of the present invention provide an energy-saving control method for a portable lamp, comprising: Step S1: Obtain the battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance output by the battery management unit, as well as the expected task duration input by the user. Step S2: Calculate the available energy that can be allocated within the expected task duration based on the battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance, and obtain the time-sharing energy budget. Step S3: Generate a planning curve of the target current changing over time based on the time-sharing energy budget, and limit the target current to be no less than the lower limit of the standby current; Step S4: During operation, the LED circuit current is periodically sampled to obtain the actual current. The deviation between the actual current and the target current at the corresponding moment of the planned curve is calculated. Based on the deviation, the pulse width modulation (PWM) duty cycle of the drive circuit is adjusted so that the actual current tracks the target current.
[0009] In some embodiments, obtaining the equivalent internal resistance includes: Apply at least two sets of test loads with different PWM duty cycles within the preset sampling window, and collect the corresponding battery terminal voltage and LED circuit current respectively; The equivalent internal resistance is calculated based on the change in the battery terminal voltage and the LED circuit current, or the equivalent internal resistance is determined from preset lookup table data based on the change.
[0010] In some embodiments, when the planning curve is executed, if it is detected that the battery terminal voltage is lower than the undervoltage threshold or the PWM duty cycle reaches the upper limit and the actual current is still less than the target current, the target current of the planning curve in the subsequent period is reduced according to a preset derating rule, and the reduced target current is still limited to not lower than the standby current lower limit.
[0011] In some embodiments, generating the planning curve includes obtaining an estimated ambient illuminance value and correcting the target current based on the estimated ambient illuminance value; The acquisition of the ambient illuminance estimate includes: acquiring the raw light signals of a first light sensor and a second light sensor, wherein the first light sensor points to the area illuminated by the handheld lamp and the second light sensor points to the ambient background; and calculating the ambient illuminance estimate based on the difference between the two signals and in combination with preset calibration parameters.
[0012] In some embodiments, interference removal of the original optical signal includes: Perform time-domain feature analysis on the continuously sampled signal; when the rising edge steepness and duration meet the preset pulse interference characteristics and repeat with a preset period, mark the corresponding time period as the interference segment; remove the data in the interference segment when calculating the estimated ambient illuminance value; When performing interference removal on the original optical signal, the rising edge steepness is obtained within a fixed-duration calculation window and converted into the corresponding number of sampling points as the sampling rate changes; the duration is statistically analyzed according to continuous sample segments that meet the amplitude threshold, where the amplitude threshold is a threshold used to determine the pulse amplitude crossing; periodic discrimination is based on the consistency of adjacent intervals of candidate pulse start points; the steepness threshold and amplitude threshold are adaptively updated based on battery temperature, estimated ambient illuminance, and fluctuation level of non-interference segments, and the sampling rate change is normalized.
[0013] In some embodiments, generating or updating the planning curve includes feedforward adjustment: Acquire motion data output by the inertial measurement unit and calculate the relative displacement trajectory of the hand lamp in the preset coordinate system; A mapping relationship between position and target current correction amount is established based on historical displacement trajectories and pre-calibrated characteristics of multiple typical working positions; When it is predicted that the handheld lamp will enter a typical working position at a future time based on the current movement trend, the planning curve is adjusted forward according to the mapping relationship. The typical working position characteristics include at least the attitude angle range, relative displacement range, dwell time, and motion frequency characteristics; the mapping relationship uses a cluster center table or multidimensional lookup table to store the correspondence between the position characteristics and the target current correction amount; when it is predicted that the handheld lamp will enter a certain typical working position in the future based on the current motion trend, and the prediction confidence meets the entry threshold and remains there for a preset duration, the planning curve is adjusted forward according to the mapping relationship; when the prediction confidence is lower than the backoff threshold or the dwell time element is not met after entering, the forward adjustment is canceled and the plan curve is backed up to the uncorrected planning curve.
[0014] In some embodiments, generating the planning curve includes task phase identification: The system acquires the operating status of the external electronic device that establishes a communication connection with the portable lamp. The operating status includes an active state and a sleep state. When the external electronic device is in an active state, the current period is identified as an active operating period and the target current of the planned curve is not lower than the lower limit of the operating period current. When the external electronic device switches to a sleep state and continues for a preset duration, the current period is identified as an intermittent period and the target current of the planned curve is allowed to be lowered to the lower limit of the intermittent period current.
[0015] Secondly, embodiments of the present invention provide an energy-saving control system for a portable lamp, comprising, The control unit is configured to execute the energy-saving control method for the portable lamp described in the first aspect; A battery management unit, connected to the control unit, is used to output battery temperature, battery terminal voltage, estimated remaining capacity, and equivalent internal resistance. A current sampling circuit, connected to the control unit, is used to sample the LED circuit current; A driving circuit, connected to the control unit, is used to drive the LED light source according to the PWM signal output by the control unit.
[0016] In some embodiments, a light sensor assembly includes a first light sensor and a second light sensor, the first light sensor facing the illumination area and the second light sensor facing the ambient background, and the control unit obtains an estimated ambient illuminance value based on the difference between the two signals and uses it to correct the planning curve.
[0017] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the energy-saving control method for a portable lamp as described in the first aspect of the present invention.
[0018] Through the above technical solution, the present invention can achieve at least the following beneficial effects: To address the issue of brightness fluctuations caused by increased battery internal resistance and decreased terminal voltage leading to the drive entering a restricted region under low-temperature conditions, closed-loop control with the target current as the setpoint is used, combined with periodic sampling of the actual current and adjustment of the PWM duty cycle. This transforms the light source output from nonlinear disturbances on the power supply side into a controlled current tracking process, reducing unpredictable fluctuations in output caused by voltage changes.
[0019] To address the challenge of balancing continuous lighting and energy-saving battery life in long-duration scenarios, this paper incorporates battery status parameters and expected task duration into the calculation of available energy and forms a time-sharing energy budget. This expands the lighting output from single-moment brightness control to cross-time period energy consumption distribution control. The planning curve distributes the target current in the time dimension, forming an energy consumption rhythm that matches the task duration.
[0020] To address the issue of unstable range assessment caused by changes in remaining power availability at low temperatures, quantities characterizing power supply capability, such as equivalent internal resistance and terminal voltage, are incorporated into the budget and derating trigger conditions. This enables the control link to have a detectable and fallback adjustment path when power supply capability decreases, reducing the accumulation of range deviation caused by relying solely on voltage alarms without correcting drive control.
[0021] To address the flickering and ineffective power consumption issues caused by continuously increasing the duty cycle when the setpoint cannot be achieved under under conditions of undervoltage or duty cycle saturation, the target current for subsequent periods is reduced according to the derating rule through the triggering logic of the undervoltage threshold and the upper limit of the duty cycle. This ensures that the control target is consistent with the power supply capacity and maintains the minimum lighting limit under limited operating conditions, thereby reducing output jitter caused by repeated saturation adjustments.
[0022] To address the issue of maintaining a minimum level of illumination even when no one is directly operating the system for duty-related tasks, the system uses a standby current lower limit and a task phase identification-based current lower limit for the working / intermittent period to constrain the lighting control. This ensures that the lighting control retains a usable low-light illumination state when entering a low-power phase, reducing the probability of entering a completely off state due to inactivity or lack of interactive triggers.
[0023] To address the issue that ambient light estimation is susceptible to changes in background light and external periodic flicker interference, leading to unstable brightness decisions, a dual-sensor differential acquisition method is used to obtain ambient illuminance estimates. Periodic pulse interference segments are identified and eliminated, reducing interference in the input data for ambient illuminance estimation and improving the stability and consistency of the planning curve correction.
[0024] To address the issues of changing lighting demands and adjustment lag caused by changes in the working position of a portable lamp, the relative displacement trajectory is calculated using an IMU, and entry into typical working positions is predicted and determined. This allows the planning curve to be adjusted forward before entering a specific position, reducing sudden changes in brightness and frequent corrections during position changes.
[0025] To address the issue of control links being easily disrupted under abnormal operating conditions such as sensor malfunctions and communication disconnections, processing actions such as anomaly identification and rollback phase determination, freeze correction, and derating are implemented to ensure that planning curve constraints and safety-related constraints remain executable under abnormal operating conditions, thereby improving the availability of continuous lighting in complex field conditions. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation on the scope of this application.
[0027] Figure 1 This is a flowchart of the energy-saving control method for the portable lamp in the embodiment.
[0028] Figure 2 This is a framework diagram of the energy-saving control system for the portable lamp in the embodiment. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0030] All terms used in this application (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0031] Furthermore, for ease of understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below: The standby current lower limit is the minimum LED circuit current threshold for maintaining the lowest low-light illumination. The lower limit of the operating current is the minimum LED circuit current threshold for maintaining basic lighting during the active operating period; The lower limit of the intermittent current is the minimum LED circuit current threshold that can be reduced during the intermittent period; The planned curve is a time-indexed target current sequence, stored using a curve table structure; Time-of-use energy budgeting is a sequence of energy allocations divided into time slices, with each time slice corresponding to a budget entry. The undervoltage threshold is the minimum battery terminal voltage threshold required for the drive circuit to maintain stable output. The derating rules are a set of rules that reduce the target current for subsequent time slices when the power supply capability is insufficient. The interference segment is the set of time intervals in which periodic pulse interference is determined to exist; Typical working position features are a set of features used to describe common usage positions, including attitude angle range, displacement range, dwell time features, and motion frequency features.
[0032] Example 1: like Figure 1 As shown, this embodiment proposes an energy-saving control method for a portable lamp, including the following steps: Step S1: Obtain the battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance output by the battery management unit, as well as the expected task duration input by the user. Step S2: Calculate the available energy that can be allocated within the expected task duration based on battery temperature, battery terminal voltage, estimated remaining capacity, and equivalent internal resistance, and obtain the time-sharing energy budget. The battery status parameters are a set of data fields output by the battery management unit, including battery temperature, terminal voltage, estimated remaining charge, and equivalent internal resistance. The expected task duration is the continuous lighting time length input by the user. Available energy is the allowable energy consumption within the expected task duration, calculated based on a combination of constraints from battery terminal voltage, estimated remaining charge, and equivalent internal resistance, while considering the minimum operating voltage requirement of the driver circuit and the upper limit of the allowable operating current of the LED circuit. The time-sharing energy budget is a time-divided energy allocation sequence organized using discrete time slices, with each time slice corresponding to a budget entry. The budget entry field set includes the start and end times of the time slice, the available energy amount for that time slice, the upper limit of the allowable target current, the lower limit of the allowable target current, and a stage identifier. The estimated remaining charge is the battery's available charge at the current moment, derived from the SOC output of the battery management unit or calculated by the control unit based on the charge metering and voltage information provided by the battery management unit. When a sudden drop in battery terminal voltage, rapid temperature change, or abnormal current fluctuation occurs, outlier suppression and smoothing updates are performed on the estimated remaining charge.
[0033] The planned curve showing the target current changing over time is a time-indexed target current sequence, stored in a curve table structure. The table's entry fields include the start and end times of the time slice, the target current value, the standby lower limit identifier, the operating period lower limit identifier, and the derating identifier. The standby current lower limit is the minimum LED circuit current threshold required to maintain basic low-light illumination; the operating period current lower limit is the minimum LED circuit current threshold required to maintain basic illumination during active operating periods; and the intermittent period current lower limit is the minimum LED circuit current threshold allowed to be reduced during intermittent periods. These lower limits are used as constraints in the calculations during the generation and updating of the planned curve. The correspondence between target current and brightness is achieved through a calibration table. The calibration table takes the target current as input and outputs an estimated LED luminous flux or illuminance value. The calibration table's entry fields include the battery terminal voltage range, the ambient temperature range, the target current, and the corresponding light output value.
[0034] The closed-loop control cycle is a control loop that is executed with a fixed period. In each control cycle, current sampling, filtering, deviation calculation and PWM duty cycle update are completed. In this embodiment, the closed-loop control cycle is used as an implementation parameter, with a default value of 0.01s and an adjustable value of 0.005~0.05s; the sliding window length of the current sampling filter is used as an implementation parameter, with a default value of 5 sampling points and an adjustable value of 3~15 sampling points; the upper limit of the single-cycle change of the PWM duty cycle is used as an implementation parameter, with a default value of 0.02; the hysteresis hold time for undervoltage entry and exit is used as an implementation parameter, with a default value of 2s; the above implementation parameters can be tuned based on historical sample quantiles or verification sets, and a parameter version field is added to the control record entry for traceability.
[0035] Low-pass filtering or sliding window averaging is applied to the current sample values to suppress sampling noise, and a rate-of-change limit is imposed on the PWM duty cycle to reduce the risk of visible flicker. The PWM duty cycle is limited between the lower and upper limits, and saturation suppression is performed on the integral term to avoid integral accumulation caused by prolonged undervoltage. The control unit generates control log entries during operation. The control log entry field set includes timestamp, terminal voltage, battery temperature, target current, actual current, PWM duty cycle, stage identifier, and anomaly identifier. The candidate set of anomaly identifiers includes undervoltage, overcurrent, sensor malfunction, communication disconnection, and temperature anomaly.
[0036] Step S3: Generate a planning curve of the target current changing over time based on the time-sharing energy budget, and limit the target current to be no less than the lower limit of the standby current; Step S4: During operation, the LED circuit current is periodically sampled to obtain the actual current. The deviation between the actual current and the target current at the corresponding moment of the planned curve is calculated. Based on the deviation, the pulse width modulation (PWM) duty cycle of the drive circuit is adjusted so that the actual current tracks the target current. In one embodiment, obtaining the equivalent internal resistance includes: At least two test loads with different PWM duty cycles are applied within a preset sampling window, and the corresponding battery terminal voltage and LED circuit current are collected respectively. The preset sampling window is a short measurement period used to estimate the equivalent internal resistance. Its triggering conditions are power-on initialization, task phase switching, temperature crossing a preset range, or timed measurement triggered according to a preset cycle. When the lighting is in operation and the stability requirements are high, the sampling window is scheduled to be executed within a time slice where the target current changes less. The test load is a sequence of current disturbances introduced by the change of PWM duty cycle. The test load sequence contains at least two duty cycle states, and a stable waiting period is set for each state to obtain a steady-state sampling value. During the application of the test load, the target current of the planned curve remains unchanged or is compensated according to a smoothing strategy to reduce the impact on the lighting output. In this embodiment, a preset sampling window is used as an implementation parameter, with a default value of 0.3s and an adjustable value of 0.1~1s. After each test load is applied, a stable waiting period is set as an implementation parameter, with a default value of 0.05s, which is used to allow the battery terminal voltage and LED circuit current to enter a stable range that can be sampled. Within the sampling window, the battery terminal voltage and LED circuit current are aligned with the same timestamp and the representative value of the steady-state range is taken. If an undervoltage flag or a duty cycle saturation flag is detected, the window is discarded and an anomaly flag field is written.
[0037] The equivalent internal resistance is the equivalent linear response coefficient of the battery terminal voltage to the load current change under the current operating conditions, calculated based on the changes in battery terminal voltage and LED circuit current. Data sets are discarded when they meet anomaly criteria. Candidates for anomaly criteria include excessively small current changes, excessive battery terminal voltage sampling jitter, battery terminal voltage entering the undervoltage region, and phase switching occurring during sampling. The lookup table is a preset equivalent internal resistance reference table, indexed by battery temperature range, remaining charge estimate range, and discharge current range, outputting the estimated equivalent internal resistance value. When the linear calculation result is unstable or abnormal, the reference table output is used as a fallback value, and a fallback flag is recorded and entered into the control log entry.
[0038] The equivalent internal resistance can be calculated based on the changes in battery terminal voltage and LED circuit current, or the equivalent internal resistance can be determined from preset lookup table data based on the changes. In one embodiment, when the battery terminal voltage is detected to be lower than the undervoltage threshold or the PWM duty cycle reaches the upper limit and the actual current is still less than the target current during the execution of the planning curve, the target current of the planning curve in the subsequent period is reduced according to the preset derating rule, and the reduced target current is still limited to not lower than the standby current lower limit. The undervoltage threshold is the minimum battery terminal voltage threshold required for the drive circuit to maintain stable output. The undervoltage threshold is determined based on the drive circuit's minimum operating voltage and current sampling accuracy requirements, and includes hysteresis logic for entering and exiting undervoltage to reduce jitter. The derating rules are a set of rules for reducing the target current in subsequent time slices when the power supply capability is insufficient. They are expressed using a hierarchical table or a piecewise curve table. The input fields for the derating rules include the undervoltage flag, the deviation between the target current and the actual current, the duty cycle saturation flag, the equivalent internal resistance, and the battery temperature. The output fields are the drated target current and the derating duration.
[0039] When the undervoltage condition is resolved and the duty cycle is not saturated, the target current is gradually increased according to the recovery rules, which include a recovery step limit and a minimum stable duration. During the recovery process, the target current is kept no lower than the standby current lower limit, and the operating current lower limit constraint is maintained during the operating period. Event recording fields are set for undervoltage and derating events. The event recording field set includes event type, trigger time, release time, terminal voltage at trigger, target current at trigger, and target current after derating.
[0040] In one embodiment, generating the planning curve includes obtaining an estimated ambient illuminance value and correcting the target current based on the estimated ambient illuminance value; obtaining the estimated ambient illuminance value includes: obtaining the original light signals of a first light sensor and a second light sensor, wherein the first light sensor points to the area illuminated by the handheld lamp and the second light sensor points to the ambient background; calculating the estimated ambient illuminance value based on the difference between the two signals and in combination with preset calibration parameters; The ambient illuminance estimate is the effective illuminance estimate at the work surface, used to correct the target current in the planning curve. The preset calibration parameters are a set of parameters used to map the signal difference between the two light sensors to the ambient illuminance estimate. The parameter set fields include the gain and bias of the first light sensor, the gain and bias of the second light sensor, correction coefficients introduced by the sensor mounting angle and the light-shielding structure, and the initial light output calibration value of the portable lamp. The initial light output calibration value of the portable lamp is the reference light output value corresponding to driving the LED with a preset target current under standard conditions. The reference light output value is recorded in the form of illuminance or luminous flux and established with a correspondence to the target current.
[0041] When the first optical sensor signal is saturated, the second optical sensor signal is abnormal, or the difference between the two exceeds a reasonable range, a sensor abnormality flag is triggered, and the use of abnormal interval data for ambient illuminance estimation is stopped. The reasonable range criterion is determined by calibration data and stored in the form of an interval table. When the ambient illuminance estimate is used to correct the target current, the correction rules include the correction direction, correction amplitude limit, and correction duration, and the corrected target current still meets the standby current lower limit and stage lower limit constraints.
[0042] In one embodiment, interference removal from the original optical signal includes: Perform time-domain feature analysis on the continuously sampled signal; when the rising edge steepness and duration meet the preset pulse interference characteristics and repeat with a preset period, mark the corresponding time period as the interference segment; remove the data in the interference segment when calculating the estimated ambient illuminance value; The pulse interference feature is a set of time-domain features used to identify periodic optical interference. The feature set fields include rise edge steepness, pulse duration, pulse interval, and periodic stability. The periodic stability index is used to determine whether the fluctuation range of the pulse interval is within the allowable range. The interference segment is a set of time intervals where pulse interference is determined to exist. Interference segments are recorded in an interval list structure. Each interval entry's field set includes the interval start and end times, trigger feature type, trigger sensor channel, and confidence flag.
[0043] Temporal feature analysis employs a sliding window to extract edges and pulses. Edge extraction suppresses noise and normalizes changes in the sampling rate. The normalization scale of edge extraction is updated when the sampling rate changes or the sensor gain switches. The interference segment removal strategy freezes the estimated ambient illuminance value or uses the previous valid value within the interference segment, setting an upper limit on the freeze duration. When the interference segment duration exceeds the upper limit, a sensor anomaly flag is triggered, and a fallback control path is initiated. This fallback control path operates independently using the target current constraint of the planned curve.
[0044] When removing interference from the original optical signal, the rising edge steepness is obtained within a fixed-duration calculation window and converted into the corresponding number of sampling points as the sampling rate changes; the duration is statistically analyzed according to continuous sample segments that meet the amplitude threshold, where the amplitude threshold is a threshold used to determine the pulse amplitude crossing; periodic discrimination is based on the consistency of adjacent intervals of candidate pulse start points; the steepness threshold and amplitude threshold are adaptively updated based on battery temperature, estimated ambient illuminance, and fluctuation level of non-interference segments, and the sampling rate change is normalized. In one possible implementation, the original optical signal is subjected to interference removal as follows: In the temporal feature analysis, the synchronous sampling difference between the first and second optical sensors is used as the differential sequence to be analyzed. And a sliding window is used to identify and mark pulse-type interference.
[0045] In terms of steepness calculation methodology, the steepness calculation window is set to a fixed physical duration. The number of sampling points is then converted into the number of window points as the sampling rate changes. Used to calculate the discrete rising edge steepness; for any sampling time... The steepness of the rising edge is calculated using the following formula: , in, Indicates the steepness of the rising edge on a sample-scale basis; Indicates the difference sequence at the th The amplitude of each sampling point Take the original light signal from the first light sensor and subtract the original light signal from the second light sensor. The sampling point number, This represents the number of sampling points within the steepness calculation window, and the sampling rate is denoted as... The unit is Hz. Fixed physical duration With sampling rate The result is obtained through conversion.
[0046] In terms of duration statistics, the continuous sample segment after the amplitude threshold is taken as the statistical object: when detected After satisfying the steepness threshold, subsequent samples are searched for continuous intervals where the increment of the amplitude relative to the local baseline exceeds the amplitude threshold. The amplitude threshold is set using... And the length of the sample segment of this continuous interval is denoted as As a duration count, and Constraints by Within the range of the calculated sample size, to avoid misjudging slowly changing or single-point spikes as impulse interference. The local baseline can be obtained using the median of a short window to avoid being skewed by the impulse itself. In this embodiment, the short window duration of the local baseline is used as an implementation parameter, with a default of 0.2s and an adjustable range of 0.05~0.5s. During the sliding update of the local baseline, outlier spikes are removed and the median is used as the representative value. When the fluctuation level of the non-interference segment is used for threshold adaptive update, the steady-state fluctuation scale of the difference sequence is estimated within the non-interference segment and written into the scale field. If there are continuous missing measurements or the interference segment continues to exceed the limit, the scale field is frozen and the previous valid value is enabled. At the same time, the number of times the data is frozen is recorded in the interference segment interval entry for the fallback control path trigger determination.
[0047] Regarding threshold setting and adaptive updating, to take into account changes in temperature, ambient brightness, and noise levels, the steady-state fluctuation scale of the difference sequence is estimated online on samples not marked as interference segments. And use it to normalize and update the steepness threshold and amplitude threshold: , in, Indicates the steepness threshold; Indicates the steepness threshold coefficient; This represents the estimated fluctuation scale of the difference sequence within the non-interference segment.
[0048] , in, Indicates the amplitude threshold; Indicates the amplitude threshold coefficient; Using the previous definition. For and The threshold can be updated using a piecewise lookup table or piecewise linear correction method based on the estimated battery temperature and ambient illuminance, so that the threshold rises synchronously when sensor noise increases due to high temperature or high background brightness; when the sampling rate changes, it is adjusted accordingly. and The conversion to sample point count maintains the window duration and duration discrimination criteria. This drift normalizes the changes in the sampling rate.
[0049] In terms of periodic discrimination, the starting sample index of each candidate pulse is recorded to form a sequence. Calculate the interval between adjacent pulses And within a preset observation length, its dispersion is statistically analyzed, where Indicates the first The and the first The sample interval between candidate pulses; Indicates the first The starting sample index of each candidate pulse; This refers to the candidate pulse number. The preset period range is represented by the sample interval and can be based on... The time period range is converted; the degree of dispersion is characterized by the variance of adjacent pulse interval sequences within a preset observation length in one implementation method; and by the coefficient of variation of adjacent pulse interval sequences within a preset observation length in another implementation method; the period consistency threshold is set corresponding to the selected characterization method.
[0050] when When the mean value falls within a preset periodic range and the dispersion is lower than the periodic consistency threshold, it is determined that the occurrence repeats within the preset period; this consistency threshold can also be adjusted accordingly. The linkage can be relaxed or tightened to adapt to different noise scenarios. For pulse segments that meet the requirements of steepness, duration, and periodicity, interference segments are marked according to the pulse start and end samples and the number of protected samples. When calculating the estimated ambient illuminance, data within the corresponding marked segments are removed to reduce the input error of pulse interference on the difference and calibration calculation. The number of protected samples is denoted as... It is used to extend the marker boundary on both sides of the pulse start and end samples to cover the transition segment at the pulse edge.
[0051] This implementation treats the differential sequences of two optical signals as a unified analysis object, extracts the rising edge steepness within a sliding window, and uses the length of the continuous sample segment after the amplitude threshold as the statistical caliber for duration. This ensures that the identification of impulse interference simultaneously covers both the rate of change and the duration of existence. Periodic discrimination filters recurring interference by recording the pulse start position and statistically analyzing the stability of adjacent pulse intervals, avoiding mistaking occasional spikes for removable interference. The threshold part introduces a normalized update based on the fluctuation scale of the non-interference segment, making the threshold change in tandem with the noise level, thus incorporating the increased fluctuations caused by temperature increases or changes in background brightness into the same update framework. For sampling rate changes, the window duration and duration range are converted into the number of sample points to maintain consistency in the time scale of the discrimination caliber, reducing false positives and false negatives caused by sampling rate switching. Finally, intervals that meet the conditions are marked as interference segments and removed during illuminance estimation, which reduces the impact of impulse interference on subsequent difference and calibration calculations.
[0052] In one implementation, generating or updating the planning curve includes feedforward adjustments: Acquire motion data output by the inertial measurement unit and calculate the relative displacement trajectory of the hand lamp in the preset coordinate system; A mapping relationship between position and target current correction amount is established based on historical displacement trajectories and pre-calibrated characteristics of multiple typical working positions; The preset coordinate system is a reference coordinate system used to describe the relative motion of the handheld lamp. The reference coordinate system is determined by the coordinate system of the handheld lamp body and the direction of gravity, and the initial attitude is determined through static calibration after power-on. The relative displacement trajectory is a displacement sequence obtained by attitude calculation and integration from the acceleration and angular velocity sequence output by the inertial measurement unit, and constraint correction is performed on zero drift and cumulative error. The constraint correction is achieved by a combination of static segment detection, zero velocity update and trajectory smoothing.
[0053] Typical operating position characteristics are a set of features used to describe common usage positions. The feature set fields include attitude angle range, displacement range, dwell time characteristics, and motion frequency characteristics. In this embodiment, the SOC output is one of the output forms of the remaining power estimate, representing the estimated proportion of the battery's available power at the current moment and updating it over time. PWM is a pulse width modulation signal, and the duty cycle is the proportion of the high-level duration of the PWM in one cycle, used to adjust the equivalent output of the drive circuit. The sampling rate is the number of samples per unit time, and the sampling point is the time series index after discretization according to the sampling rate. The motion data output by the inertial measurement unit is a synchronous sequence of acceleration and angular velocity, and is aligned with the optical sensor sampling and current sampling using the same system time reference. The alignment method uses the timestamp field for pairing. If there is sampling jitter, the nearest neighbor is used for pairing, and the alignment error field is recorded for backoff determination.
[0054] Typical operating locations are organized by category identifiers, and the category identifier set contains several pre-defined operating location categories. The mapping relationship is a correspondence table from typical operating location categories to target current correction amounts. The mapping table entry field set includes location category identifier, correction amount type, correction amount magnitude upper limit, and correction effective time window.
[0055] The prediction entry determination involves judging the movement trend within a short future time window and outputting a predicted location category. The prediction result field set includes the predicted location category, prediction confidence flag, and prediction effective start time. The mapping relationship is established based on calibration data, which comes from pose sequences under different ambient brightness conditions and corresponding location category labels. The location category labels are labeled manually or automatically based on rules governing the dwell area. The mapping relationship is updated using two methods: offline updates and online incremental updates. Online incremental updates are triggered by the deviation between the recent trajectory and the estimated actual ambient illumination, and historical version identifiers are retained in the entry control record during the update process.
[0056] When it is predicted that the handheld lamp will enter a typical working position in the future based on the current motion trend, the planning curve is adjusted forward according to the mapping relationship. Typical working position characteristics include at least attitude angle range, relative displacement range, dwell time, and motion frequency characteristics; the mapping relationship uses a cluster center table or multidimensional lookup table to store the correspondence between position characteristics and target current correction; when it is predicted that the handheld lamp will enter a typical working position in the future based on the current motion trend, and the prediction confidence meets the entry threshold and remains there for a preset duration, the planning curve is adjusted forward according to the mapping relationship; when the prediction confidence is lower than the backoff threshold or the dwell time element is not met after entering, the forward adjustment is canceled and the plan curve is backed up to the uncorrected planning curve. In one implementation, for the mapping relationship between position and target current correction, the acceleration and angular velocity output by the inertial measurement unit are processed by attitude calculation and relative displacement calculation. Then, a set of elements of typical working position characteristics are extracted within the sliding history window to establish a searchable data structure. During runtime, executable judgment logic is given for predicted entry.
[0057] Typical working position characteristics consist of the following elements aligned with the same time reference: attitude angle range (range constraints for pitch, roll, and yaw angles), relative displacement range (displacement magnitude or partial axis displacement falling within a given range in a preset coordinate system), dwell time (the continuous duration of the characteristics simultaneously satisfying a dwell time threshold), and motion frequency characteristics (the dominant frequency extracted from angular velocity or displacement velocity sequences within a historical window falling within a specified frequency band, or the dominant frequency energy percentage exceeding a threshold). These elements combine to form a position feature vector, serving as the index key for the mapping relationship. The position feature vector is obtained by concatenating attitude angle components, displacement components, dwell time components, and motion frequency components in a preset order, and each component is normalized according to its respective dimensional range to ensure comparability of different components under the same distance metric. This is the allowable deviation scale parameter within the normalized feature space.
[0058] The data structure for mapping relationships can be implemented using one of two methods: a cluster center table or a multidimensional lookup table. Cluster center table: Each typical working location is denoted as the cluster center. The class stores its central feature vector, allowable radius (or scale parameter), corresponding target current correction, suggested lead time, and backoff threshold. The central feature vector is calculated from historical displacement trajectory fragments by feature set and obtained through offline clustering. The correction amount is determined by pre-calibrated lighting demand and energy consumption constraints and fixed to the table item.
[0059] Multidimensional lookup table: The attitude angle range, displacement range, and motion frequency range are discretized into a multidimensional grid. Each grid cell stores the correction amount and the entry / retreat threshold for fast retrieval. The grid boundary is set by the calibration sample distribution and error tolerance.
[0060] In this embodiment, the cluster center table's entry field set includes location category identifier, center feature vector index, scale parameter, entry threshold, backoff threshold, target current correction amount, suggested lead amount, version number, and validity identifier; the multidimensional lookup table's entry field set includes discrete grid index key, correction amount, entry threshold, backoff threshold, version number, and validity identifier; the minimum trigger interval for online incremental updates is used as an implementation parameter, with a default of 60s and an adjustable range of 10~600s, and is written to the control record entries in an incrementing version number manner. If the validity identifier is invalid or the index key is missing during the update, the mapping relationship of the previous version is maintained and the backoff identifier field is written.
[0061] In terms of the logic for predicting entry, the system obtains the predicted feature vector for future moments based on the current motion trend during runtime. And calculate the entry confidence level for each type of typical location: , in, Indicates prediction of entering the 1st Confidence level of typical work locations; Indicates lead time The feature vector predicted at the corresponding future time; Indicates the first The central feature vector of a typical working position; Indicates the first The scale parameter of the class is used to characterize the acceptable range of feature deviations; Represents the vector norm; This is an index for typical work location categories.
[0062] When the maximum confidence level meets the entry threshold and remains true throughout the entry discrimination duration, a feedforward adjustment is triggered; the correction amount can be weighted by confidence level to reduce handover jitter. , in, This indicates the target current correction amount used for feedforward adjustment; This indicates the total number of typical work location categories; Indicates the first Class confidence level; Indicates the first The target current correction amount corresponding to a typical operating position; The category index for normalized summation. The target current for subsequent periods is superimposed on the planning curve and correlated with the prediction results for entering a typical operating position.
[0063] The rollback condition can be a combination of confidence hysteresis and dwell time constraints: When the current confidence level is lower than the backoff threshold and continues to reach the backoff hold time, or when the predicted entry fails to meet the dwell time element within the verification window, the feedforward adjustment is revoked and the system reverts to the uncorrected planning curve. The entry threshold is denoted as... The fallback threshold is denoted as The duration of entry is recorded as follows: The duration of the rollback is recorded as follows: The verification window duration is recorded as follows: Each duration is in seconds and is consistent with the system time base; Indicates the current moment. This indicates the feedforward lead time, measured in seconds.
[0064] This implementation defines typical working positions as a set of elements jointly described by attitude angle intervals, displacement ranges, dwell time, and motion frequency characteristics, enabling historical displacement trajectories to be uniformly categorized into searchable feature samples. The mapping relationship is achieved through a cluster center table or multi-dimensional lookup table, which can cover common lamp-holding attitudes and working positions with fewer entries, and also achieve rapid indexing in a gridded structure. The target current correction and entry / retreat conditions are solidified in the same data structure for easy retrieval within the control unit. The predicted entry logic introduces lead time and confidence level calculations, measuring the distance between future features derived from motion trends and typical position features, thus transforming the impending entry into a discriminative numerical condition. Simultaneously, it combines entry hold and retreat hold to form hysteresis, reducing frequent triggering caused by short-term attitude fluctuations or path noise. The correction amount is generated using a confidence-weighted method to avoid abrupt changes during category switching and provides continuous input for subsequently overlaying the correction amount onto the planning curve.
[0065] In one implementation, generating the planning curve includes task phase identification: The system acquires the operating status of the external electronic device that establishes a communication connection with the handheld lamp. The operating status includes active state and sleep state. When the external electronic device is in active state, the current period is identified as an active operating period and the target current of the planned curve is not lower than the lower limit of the operating period current. When the external electronic device switches to sleep state and continues for a preset duration, the current period is identified as an intermittent period and the target current of the planned curve is allowed to be lowered to the lower limit of the intermittent period current. The external electronic device is the physical device that establishes a communication connection with the portable lamp. This connection is established via a wired or wireless link and its status is maintained by the control unit. The operating state is the current running state identifier of the external electronic device, including active and sleep states. An active state is determined by the presence of task interaction events or business data exchange events within a preset time window, while a sleep state is determined by the absence of task interaction events and entry into a low-power operating state within the preset time window. The candidate set of task interaction events includes user input events, interface wake-up events, and control command issuance events; the candidate set of business data exchange events includes periodic heartbeats, status reporting, and data transmission.
[0066] The preset duration is a sleep duration determination time window, used to suppress frequent phase switching caused by short-term jitter. When the communication link is disconnected, heartbeat timeout occurs, or the status field is missing, a communication disconnection anomaly flag is triggered, and a rollback phase determination is adopted. The rollback phase determination is to maintain the current phase or switch to a safe phase. The target current corresponding to the safe phase is constrained by the lower limit of standby current and does not exceed the lower limit of operating current. The phase identification result is written to the phase identifier field in the control record entry, along with a status source identifier to distinguish between normal and rollback states.
[0067] Example 2: Based on Example 1, such as Figure 2 As shown, this embodiment provides an energy-saving control system for a portable lamp, including: The control unit is configured to execute the method of Example 1; The battery management unit, connected to the control unit, is used to output battery temperature, battery terminal voltage, estimated remaining capacity, and equivalent internal resistance. The current sampling circuit, connected to the control unit, is used to sample the LED circuit current. The driving circuit, connected to the control unit, is used to drive the LED light source according to the PWM signal output by the control unit. Data interaction between the control unit, battery management unit, current sampling circuit, and drive circuit is performed using a periodic scheduling method. In each control cycle, the control unit reads battery status parameters and actual current, and outputs an updated PWM signal. The current sampling circuit samples the LED circuit current and outputs a digital sample value or analog voltage signal. The control unit performs quantization and filtering on the sampled signal to obtain the actual current. The drive circuit receives the PWM signal and drives the LED light source. The drive circuit includes a duty cycle upper limit and undervoltage protection logic; when the undervoltage protection logic is triggered, the drive circuit output is limited and marked as duty cycle saturation in the control log entry.
[0068] The candidate set of abnormal operating conditions for the system includes undervoltage, overcurrent, overtemperature, sensor malfunction, and communication disconnection. Entry conditions, exit conditions, and handling actions are set for each type of abnormal operating condition. The candidate set of handling actions includes target current derating, freezing ambient illuminance correction, switching back-off phase, and maintaining the lower limit of standby current. When abnormal operating condition handling actions and planning curve constraints are in effect simultaneously, arbitration is based on priority rules, with safety-related constraints taking precedence over brightness improvement constraints.
[0069] In one embodiment, the system further includes a light sensor assembly comprising a first light sensor and a second light sensor, the first light sensor facing the irradiated area and the second light sensor facing the ambient background, and the control unit obtaining an estimated ambient illuminance value based on the difference between the two signals and using it to correct the planning curve. The installation positions and orientations of the first and second light sensors are fixed in the factory calibration. The field of view of the first light sensor covers the illuminated area, and the field of view of the second light sensor covers the ambient background. When the attitude of the handheld lamp changes, causing the field of view to deviate, attitude compensation is performed on the differential results of the light sensors using the attitude information output by the inertial measurement unit. Attitude compensation is implemented using a compensation table structure. The field set of the compensation table includes the attitude angle range, differential correction coefficient, and validity indicator. When there is no matching entry in the compensation table, the estimated ambient illuminance value is entered into a freeze strategy and the freeze indicator is recorded.
[0070] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the energy-saving control method for the portable lamp as described in the above embodiment. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0071] Example 3: This embodiment provides an application scenario for nighttime duty at a high-altitude scientific research camp. The application object is a portable lamp and its energy-saving control system. The environmental boundaries include low temperatures of 0 to -30°C, uncertain changes in the reflectivity of the work surface and background light, and the possibility that personnel may remain stationary for extended periods while requiring continuous low-light illumination. The constraints of this scenario are: the lighting needs to operate continuously for 4 to 12 hours; the battery terminal voltage may drop rapidly under low temperatures and load changes; and there may be periodic pulse light interference from the outside world, causing fluctuations in the estimated ambient illuminance.
[0072] In this embodiment, the control unit is connected to the battery management unit, the current sampling circuit, and the drive circuit. The portable lamp is equipped with a first light sensor, a second light sensor, and an inertial measurement unit. The portable lamp establishes a communication connection with external electronic devices to obtain its operating status. Input signal sources include: battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance output by the battery management unit; LED circuit current sampling value output by the current sampling circuit; raw light signals output by the first and second light sensors; acceleration and angular velocity sequences output by the inertial measurement unit; and active and sleep states output by external electronic devices. Each input carries a timestamp field and is aligned with the system time base. When sampling jitter exists, nearest neighbor pairing is used, and the alignment error field is recorded. Control record entries are written in timestamp order, and the fields include timestamp, battery terminal voltage, battery temperature, target current, actual current, PWM duty cycle, stage identifier, and abnormal identifier, along with a parameter version field and mapping relationship version number.
[0073] Specifically, during the cold start phase, after powering on, the control unit reads the battery temperature, battery terminal voltage, estimated remaining capacity, and equivalent internal resistance from the battery management unit, and also reads the user-inputted expected task duration, such as 8 hours. Based on the battery terminal voltage, estimated remaining capacity, and equivalent internal resistance, the control unit calculates available energy and generates a time-sharing energy budget. This budget is organized in discrete time slices, with each slice's budget entries including the start and end times, available energy allowance, upper limit of the allowed target current, lower limit of the allowed target current, and a phase identifier. Subsequently, the control unit generates a planning curve showing the target current changing over time based on the time-sharing energy budget. This curve is stored in a curve table structure, with entries including the start and end times of the time slice, the target current value, the standby lower limit identifier, the operating period lower limit identifier, and a derating identifier, ensuring the target current is not lower than the standby lower limit. When external electronic devices are active, the phase identifier is set to active operating period, and the target current is kept above the operating period lower limit. When external electronic devices are in sleep mode and have remained in sleep mode for a preset duration, the phase identifier is set to intermittent period, and the target current is allowed to decrease to the intermittent period lower limit.
[0074] During normal continuous operation, the control unit executes a fixed-cycle control loop according to the closed-loop control cycle. The closed-loop control cycle is set to 0.01s as an implementation parameter and can be adjusted within the range of 0.005 to 0.05s. Within each control cycle, the control unit samples the LED circuit current to obtain the actual current. Sliding window filtering is performed on the current sampling. The window length is set to 5 sampling points as an implementation parameter and can be adjusted within the range of 3 to 15 sampling points. The control unit takes the target current at the corresponding moment from the planned curve, calculates the deviation between the actual current and the target current, and adjusts the PWM duty cycle to make the actual current track the target current. The upper limit of the single-cycle change of the PWM duty cycle is set to 0.02 as an implementation parameter to suppress visible flicker caused by frequent duty cycle jumps. Under the same time reference, the control unit periodically reads the original light signals of the first light sensor and the second light sensor and calculates the signal difference. It then combines the preset calibration parameters to obtain the ambient illuminance estimate and corrects the target current in the planning curve based on the ambient illuminance estimate. When the first light sensor signal is detected to be saturated, the second light sensor signal is abnormal, or the difference between the two exceeds a reasonable range, a sensor abnormality flag is written and the abnormal interval data is stopped from being used for ambient illuminance estimation.
[0075] Furthermore, under camp lighting conditions with external periodic pulse light interference, the control unit performs time-domain feature analysis on continuously sampled signals. When it identifies a time segment where the rising edge steepness and duration meet preset pulse interference characteristics and repeat at a preset period, the corresponding time segment is marked as an interference segment, and data within the interference segment is removed when calculating the ambient illuminance estimate. The local baseline is obtained using the median of a short window, with the short window duration set to 0.2s as an implementation parameter and adjustable within the range of 0.05~0.5s. The fluctuation level of the non-interference segment is used for threshold adaptive updating and written into the scale field. When the duration of the interference segment exceeds the upper limit of the freeze duration or continuous missing measurements cause the scale field to become unupdateable, the ambient illuminance estimate is entered into the freeze strategy, and the number of freezes is recorded in the freeze count field. Simultaneously, the planning curve runs independently according to the target current constraint, and the anomaly identification field is filled with sensor anomaly and freeze identification for traceability.
[0076] Furthermore, during personnel patrolling with the lamp and returning to their post, the acceleration and angular velocity sequences output by the inertial measurement unit are used to calculate the relative displacement trajectory of the handheld lamp in a preset coordinate system. Typical working position characteristics include at least the attitude angle range, relative displacement range, dwell time, and motion frequency characteristics. The control unit establishes a mapping relationship between position and target current correction based on historical displacement trajectories and pre-calibrated typical working position characteristics. The mapping relationship is stored using a cluster center table or multi-dimensional lookup table to store the correspondence between position characteristics and target current correction, and is managed by version number. The minimum trigger interval for online incremental updates is set to 60s as an implementation parameter and can be adjusted within the range of 10~600s. When it is predicted that the handheld lamp will enter a certain typical working position at a future time based on the current motion trend, and the prediction confidence meets the entry threshold and remains there for a preset duration, the control unit performs feedforward adjustment on the planning curve according to the mapping relationship and writes the mapping relationship version number into the control record entry. When the prediction confidence is lower than the backoff threshold or the dwell time element is not met after entering, the feedforward adjustment is canceled and the lamp is backed to the uncorrected planning curve, and the backoff identifier field is written.
[0077] This embodiment provides two types of anomalies: undervoltage and communication disconnection. First, when the battery terminal voltage is detected to be below the undervoltage threshold or the PWM duty cycle reaches its upper limit and the actual current is still less than the target current, the control unit will adjust the target current of the planned curve in subsequent periods according to a preset derating rule, and the adjusted target current will still be limited to not lower than the standby current lower limit. Undervoltage entry and exit adopt hysteresis logic and suppress jitter with a holding duration; the hysteresis holding duration is set to 2 seconds as an implementation parameter. Undervoltage and derating events form event record fields, including event type, trigger time, release time, battery terminal voltage at trigger, target current at trigger, and target current after derating. Second, when the communication link is disconnected, heartbeat timeout occurs, or the status field is missing, the control unit writes a communication disconnection anomaly flag and uses a rollback phase determination. The rollback phase determination is to maintain the current phase or switch to a safe phase. The target current corresponding to the safe phase is constrained by the standby current lower limit and is not higher than the operating current lower limit. During the disconnection period, control record entries are continuously written to form a traceable time sequence.
[0078] When the undervoltage condition is resolved and the duty cycle is not saturated, the control unit gradually increases the target current according to the recovery rule and maintains the standby current lower limit constraint, while maintaining the operating current lower limit constraint during the operating period; when communication is restored and the external electronic device's operating status field remains valid, the stage identifier switches from the rollback state to the normal source state, and deduplicates the stage switching during the disconnection period, merging control record entries with the timestamp as the alignment key; when the light sensor malfunction is resolved and the difference returns to a reasonable range, the freeze strategy is lifted and the ambient illuminance estimation correction is restored, and the freeze identifier and the lifting time are written into the control record entry to reproduce the operation process.
[0079] Through the above scenario examples, under conditions where low-temperature battery output is limited and varies significantly with load, the lighting output can be stably and controllably tracked by the target current through closed-loop tracking. When there is undervoltage or duty cycle saturation, the control target and power supply capacity are kept consistent according to the derating rules, thereby suppressing output instability and ineffective power consumption caused by continuously increasing the duty cycle. Under conditions of long-term on-duty operation and personnel stillness, minimum low-light illumination can be maintained through the standby current lower limit and stage marker constraints, and energy consumption allocation can be completed during the switching between active and dormant states of external electronic devices. When there is periodic pulse light interference, the availability of environmental illuminance estimation correction can be maintained through interference segment elimination and freeze back-off caliber. Under abnormalities such as sensor malfunction or communication disconnection, the planning curve and recording link can be maintained continuously, so that the operation process is reproducible, traceable, and has a consistent engineering implementation caliber.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0081] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of this application and form different embodiments. For example, all the embodiments above can be used in any combination. The information disclosed in this background section is intended only to enhance the understanding of the general background of this application and should not be construed as an admission or in any way implying that such information constitutes prior art known to those skilled in the art.
Claims
1. An energy-saving control method for a portable lamp, characterized in that, include: Step S1: Obtain the battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance output by the battery management unit, as well as the expected task duration input by the user. Step S2: Calculate the available energy that can be allocated within the expected task duration based on the battery temperature, battery terminal voltage, estimated remaining charge, and equivalent internal resistance, and obtain the time-sharing energy budget. Step S3: Generate a planning curve of the target current changing over time based on the time-sharing energy budget, and limit the target current to be no less than the lower limit of the standby current; Step S4: During operation, the LED circuit current is periodically sampled to obtain the actual current. The deviation between the actual current and the target current at the corresponding moment of the planned curve is calculated. Based on the deviation, the pulse width modulation (PWM) duty cycle of the drive circuit is adjusted so that the actual current tracks the target current.
2. The energy-saving control method for a portable lamp as described in claim 1, characterized in that, Obtaining the equivalent internal resistance includes: Apply at least two sets of test loads with different PWM duty cycles within the preset sampling window, and collect the corresponding battery terminal voltage and LED circuit current respectively; The equivalent internal resistance is calculated based on the change in the battery terminal voltage and the LED circuit current, or the equivalent internal resistance is determined from preset lookup table data based on the change.
3. The energy-saving control method for a portable lamp as described in claim 1, characterized in that, When executing the planning curve, if the battery terminal voltage is detected to be lower than the undervoltage threshold or the PWM duty cycle reaches the upper limit and the actual current is still less than the target current, the target current of the planning curve in the subsequent period is reduced according to the preset derating rule, and the reduced target current is still limited to not lower than the standby current lower limit.
4. The energy-saving control method for a portable lamp as described in claim 1, characterized in that, Generating the planning curve includes obtaining an estimated ambient illuminance value and correcting the target current based on the estimated ambient illuminance value; The acquisition of the ambient illuminance estimate includes: acquiring the raw light signals of a first light sensor and a second light sensor, wherein the first light sensor points to the area illuminated by the handheld lamp and the second light sensor points to the ambient background; and calculating the ambient illuminance estimate based on the difference between the two signals and in combination with preset calibration parameters.
5. The energy-saving control method for a portable lamp as described in claim 4, characterized in that, The interference removal process for the original optical signal includes: Perform time-domain feature analysis on the continuously sampled signal; when the rising edge steepness and duration meet the preset pulse interference characteristics and repeat with a preset period, mark the corresponding time period as the interference segment; remove the data in the interference segment when calculating the estimated ambient illuminance value; When performing interference removal on the original optical signal, the rising edge steepness is obtained within a fixed-duration calculation window and converted into the corresponding number of sampling points as the sampling rate changes; the duration is statistically analyzed according to continuous sample segments that meet the amplitude threshold, where the amplitude threshold is a threshold used to determine the pulse amplitude crossing; periodic discrimination is based on the consistency of adjacent intervals of candidate pulse start points; the steepness threshold and amplitude threshold are adaptively updated based on battery temperature, estimated ambient illuminance, and fluctuation level of non-interference segments, and the sampling rate change is normalized.
6. The energy-saving control method for a portable lamp as described in claim 1, characterized in that, Generating or updating the planning curve includes feedforward adjustments: Acquire motion data output by the inertial measurement unit and calculate the relative displacement trajectory of the hand lamp in the preset coordinate system; A mapping relationship between position and target current correction amount is established based on historical displacement trajectory and pre-calibrated characteristics of multiple typical working positions; When it is predicted that the handheld lamp will enter a typical working position at a future time based on the current movement trend, the planning curve is adjusted forward according to the mapping relationship. The typical working position characteristics include at least the attitude angle range, relative displacement range, dwell time, and motion frequency characteristics; the mapping relationship uses a cluster center table or a multidimensional lookup table to store the correspondence between the position characteristics and the target current correction amount. When the current movement trend predicts that the handheld lamp will enter a typical working position in the future, and the prediction confidence meets the entry threshold and remains there for a preset duration, the planning curve is adjusted forward according to the mapping relationship; when the prediction confidence is lower than the backoff threshold or the dwell time element is not met after entering, the forward adjustment is canceled and the plan is backed to the uncorrected planning curve.
7. The energy-saving control method for a portable lamp as described in claim 1, characterized in that, Generating the planning curve includes task phase identification: The system acquires the operating status of the external electronic device that establishes a communication connection with the portable lamp. The operating status includes an active state and a sleep state. When the external electronic device is in an active state, the current period is identified as an active operating period and the target current of the planned curve is not lower than the lower limit of the operating period current. When the external electronic device switches to a sleep state and continues for a preset duration, the current period is identified as an intermittent period and the target current of the planned curve is allowed to be lowered to the lower limit of the intermittent period current.
8. An energy-saving control system for a portable lamp, characterized in that, include: The control unit is configured to perform the energy-saving control method for the portable lamp as described in any one of claims 1 to 7; A battery management unit, connected to the control unit, is used to output battery temperature, battery terminal voltage, estimated remaining capacity, and equivalent internal resistance. A current sampling circuit, connected to the control unit, is used to sample the LED circuit current; A driving circuit, connected to the control unit, is used to drive the LED light source according to the PWM signal output by the control unit.
9. The energy-saving control system for the portable lamp as described in claim 8, characterized in that, A light sensor assembly includes a first light sensor and a second light sensor, the first light sensor facing the illumination area and the second light sensor facing the ambient background, and the control unit obtains an estimated ambient illuminance value based on the difference between the two signals and uses it to correct the planning curve.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the energy-saving control method for the portable lamp according to any one of claims 1 to 7.