A dam monitoring LoRa terminal adaptive sleep method and system based on multi-dimensional environment feature perception and hardware cooperation
By employing a multi-dimensional environmental feature perception and hardware-coordinated adaptive sleep method for LoRa terminals used in dam monitoring, the contradiction between long battery life and high responsiveness of dam monitoring terminals is resolved. This method achieves improved battery life and real-time safety monitoring, making it suitable for water conservancy engineering safety monitoring scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing LoRa terminals for dam monitoring face a contradiction between the need for high real-time emergency response and the need for long battery life with limited battery capacity. They suffer from rigid wake-up mechanisms, insufficient channel status awareness, neglect of sensor leakage, simplistic sleep strategies, and a lack of fallback mechanisms for abnormal faults, resulting in wasted power and security monitoring vulnerabilities.
An adaptive sleep method for LoRa terminals used in dam monitoring is adopted, which is based on multi-dimensional environmental feature perception and hardware collaboration. This method achieves adaptive sleep by using RTC alarm wake-up, multi-dimensional parameter acquisition, weighted sleep duration calculation, LoRa CAD channel listening and data transmission decision, combined with power protection, channel quality and high temperature leakage compensation.
It improved battery life by 114%, enabled encrypted data collection during sudden changes in water levels in the flood season, adapted to complex environments, reduced operation and maintenance costs, and improved the reliability and responsiveness of monitoring.
Smart Images

Figure CN122179874A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of Internet of Things wireless communication, industrial-grade low-power circuit design, and water conservancy project safety monitoring technology, and in particular to a method and system for adaptive sleep mode of LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration. Background Technology
[0002] In field safety monitoring scenarios for water conservancy projects such as dams, reservoirs, and tailings ponds, monitoring terminals are often deployed in environments without mains power, such as canyons and deep mountains, relying entirely on battery power. The low power consumption of these devices directly determines the operation and maintenance costs and the system's lifespan. Furthermore, water conservancy project monitoring exhibits significant differences in operating conditions: during the dry season, water level changes are gradual, requiring no high-frequency data acquisition; during the flood season, water level fluctuations are dramatic, necessitating more frequent data acquisition to capture critical data such as abnormal seepage and dam failure risks.
[0003] Existing low-power designs for LoRa terminals used in dam monitoring generally suffer from a core contradiction between the need for "high real-time emergency response" and the need for "long battery life with limited capacity." Specific shortcomings are as follows: 1. The wake-up mechanism is rigid and cannot adapt to dynamic changes in operating conditions. Existing equipment generally adopts a fixed-cycle wake-up mode, with a typical solution being to collect and report data once every hour. During the dry season when the water level is stable, this fixed frequency results in meaningless waste of electricity; while during the flood season when the water level changes abruptly or the dam seepage is abnormal, long-cycle monitoring cannot capture key risk data in a timely manner, resulting in serious safety monitoring loopholes.
[0004] 2. Lack of channel status awareness and indiscriminate transmission leading to battery drain. Dams are often located in canyon areas with severe terrain obstruction, where wireless channels are significantly affected by mountain blockage, multipath effects, and co-channel interference. Existing LoRa terminals follow the standard LoRaWANADR mechanism, which attempts to deliver data only by reducing the communication rate, increasing the spreading factor, and repeating retransmissions when the signal-to-noise ratio (SNR) is extremely poor. This strategy can cause devices to deplete their battery power in a short period of time due to continuous invalid high-power transmissions in harsh channel environments, resulting in the monitoring terminal going offline.
[0005] 3. Ignoring sensor static leakage current and high-temperature leakage current reveals hidden power consumption vulnerabilities. Existing low-power designs only focus on optimizing the sleep power consumption of the MCU and LoRa RF chip, neglecting the static leakage current of external RS485 submersible level gauges and other sensors during non-operation periods. Simultaneously, in outdoor high-temperature environments (>60℃), the leakage current of conventional P-channel MOSFET power switching circuits increases exponentially, and the GPIO pins are in a high-impedance state when the MCU is in deep sleep, making them susceptible to electromagnetic interference and causing the MOSFETs to enter a semi-conducting state. This results in system standby power consumption far exceeding the nominal value, significantly shortening battery life.
[0006] 4. Lack of multi-dimensional environmental collaborative perception capabilities and a single sleep strategy. Existing solutions can only achieve simple timed sleep, and cannot dynamically adjust the sleep strategy based on multi-dimensional characteristics such as remaining battery power, ambient temperature, water level change trends, and wireless channel quality. Therefore, they cannot achieve ultimate low-power optimization while ensuring monitoring reliability.
[0007] 5. Lack of a robust fallback mechanism for abnormal failures, leading to unnecessary power consumption under extreme operating conditions. Existing solutions lack corresponding low-power fallback strategies for abnormal scenarios such as sensor acquisition failure, low battery voltage, and continuous communication failures. This can easily result in the device repeatedly attempting to acquire and transmit data, causing the battery to deplete rapidly. Summary of the Invention
[0008] Technical Objective: To address the shortcomings of existing technologies, this invention discloses an adaptive sleep method and system for LoRa terminals used for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration. This method resolves the core contradiction between "long battery life" and "high responsiveness" in existing dam monitoring terminals, improving battery life by 114%. It also enables encrypted data collection of sudden water level changes during the flood season and is suitable for safety monitoring scenarios of unattended water conservancy projects such as dams, reservoirs, and tailings ponds in the field.
[0009] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution.
[0010] An adaptive sleep method for LoRa terminals used in dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration includes the following steps: S1: Wake-up and parameter acquisition; The microcontroller wakes up from the Stop2 deep sleep mode via the RTC alarm, turns on the controllable power switch to power on and preheat the external monitoring sensor, and acquires multi-dimensional parameters; The multi-dimensional parameters include the current monitored water level, ambient temperature, battery voltage, and LoRa communication signal-to-noise ratio. After the acquisition is completed, the controllable power switch is turned off to cut off the power supply to the sensor. S2: Multidimensional weighted adaptive sleep duration calculation; Based on the collected multidimensional parameters, the power protection coefficient, high temperature leakage compensation coefficient, water level fluctuation rate and channel quality factor are used for weighted calculation to obtain and dynamically update the next sleep duration; S3: LoRa CAD Channel Listening and Data Transmission Decision; The LoRa module's CAD channel activity detection function is activated to listen to the wireless channel status. If the channel is idle, monitoring data is transmitted and the gateway ACK response is waited for. If an ACK is received, the sleep process is entered; if no ACK is received or the channel is busy, the failure counting process is entered; The failure counting process is as follows: failure count N←N+1. If N≥ the preset maximum number of retries, the current data transmission is abandoned and the updated sleep time is extended. If N< the preset maximum number of retries, random backoff is performed and the channel is listened to again. S4: Deep sleep configuration and execution; disable microcontroller peripherals and LoRa module, configure microcontroller pins to low power state, configure RTC alarm based on the final determined sleep duration, and microcontroller enters deep sleep mode.
[0011] Preferably, the formula for calculating the hibernation duration includes: , in, For the final determined hibernation duration, Based on the baseline sleep duration, The charge protection coefficient is based on nonlinear discharge characteristics. This is a high-temperature leakage current compensation coefficient based on the physical properties of semiconductors. To introduce time-series smoothing of water level fluctuation, F(SNR) is a channel quality factor based on hyperbolic tangent mapping, and α and β are preset multidimensional feature coupling weight coefficients.
[0012] Compared to conventional linear weighting, this formula introduces the Euclidean norm of multidimensional risk factors. And combined with the natural exponential decay function The mapping is performed. This nonlinear coupling model not only effectively avoids the mathematical singularity problem caused by division by zero or invalid negative values due to extreme environmental changes in traditional linear formulas, but also enables the terminal to maintain sleep stability when faced with slight changes in a single dimension, while achieving exponential dynamic convergence of sleep duration when multiple dimensions deteriorate simultaneously (such as during the flood season and encountering a bad channel), thus taking into account the stringent requirements of long battery life and high responsiveness.
[0013] Preferably, water level fluctuation rate The calculation formulas include: , in, This is the current water level. The water level at the last sampling point. This is the sensitivity coefficient.
[0014] This invention introduces the Sigmoid activation mapping concept into the calculation of water level difference. When the water level experiences minor disturbances such as waves, the formula output is extremely smooth, effectively filtering out high-frequency environmental noise; while when the water level difference exceeds the critical point, the coefficient rises rapidly, ensuring that the system can detect sudden changes in water level immediately and shorten the sleep cycle, thus balancing the monitoring's anti-interference capability and real-time performance.
[0015] Preferably, the power protection factor The power protection coefficient increases as the remaining battery power decreases. When the remaining battery power falls below a preset low-voltage threshold, the power protection coefficient increases sharply, forcibly extending the sleep time; the high-temperature leakage compensation coefficient... The high temperature leakage current compensation coefficient increases with the increase of ambient temperature. When the ambient temperature is higher than the preset high temperature threshold, the high temperature leakage current compensation coefficient is greater than 1, which extends the sleep time to compensate for the additional power loss caused by the high temperature leakage current of the MOSFET.
[0016] Preferably, the power protection factor The calculation formulas include: , Where E represents the current remaining battery capacity based on the battery voltage. This represents the battery's maximum full charge capacity. This represents the minimum operating power threshold for the battery. The preset maximum power compensation margin is preferably 0.5. The constant for fitting the discharge curve is preferably in the range of 3.0-5.0.
[0017] Traditional linear charge compensation cannot accurately reflect the physical characteristics of outdoor battery discharge. Based on the voltage avalanche effect at the end of battery discharge, an exponential charge protection curve with a fitting constant τ is constructed. When the battery is fully charged, this coefficient gradually approaches 1.0; while when the charge approaches the minimum operating threshold... At this time, the penalty increases exponentially, forcibly lengthening the sleep cycle, thereby achieving maximum hardware self-protection under extremely low power conditions and significantly extending the system's extreme survival time.
[0018] Preferably, the high-temperature leakage compensation coefficient The calculation formulas include: , Where T is the current ambient temperature collected by the on-chip temperature sensor. σ is the reference threshold temperature at which the leakage current begins to increase significantly (preferably 35°C), σ is the exponential growth constant of the leakage current related to the physical characteristics of the hardware MOSFET (preferably 0.15), and max() is the maximum value function.
[0019] Addressing the challenges of high-temperature, sun-exposed conditions in the summer environment of dam construction, this invention overcomes the blind spot of traditional low-power algorithms that ignore high-temperature hardware leakage current. Since the leakage current of the P-channel MOSFET gated circuit exhibits an exponential growth law at high temperatures, an asymmetric exponential compensation architecture is introduced. When the temperature is below... When the temperature is above 0, the max() function outputs 0, the compensation coefficient is locked at 1, and no additional algorithm overhead is incurred; when the temperature is above 1... At this time, the coefficient is amplified exponentially, neutralizing the additional static leakage power consumption caused by the thermal excitation of the semiconductor lattice, and realizing deep collaboration between software and hardware.
[0020] Preferably, the formula for calculating the channel quality factor F (SNR) includes: , Wherein, SNR is the measured signal-to-noise ratio of the current LoRa link; The threshold value for channel quality evaluation is preferably -10dB. As a smoothing adjustment factor; This is the channel dynamic gain adjustment coefficient. The formula uses the Softplus mapping nonlinear channel evaluation model. When the SNR is higher than the threshold, i.e., the channel is good, its output value will quickly approach 0, without causing additional extension to the sleep state, thus ensuring the real-time performance of data transmission. However, when the SNR is lower than the threshold, i.e., the channel deteriorates, the function value increases nonlinearly.
[0021] Preferably, the random backoff duration is a random value of 10-50ms, during which the microcontroller enters a low-power sleep mode; the preset maximum number of retries is 3, and when abandoning this data transmission, the sleep duration calculated by S2 is extended to 1.5 times.
[0022] Preferably, the method further includes: S5: Abnormal Fault Diagnosis; If the sensor fails to acquire data continuously in S1, the battery voltage is lower than the preset cutoff voltage, or the transmission fails continuously in S3 and the cumulative number of failures exceeds the preset limit, then record the fault type, disconnect the sensor power supply, configure the RTC ultra-long sleep alarm, and enter deep sleep mode.
[0023] The present invention also discloses a dam monitoring LoRa terminal system based on multi-dimensional environmental feature perception and hardware collaboration, including a main control unit, a LoRa communication unit, an anti-interference power gating unit, a sensor interface, and a power supply unit; The main control unit includes a low-power microcontroller, which is used to implement the adaptive sleep method of LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described above, and to control the timing, signal acquisition, algorithm calculation and sleep management of the entire system; the low-power microcontroller has a built-in RTC real-time clock, ADC analog-to-digital conversion module, on-chip temperature sensor and multiple sets of communication peripherals, and supports Stop2 deep sleep mode. The LoRa communication unit includes a radio frequency transceiver chip with channel activity detection function, which is connected to the main control unit through an SPI communication bus and is used for wireless channel listening, data transmission and reception and channel quality detection. The anti-interference power gating unit is connected in series between the power supply unit and the sensor interface, and includes a P-channel MOSFET, a gate-source pull-up resistor, and a gate-series isolation resistor; the source of the P-channel MOSFET is connected to the power supply unit, the drain is connected to the power supply pin of the sensor interface, and the gate is connected to the GPIO output pin of the main control unit through the isolation resistor; the gate-source pull-up resistor is connected in parallel between the source and the gate of the P-channel MOSFET.
[0024] Furthermore, the system also includes: a non-volatile memory, a communication interface, and a status indicator unit; the non-volatile memory is connected to the main control unit via an I2C interface and is used to store system configuration parameters and historical data; the communication interface includes RS485, CAN, or Ethernet interfaces for data interaction with the host computer; the status indicator unit includes LED indicators and a display screen for displaying the system's operating status and monitoring data.
[0025] This invention also discloses a water conservancy project safety monitoring system, including at least one of the above-described LoRa terminal systems for implementing the adaptive sleep method, a gateway communicating with the LoRa terminal system via a LoRa wireless network, and a host computer monitoring platform connected to the gateway; the host computer monitoring platform is configured to: generate a water level change trend in the basin based on water level monitoring data collected from multiple LoRa terminal systems within the basin, and, based on the trend, issue remote collaborative configuration instructions to specific LoRa terminal systems via the gateway to update the baseline sleep duration and weight coefficients.
[0026] Beneficial effects: 1. The hibernation strategy achieves adaptive operation, completely resolving the core contradiction between "long battery life" and "high responsiveness". This invention adopts a multi-dimensional weighted adaptive hibernation algorithm, which dynamically adjusts the hibernation duration based on four core characteristics: water level fluctuation rate, channel quality, battery power, and ambient temperature. During the dry season, when the water level is stable, the hibernation duration is extended to reduce power consumption; during the flood season, when the water level changes abruptly, the hibernation duration is shortened to encrypt data collection; and under adverse channel conditions, active avoidance is used to extend the hibernation duration to prevent power avalanche, thus achieving intelligent monitoring that prioritizes safety and adapts to power consumption. 2. Significantly improved battery life, reducing field maintenance costs. This invention greatly reduces the frequency and cost of battery replacement in the field, making it particularly suitable for long-term unattended water conservancy project monitoring scenarios; 3. Excellent engineering practicality and anti-interference capability. This invention integrates hardware-level anti-interference design, online parameter adjustment, fault diagnosis and abnormal protection functions. It can adapt to complex electromagnetic environments such as canyons and deep mountains, as well as high temperature and high humidity field conditions. The identification process logic is rigorous, the fault tolerance is strong, and it has extremely high engineering practical value. 4. Possesses basin-level collaborative monitoring capabilities, demonstrating outstanding system-level innovation. This invention upgrades from single-terminal low-power optimization to basin-level intelligent collaborative monitoring through multi-terminal data aggregation, basin water level trend generation, and remote collaborative parameter configuration. It can dynamically adjust the monitoring strategies of terminals in specific areas based on the water level change trends across the entire basin, further enhancing the overall integrity and reliability of water conservancy project safety monitoring. Attached Figure Description
[0027] Figure 1 This is a hardware architecture diagram of the LoRa terminal system according to an embodiment of the present invention; Figure 2 This is a flowchart of a method according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the parameter association of the multidimensional weighted algorithm in an embodiment of the present invention; Figure 4 This is a schematic diagram of the anti-interference power supply gating unit circuit according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the main control unit circuit according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the LoRa communication unit circuit according to an embodiment of the present invention; Figure 7 This is a bar chart comparing the power consumption of embodiments of the present invention; The components include: 1. Main control unit; 2. LoRa communication unit; 3. Anti-interference power gating unit; 4. Sensor interface; 5. Power supply unit; 6. Non-volatile memory; 7. Communication interface; and 8. Status indication unit. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0029] Example 1: This example describes an adaptive sleep method for a LoRa terminal used for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration, as shown in the attached diagram. Figure 2 As shown, it includes the following steps: S1: Wake-up and Parameter Acquisition. The microcontroller wakes up from the Stop2 deep sleep mode via an RTC alarm, turns on the controllable power switch to power on and preheat the external monitoring sensor, and acquires multi-dimensional parameters, including the current monitored water level, ambient temperature, battery voltage, and LoRa communication signal-to-noise ratio. After acquisition, the controllable power switch is turned off to cut off the power supply to the sensor.
[0030] S2: Multi-dimensional weighted adaptive sleep duration calculation. Based on the collected multi-dimensional parameters, the sleep duration is obtained and dynamically updated by weighting the calculation using the power protection coefficient, high-temperature leakage compensation coefficient, water level fluctuation rate, and channel quality factor. The calculation formula for the sleep duration is as follows: The formula for calculating hibernation duration includes: , in, For the final determined hibernation duration, Based on the baseline sleep duration, The charge protection coefficient is based on nonlinear discharge characteristics. This is a high-temperature leakage current compensation coefficient based on the physical properties of semiconductors. To introduce time-series smoothing of water level fluctuation, F(SNR) is a channel quality factor based on hyperbolic tangent mapping, and α and β are preset multidimensional feature coupling weight coefficients.
[0031] Power protection factor The power protection coefficient increases as the remaining battery power decreases. When the remaining battery power falls below a preset low-voltage threshold, the power protection coefficient increases sharply, forcibly extending the sleep time; the high-temperature leakage compensation coefficient... The high temperature leakage current compensation coefficient increases with the increase of ambient temperature. When the ambient temperature is higher than the preset high temperature threshold, the high temperature leakage current compensation coefficient is greater than 1, which extends the sleep time to compensate for the additional power loss caused by the high temperature leakage current of the MOSFET.
[0032] Power protection factor The calculation formulas include: , Where E represents the current remaining battery capacity based on the battery voltage. This represents the battery's maximum full charge capacity. This represents the minimum operating power threshold for the battery. The preset maximum power compensation margin is preferably 0.5. The constant for fitting the discharge curve is preferably in the range of 3.0-5.0.
[0033] High temperature leakage compensation coefficient The calculation formulas include: , Where T is the current ambient temperature collected by the on-chip temperature sensor. σ is the reference threshold temperature at which the leakage current begins to increase significantly (preferably 35°C), σ is the exponential growth constant of the leakage current related to the physical characteristics of the hardware MOSFET (preferably 0.15), and max() is the maximum value function.
[0034] The formula for calculating the channel quality factor F (SNR) includes: , Wherein, SNR is the measured signal-to-noise ratio of the current LoRa link; The threshold value for channel quality evaluation is preferably -10dB. As a smoothing adjustment factor; This is the channel dynamic gain adjustment coefficient.
[0035] Water level fluctuation The calculation formulas include: , in, This is the current water level. The water level at the last sampling point. This is the sensitivity coefficient.
[0036] Compared to conventional linear weighting, this formula introduces the Euclidean norm of multidimensional risk factors. And combined with the natural exponential decay function The mapping is performed. This nonlinear coupling model not only effectively avoids the mathematical singularity problem caused by division by zero or invalid negative values due to extreme environmental changes in traditional linear formulas, but also enables the terminal to maintain sleep stability when faced with slight changes in a single dimension, while achieving exponential dynamic convergence of sleep duration when multiple dimensions deteriorate simultaneously (such as during the flood season and encountering a bad channel), thus taking into account the stringent requirements of long battery life and high responsiveness.
[0037] In this invention, the larger the water level fluctuation rate, the shorter the calculated dormancy time, thus enabling encrypted data collection during sudden changes in water level during the flood season.
[0038] As attached Figure 3 As shown, the sleep duration sampling multidimensional weighted adaptive method is used to calculate the final compensation curve under the conditions of water level fluctuation rate |ΔL|, channel quality factor and temperature compensation.
[0039] S3: LoRa CAD Channel Listening and Data Transmission Decision. The LoRa module's CAD channel activity detection function is activated to listen to the wireless channel status. If the channel is idle, monitoring data is transmitted and the system waits for an ACK response from the gateway. Upon receiving an ACK, the system enters a sleep state. If no ACK is received or the channel is busy, the system enters a failure counting process. The failure counting process is as follows: failure count N ← N+1. If N ≥ the preset maximum number of retries, the current data transmission is abandoned and the updated sleep duration is extended. If N < the preset maximum number of retries, random backoff is performed, and the channel is relistened.
[0040] The random backoff duration is a random value of 10-50ms. During the backoff period, the microcontroller enters a low-power sleep mode. In this embodiment, the maximum number of retries is preset to 3. When abandoning the data transmission, the sleep duration calculated by S2 is extended to 1.5 times.
[0041] S4: Deep Sleep Configuration and Execution. The microcontroller peripherals and LoRa module are disabled, the microcontroller pins are configured to low-power states, the RTC alarm is configured based on the final determined sleep duration, and the microcontroller enters deep sleep mode.
[0042] This embodiment also includes: S5: Abnormal Fault Diagnosis. If the sensor fails to acquire data continuously in step S1, the battery voltage is lower than the preset cutoff voltage, or if the transmission fails continuously in step S3 and the cumulative number of failures exceeds the preset upper limit, the fault type is recorded, the sensor power supply is disconnected, and the RTC ultra-long sleep alarm is configured to enter deep sleep mode to avoid unnecessary power consumption.
[0043] This invention completely solves the core contradiction between "long battery life" and "high responsiveness" in existing dam monitoring terminals, improving battery life by 114% and enabling encrypted data collection during sudden changes in water level in the flood season. It is suitable for safety monitoring scenarios of unattended water conservancy projects in the field, such as dams, reservoirs, and tailings ponds.
[0044] As attached Figure 1 As shown, this invention provides a LoRa terminal system for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration, including a main control unit 1, a LoRa communication unit 2, an anti-interference power gating unit 3, a sensor interface 4, a power supply unit 5, a non-volatile memory 6, a communication interface 7, and a status indication unit 8. The dam monitoring LoRa terminal system uses an ultra-low power MCU as its core, combined with an anti-interference power gating circuit and a LoRa communication circuit, to achieve end-to-end low-power optimization.
[0045] The main control unit adopts a low-power microcontroller to execute the above-mentioned adaptive sleep method and control the timing, signal acquisition, algorithm calculation and sleep management of the entire system. The low-power microcontroller has a built-in RTC real-time clock, ADC analog-to-digital conversion module, on-chip temperature sensor and multiple communication peripherals, supports Stop2 deep sleep mode, and the typical sleep current is less than 1μA.
[0046] The LoRa communication unit uses a radio frequency transceiver chip with channel activity detection (CAD) function, and is connected to the main control unit through an SPI communication bus for wireless channel listening, data transmission and reception, and channel quality detection. The radio frequency transceiver chip supports LoRa modulation, operates in the frequency band of 470-510MHz, and has an adjustable transmit power range of -9dBm to +22dBm.
[0047] The anti-interference power gating unit is connected in series between the power supply unit and the sensor interface. It is a core hardware innovation of the system and includes a P-channel MOSFET, a gate-source pull-up resistor, and a gate-series isolation resistor. The source of the P-channel MOSFET is connected to the power supply unit, the drain is connected to the power supply pin of the sensor interface, and the gate is connected to the GPIO output pin of the main control unit through the isolation resistor. The gate-source pull-up resistor is connected in parallel between the source and the gate of the P-channel MOSFET. When the GPIO pin of the microcontroller is in deep sleep and floating, it forces the gate voltage to be pulled to the same potential as the source, so that the MOSFET can be reliably turned off and completely avoids the semi-conducting leakage problem caused by electromagnetic interference.
[0048] As attached Figure 4 -Appendix Figure 6 As shown, the low-power microcontroller uses an STM32L4 series chip, the RF transceiver chip uses an SX1268 chip, the gate-source pull-up resistor has a resistance of 100kΩ, the gate series isolation resistor has a resistance of 1kΩ, and the P-channel MOSFET uses a Si2301 model.
[0049] The non-volatile memory is connected to the main control unit via an I2C interface and is used to store system configuration parameters and historical data. The communication interface includes RS485, CAN, or Ethernet interfaces for data interaction with the host computer. The status indicator unit includes LED indicators and a display screen for displaying system operating status and monitoring data.
[0050] This embodiment also discloses a water conservancy project safety monitoring system, including at least one of the above-mentioned LoRa terminal systems for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration, a gateway communicating with the LoRa terminal systems for dam monitoring via a LoRa wireless network, and a host computer monitoring platform connected to the gateway; the host computer monitoring platform is configured to: generate a water level change trend in the basin based on the water level monitoring data collected by multiple LoRa terminal systems in the basin, and, based on the trend, issue a remote collaborative configuration command through the gateway to a specific LoRa terminal system for updating the baseline sleep duration and weight coefficient.
[0051] Example 2: As shown in the attached document Figure 2 To be continued Figure 7 As shown, this embodiment provides a hardware implementation scheme for a dam monitoring LoRa terminal system. The system uses an ultra-low power MCU as the core, combined with an anti-interference power gating circuit and a LoRa communication circuit, to achieve end-to-end low power optimization.
[0052] The main control unit uses an STM32L431RCT6 microcontroller, based on an ARM Cortex-M4 core, with a main frequency of 80MHz, and built-in 256KB Flash and 64KB SRAM. The microcontroller supports Stop2 deep sleep mode, with a typical sleep current of 0.7μA and a wake-up time of 5μs.
[0053] The LoRa communication unit uses the SX1268 RF transceiver chip, supports LoRa modulation, operates in the 470-510MHz frequency band, has an adjustable transmit power range of -9dBm to +22dBm, and a receive sensitivity of -148dBm@SF12. The chip incorporates a built-in CAD channel activity detection function, enabling rapid monitoring of the channel status before receiving data.
[0054] The anti-interference power gating unit includes a P-channel MOSFET (Si2301), a gate-source pull-up resistor (100kΩ), and a gate-series isolation resistor (1kΩ). The source of the P-channel MOSFET is connected to the power supply unit, the drain is connected to the power supply pin of the sensor interface, and the gate is connected to the GPIO output pin of the main control unit through the isolation resistor. The gate-source pull-up resistor is connected in parallel between the source and gate of the P-channel MOSFET. When the GPIO pin is floating in deep sleep mode of the microcontroller, it forces the gate voltage to be pulled to the same potential as the source, so that the MOSFET can be reliably turned off.
[0055] This embodiment presents an adaptive sleep method for a LoRa terminal used in dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration. Developed and implemented using the STM32 HAL library, the specific steps are as follows: Step S201: The RTC alarm triggers wake-up, the microcontroller resumes from Stop2 deep sleep mode, and performs system initialization, including clock configuration, peripheral initialization, and variable initialization. Variable initialization includes clearing the buffer, setting the count N to 0, and the number of acquisition retries C to 0. Step S202: Turn on the controllable power switch, i.e., the P-channel MOSFET, to power on and preheat the external monitoring sensor, and wait for the sensor to stabilize (typical value 500ms).
[0056] Step S203: Collect the current monitored water level H, ambient temperature T, battery voltage E, and LoRa communication signal-to-noise ratio (SNR) multi-dimensional parameters. After collection, disconnect the controllable power switch to cut off the sensor power supply. If parameter collection fails, the number of retries C = C + 1; determine if the number of retries C ≥ 2; if yes, disconnect the controllable power switch, power off the sensor, and proceed to step S209; if no, return to step S202. Step S204: Based on the collected multidimensional parameters, execute the multidimensional weighted adaptive sleep duration calculation algorithm to obtain and dynamically update the next sleep duration T_sleep.
[0057] Step S205: Activate the CAD channel activity detection function of the LoRa module to listen to the wireless channel status.
[0058] Step S206: Determine if the channel is idle. If it is idle, send monitoring data and wait for the gateway ACK response, and lock the final sleep duration. If it is busy, enter the failure counting process.
[0059] Step S207: If an ACK is received, enter the sleep process, i.e., proceed to step S209; if no ACK is received, the failure count N = N + 1, and determine whether N is ≥ the preset maximum number of retries (3 times).
[0060] Step S208: If N≥3, abandon this data transmission and extend the sleep time to 1.5 times; if N<3, perform random backoff (10-50ms) and then relisten to the channel.
[0061] Step S209: Turn off the microcontroller peripherals and LoRa module, configure the microcontroller pins to low power state, configure the RTC alarm based on the final determined sleep duration, and the microcontroller enters the Stop2 deep sleep mode.
[0062] This embodiment provides an optimal configuration scheme for the core parameters of the system. All parameters can be modified online via the RS485 interface through the host computer and saved to the non-volatile memory 6, adapting to different monitoring scenarios and sensor models.
[0063] This invention eliminates the hidden power consumption caused by sensor static leakage and MOSFET mis-conduction at the physical level through a hardware-level anti-interference power gating circuit; and achieves dynamic adaptation of sleep time to water level conditions, channel environment, battery status, and ambient temperature through a three-dimensional weighted adaptive sleep algorithm, completely solving the core contradiction between "long battery life" and "high responsiveness" in existing technologies. It is suitable for safety monitoring scenarios of unattended water conservancy projects in the field, such as dams, reservoirs, and tailings ponds.
[0064] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for adaptive sleep mode of a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration, characterized in that, Includes the following steps: S1: Wake-up and parameter acquisition; The microcontroller wakes up from the Stop2 deep sleep mode via the RTC alarm, turns on the controllable power switch to power on and preheat the external monitoring sensor, and acquires multi-dimensional parameters; The multi-dimensional parameters include the current monitored water level, ambient temperature, battery voltage, and LoRa communication signal-to-noise ratio. After the acquisition is completed, the controllable power switch is turned off to cut off the power supply to the sensor. S2: Multidimensional weighted adaptive sleep duration calculation; Based on the collected multidimensional parameters, the power protection coefficient, high temperature leakage compensation coefficient, water level fluctuation rate and channel quality factor are used for weighted calculation to obtain and dynamically update the next sleep duration; S3: LoRa CAD channel listening and data transmission decision; The LoRa module's CAD channel activity detection function is activated to listen to the wireless channel status. If the channel is idle, monitoring data is sent and the gateway ACK response is waited for. If an ACK is received, the sleep process is entered. If no ACK is received or the channel is busy, the failure counting process is entered. The failure counting process is as follows: failure count N←N+1. If N≥ the preset maximum number of retries, the current data transmission is abandoned and the updated sleep time is extended. If N< the preset maximum number of retries, random backoff is performed and the channel is listened to again. S4: Deep sleep configuration and execution; disable microcontroller peripherals and LoRa module, configure microcontroller pins to low power state, configure RTC alarm based on the final determined sleep duration, and microcontroller enters deep sleep mode.
2. The adaptive sleep method for a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 1, characterized in that: The formula for calculating hibernation duration includes: , in, For the final determined hibernation duration, Based on the baseline sleep duration, The charge protection coefficient is based on nonlinear discharge characteristics. This is a high-temperature leakage current compensation coefficient based on the physical properties of semiconductors. To introduce time-series smoothing of water level fluctuation, F(SNR) is a channel quality factor based on hyperbolic tangent mapping, and α and β are preset multidimensional feature coupling weight coefficients.
3. The adaptive sleep method for a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 2, characterized in that: Water level fluctuation The calculation formulas include: , in, This is the current water level. The water level at the last sampling point. This is the sensitivity coefficient.
4. The adaptive sleep method for a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 2, characterized in that: Power protection factor The calculation formulas include: , Where E represents the current remaining battery capacity based on the battery voltage. This represents the battery's maximum full charge capacity. This represents the minimum operating power threshold for the battery. This is the preset maximum power compensation margin. These are the constants for fitting the discharge curve; High temperature leakage compensation coefficient The calculation formulas include: , Where T is the current ambient temperature collected by the on-chip temperature sensor. σ is the reference threshold temperature at which leakage current begins to increase significantly, σ is the exponential growth constant of leakage current related to the physical characteristics of the hardware MOSFET, and max() is the function to take the maximum value.
5. The adaptive sleep method for a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 2, characterized in that: The formula for calculating the channel quality factor F (SNR) includes: , Wherein, SNR is the measured signal-to-noise ratio of the current LoRa link; This serves as the baseline threshold for channel quality evaluation. As a smoothing adjustment factor; This is the channel dynamic gain adjustment coefficient.
6. The adaptive sleep method for a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 1, characterized in that: The random backoff duration is a random value of 10-50ms, during which the microcontroller enters a low-power sleep mode; The maximum number of retries is preset to 3. If the data transmission is abandoned, the sleep duration calculated by S2 will be extended to 1.5 times.
7. The adaptive sleep method for a LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 1, characterized in that: The method also includes: S5: Abnormal Fault Diagnosis; If the sensor fails to acquire data continuously in S1, the battery voltage is lower than the preset cutoff voltage, or the transmission fails continuously in S3 and the cumulative number of failures exceeds the preset limit, then record the fault type, disconnect the sensor power supply, configure the RTC ultra-long sleep alarm, and enter deep sleep mode.
8. A LoRa terminal system for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration, characterized in that: Includes a main control unit, a LoRa communication unit, an anti-interference power gating unit, a sensor interface, and a power supply unit; The main control unit includes a low-power microcontroller, which is used to implement the adaptive sleep method of LoRa terminal for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in any one of claims 1-7, and to control the timing, signal acquisition, algorithm calculation and sleep management of the entire system; the low-power microcontroller has a built-in RTC real-time clock, ADC analog-to-digital conversion module, on-chip temperature sensor and multiple sets of communication peripherals, and supports Stop2 deep sleep mode. The LoRa communication unit includes a radio frequency transceiver chip with channel activity detection function, which is connected to the main control unit through an SPI communication bus and is used for wireless channel listening, data transmission and reception and channel quality detection. The anti-interference power gating unit is connected in series between the power supply unit and the sensor interface, and includes a P-channel MOSFET, a gate-source pull-up resistor, and a gate-series isolation resistor; the source of the P-channel MOSFET is connected to the power supply unit, the drain is connected to the power supply pin of the sensor interface, and the gate is connected to the GPIO output pin of the main control unit through the isolation resistor; the gate-source pull-up resistor is connected in parallel between the source and the gate of the P-channel MOSFET.
9. A LoRa terminal system for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in claim 8, characterized in that: The system also includes: a non-volatile memory, a communication interface, and a status indicator unit; the non-volatile memory is connected to the main control unit via an I2C interface and is used to store system configuration parameters and historical data; the communication interface includes RS485, CAN, or Ethernet interfaces for data interaction with the host computer; the status indicator unit includes LED indicators and a display screen for displaying system operating status and monitoring data.
10. A safety monitoring system for water conservancy projects, characterized in that: The system includes at least one LoRa terminal system for dam monitoring based on multi-dimensional environmental feature perception and hardware collaboration as described in any one of claims 8-9, a gateway communicating with the LoRa terminal system for dam monitoring via a LoRa wireless network, and a host computer monitoring platform connected to the gateway; the host computer monitoring platform is configured to: generate a water level change trend in the basin based on water level monitoring data collected from multiple LoRa terminal systems within the basin, and, based on the trend, issue a remote collaborative configuration command through the gateway to a specific LoRa terminal system for updating the baseline sleep duration and weight coefficient.