A highland barley field carbon-ammonia source-sink imbalance risk early warning system

By combining a wide-temperature-range wavelength-locked dual DFB laser array, an electrically controlled gradient refractive index liquid crystal lens, and an adaptive power supply module with a rough set-deep belief network hybrid early warning module, the detection accuracy and early warning lag issues of the highland barley field carbon-ammonia source-sink gas early warning system in highland environments have been solved, achieving high-precision, real-time gas concentration monitoring and early warning.

CN121933474BActive Publication Date: 2026-07-31CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (EAST CHINA)
Filing Date
2025-12-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The existing early warning system for carbon-ammonia source and sink gases in highland barley fields has insufficient detection accuracy, poor environmental adaptability, and strong early warning lag in high-altitude environments. It cannot identify the imbalance critical point under the coupling effect of multiple factors in real time, and lacks adaptive adjustment capability, resulting in false alarms or missed alarms.

Method used

It employs a wide-temperature-range wavelength-locked dual DFB laser array, an electrically controlled gradient refractive index liquid crystal lens, an off-axis integrating cavity, and an adaptive power supply module, combined with a rough set-deep belief network hybrid early warning module, to achieve high-precision optical detection and intelligent early warning.

Benefits of technology

It has achieved high-precision monitoring of carbon-ammonia source and sink gas concentrations and second-level ecological risk early warning, improving the stability and response speed of the early warning system, adapting to extreme environmental changes on the plateau, and reducing false alarms and missed alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121933474B_ABST
    Figure CN121933474B_ABST
Patent Text Reader

Abstract

This invention discloses a risk early warning system for carbon-ammonia source-sink imbalance in highland barley fields, belonging to the field of intelligent gas early warning. The optical system module includes a wide-temperature-range wavelength-locked dual DFB laser array, first and second electrically controlled gradient refractive index liquid crystal lenses, an off-axis integrating cavity, a converging lens, and a detector for optical detection of CO2, CH4, and NH3 in highland barley fields. An adaptive power supply module, designed for the extreme low-pressure and low-temperature environment of the Qinghai-Tibet Plateau, employs a magnetic flux-temperature dual feedback and time-division multiplexing mechanism to provide a stable power supply to the system. A temperature control module provides high-precision temperature stability control for the lasers based on a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm. A main control module generates laser drive signals and utilizes a rough set-deep belief network hybrid early warning module to provide early warning of imbalance risks in highland barley fields. This invention solves the problems of poor system stability, low detection accuracy, and slow early warning response in extreme plateau environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent gas early warning technology, specifically relating to an early warning system for the risk of carbon-ammonia source-sink imbalance in highland barley fields. Background Technology

[0002] Barley is a staple food of the Qinghai-Tibet Plateau, supporting the dietary needs of over 60% of the plateau's population. Its cultivation area accounts for more than 50% of the total crop cultivation area in Tibet, and its growth status is directly related to the well-being of the people and agricultural stability on the plateau. Barley growth depends on the dynamic balance of soil carbon and ammonia sources and sinks. CO2, as the core carbon source for photosynthesis, directly determines the carbon supply efficiency of barley. CH4 participates in the soil carbon cycle; abnormal concentrations can alter soil aeration and the root microenvironment. NH3 is the main form of nitrogen volatilization in the soil; concentration imbalances can lead to nitrogen loss or insufficient nitrogen nutrition in barley.

[0003] The low temperatures and strong wind fluctuations on the Qinghai-Tibet Plateau pose significant challenges to the accuracy of gas early warning systems. Drastic temperature fluctuations can lead to performance degradation of optical sensing elements, causing laser wavelength drift and deviating from the characteristic absorption lines of gases. Changes in wind speed alter the diffusion rate of gases in the field, resulting in concentration monitoring values ​​deviating from the true levels. All these factors reduce the reliability of early warning signals and increase the difficulty of identifying carbon-ammonia source-sink imbalances.

[0004] Currently, early warning systems for carbon-ammonia source and sink gases in barley fields mainly rely on three technical approaches. The first is post-hoc early warning based on chemical analysis, which requires manual sampling and laboratory analysis to obtain gas data. This approach has a long operational cycle, cannot achieve real-time dynamic early warning, and struggles to capture the instantaneous changes in field gases. The second is model simulation early warning, which relies on preset parameters and empirical formulas to extrapolate gas concentrations. This approach is highly sensitive to parameters and has poor environmental adaptability, resulting in significant lag and uncertainty in early warning results. The third is infrared absorption spectroscopy early warning technology. Among these, non-dispersive infrared (NDIR) technology has a lower cost but higher detection limits, with CO2 warning thresholds exceeding 500 ppm and CH4 exceeding 10 ppm. It also has good resistance to environmental interference. The tunable diode laser absorption spectroscopy (TDLAS) has strong anti-interference capabilities, but its early warning sensitivity for NH3 and CH4 is insufficient. Furthermore, the laser wavelength is prone to drift in high-altitude environments with drastic temperature changes, requiring frequent calibration. Off-axis integrating cavity output spectroscopy (OA-ICOS), with its high-reflectivity cavity extending the optical path, can achieve a lower warning limit of 0.5 ppb for CH4 and less than 1 ppb for NH3. It also has strong resistance to temperature interference, is suitable for high-altitude environments, does not require frequent calibration, and can simultaneously capture subtle concentration changes of the three gases, providing a technical basis for early warning of carbon-ammonia sources and sinks in highland barley fields.

[0005] Despite OA-ICOS's high-precision data acquisition capabilities, the existing early warning system still has significant shortcomings: First, the early warning mechanism is simplistic, relying solely on gas concentration thresholds without integrating environmental parameters such as temperature and wind speed for comprehensive analysis, thus failing to identify the critical point of imbalance under the coupled effects of multiple factors. Second, the early warning system suffers from significant lag; traditional methods can only trigger alarms after gas concentrations exceed limits, unable to predict imbalance risks based on historical data trends. Third, it lacks adaptive adjustment capabilities; when the plateau environment dynamically changes, fixed early warning thresholds are prone to false alarms or missed alarms. These deficiencies make it difficult for existing technologies to issue risk signals in advance before gas concentrations cause substantial harm to highland barley, failing to meet the real-time control requirements of carbon-ammonia source-sink balance.

[0006] In summary, existing technologies suffer from insufficient detection accuracy, poor environmental adaptability, and lack of early warning capabilities. There is an urgent need to develop a system that integrates OA-ICOS high-precision detection with machine learning-based intelligent early warning to ensure the carbon-ammonia source-sink balance of highland barley and the sustainable development of plateau agriculture. Summary of the Invention

[0007] To address the aforementioned problems in existing technologies, this invention proposes a risk early warning system for carbon-ammonia source-sink imbalance in highland barley fields. The system is rationally designed, overcomes the shortcomings of existing technologies, and has good performance.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: A risk warning system for carbon-ammonia source-sink imbalance in highland barley fields includes an optical system module, an adaptive power supply module, a temperature control module, and a main control module; The optical system module includes a wide-temperature-range wavelength-locked dual DFB laser array, first and second electrically controlled gradient refractive index liquid crystal lenses, an off-axis integrating cavity, a converging lens, and a detector, used to achieve optical detection of CO2, CH4, and NH3 in highland barley fields; The adaptive power supply module is designed for the extreme low-pressure and low-temperature environment of the Qinghai-Tibet Plateau. It adopts a magnetic flux-temperature dual feedback and time-division multiplexing mechanism to provide a stable power supply for the system. The temperature control module provides high-precision temperature stability control for the laser based on a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm. The main control module is used to generate laser driving signals and to use a rough set-deep belief network hybrid early warning module to provide early warning of the risk of imbalance in barley fields.

[0009] Furthermore, the wide temperature range wavelength-locked dual DFB laser group includes a first and a second DFB laser. The first DFB laser is used to emit a laser with a wavelength of 1580nm, which is adapted to the characteristic absorption wavelength of CO2. The second DFB laser is used to emit a laser with a wavelength of 1653.7nm, which is adapted to the characteristic absorption wavelengths of CH4 and NH3. The first electrically controlled gradient refractive index liquid crystal lens corresponds to the CO2 laser channel, and the second electrically controlled gradient refractive index liquid crystal lens corresponds to the CH4 and NH3 laser channels. First, the diverging beams of their respective channels are collimated, and then the voltage is adjusted to change the refractive index to dynamically adjust the deflection angle of the two beams so that the two beams remain parallel. The two parallel laser beams are coupled into the off-axis integrating cavity. The off-axis integrating cavity employs a double-curvature graded cavity mirror, which is an aspherical reflector with different radii of curvature on two mutually perpendicular principal directions. The radii of curvature are continuously and gradually distributed along at least one principal direction of the mirror aperture, and the mirror reflectivity is ≥99.99%. The off-axis integrating cavity is connected to a gas sampling device, which sends air from the barley field to be measured into the cavity. Real-time temperature changes at high altitudes are sensed, causing the cavity to expand and contract along its length. The optical path deviation is compensated by adjusting the distance between the cavity mirrors. Two parallel laser beams are reflected and absorbed multiple times within the off-axis integrating cavity before being output as transmitted light. The converging lens corrects aberrations in the received transmitted light through an aspherical achromatic combination structure. The built-in light intensity adaptive adjustment unit senses the fluctuations in plateau illumination and dynamically adjusts the transmittance to stabilize the focused light intensity, focusing the optimized transmitted light onto the sensitive area of ​​the detector. The detector will focus the transmitted light and the reference optical path beam of the dual DFB laser group, use dual-channel differential detection to cancel environmental noise, and have a built-in signal amplification module to ensure stable signal amplification at high altitude and low temperature, and transmit the amplified electrical signal to the dual-frequency demodulation module. The dual-frequency demodulation module first amplifies and filters the electrical signal, then performs analog-to-digital conversion, and finally extracts the second harmonic signals corresponding to CO2, CH4, and NH3 through a digital lock-in amplifier. Furthermore, the operation of the adaptive power supply module includes the following steps: Step 1.1: Connect to a 160-260V wide-range fluctuating AC power supply for high-altitude areas. Convert it to pulsating DC through a rectifier bridge, and then dynamically adjust the filter parameters according to the grid harmonics through an adaptive filter network. Subsequently, connect to a power factor correction circuit. Monitor the input current waveform in real time through a current sampling resistor and dynamically adjust the conduction sequence of the switching devices to make the input current and voltage phase consistent, so that the output is a stable 380V high-voltage DC with a power factor maintained above 0.98. Step 1.2: Using 380V high voltage DC as input, energy is transferred through a multi-winding transformer; a magnetic flux-temperature dual feedback mechanism is introduced. The dual feedback signals include the magnetic flux of the magnetic core monitored in real time by the magnetic sensing element and the temperature of the magnetic core and switching devices synchronously collected by the temperature sensor. When the magnetic flux approaches the saturation threshold or the temperature exceeds the dynamically set safe range, the dual feedback signals trigger the primary-side switching devices to turn off. After the magnetic flux and temperature return to the safe range, they are restarted. Finally, the output contains the unregulated energy of the corresponding 12V and 15V windings and is sent to the next unit. Step 1.3: Dynamically adjust the conduction timing of the switching devices based on the magnetic flux recovery rate and the temperature change rate; when the magnetic flux recovery rate is detected to be lower than the first preset threshold and the temperature change rate is higher than the second preset threshold, divide the long conduction time into multiple pulses; when the magnetic flux recovery rate is higher than the first preset threshold and the temperature change rate is lower than the second preset threshold, adjust the duty cycle of the pulse width modulation signal to output stable 12V and 15V voltages. Step 1.4: Using 12V and 15V DC voltages as inputs, a general-purpose linear regulator is used for initial voltage reduction and regulation. This general-purpose linear regulator forms a soft-start circuit through an external capacitor, which slowly turns on the regulating transistor in the initial power-up stage, thereby controlling the output voltage to rise at a gentle slope and effectively suppressing inrush current. After the general-purpose linear regulator outputs an intermediate voltage, it is then connected to a low-dropout linear regulator. The low-dropout linear regulator uses an internal error amplifier to compare the output voltage sampled by the feedback resistor network with a high-precision bandgap reference voltage, dynamically adjusting the conduction state of the regulating transistor to achieve high-precision secondary voltage regulation, and finally outputting a stable 5V voltage.

[0010] Furthermore, in step 1.2, the primary winding of the multi-winding transformer is wound in sections and combined with an air gap design. The air gap design refers to artificially setting a tiny air gap in the magnetic core. The controller drives the primary main switch tube at a fixed switching frequency to convert the 380V high-voltage DC output from the front stage into the induced voltage of the secondary winding of the transformer. A flux detection winding is wound at a key location in the magnetic core's magnetic circuit. This key location represents the region with the highest magnetic field strength. The voltage generated by the flux detection winding through electromagnetic induction is proportional to the rate of change of the magnetic flux in the core. This voltage is converted into a DC voltage representing the magnetic flux in the core by a rectifier-integrator circuit. A temperature sensor is integrated simultaneously to collect the temperature of the core and switching devices in real time. When the DC voltage exceeds a preset saturation threshold or the temperature exceeds the safe range, the main switch is turned off in conjunction with dual feedback signals. Once the magnetic flux drops to the safe range and the temperature returns to normal, the main switch is turned back on. In step 1.3, the timing is dynamically adjusted based on the magnetic flux recovery rate and the temperature change rate to generate three non-overlapping timing control signals. The switching cycle is divided into an energy injection period, a magnetic flux balance period, and an energy distribution period. Dead time is set between each stage to avoid power transistor crossover conduction. During the energy injection period, the main switch and the 12V secondary synchronous rectifier are turned on in tandem, the transformer stores energy and releases it to the 12V secondary side, and outputs 12V voltage after filtering; During the flux balance period, when the residual magnetic energy of the magnetic core is detected, the trigger circuit transfers the residual energy to the 15V secondary winding, and outputs a 15V voltage after filtering. During the energy distribution period, all power switching transistors are turned off, and the 5V voltage regulator circuit draws power from the 12V stable bus, achieving complete decoupling of 12V and 15V energy transmission. In step 1.4, the 12V output is pre-regulated by a linear regulator to suppress noise amplification at low temperatures, and then adjusted to 5V by a low-dropout regulator. A filter network is configured at the 5V output terminal to effectively control the output ripple. At the same time, a 100ms soft-start circuit is integrated, which is linked to the temperature in the dual feedback signal. At low temperatures, the start-up time is extended as the temperature decreases, suppressing the current surge at low temperatures. An overvoltage protection circuit composed of a Zener diode and a thyristor is also integrated. When the output voltage exceeds the preset value, the thyristor is triggered to conduct, short-circuiting and releasing the overvoltage energy, ultimately providing a stable power supply for the key modules of the system.

[0011] Furthermore, the specific working process of the temperature control module is as follows: First, the operating temperature change of the laser is converted into a corresponding analog voltage signal, and then the analog voltage signal is converted into a digital temperature value. Next, using a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm, the temperature change trend curve is fitted using the digital temperature values ​​from the first five sampling periods to predict the thermal disturbance deviation at the next sampling moment. The dual control modes are then divided into intervals defined by ±2℃ of the laser's optimal operating temperature, and the temperature deviation between the laser's current actual temperature and its optimal operating temperature is acquired in real time. and its rate of change When the temperature deviation e exceeds the range, a linear combination of sliding surface functions is used. The expression is: ,in, The convergence coefficient is used when the temperature deviation... When the interval is within the range, the integral sliding surface function is used. The expression is: ,in, For integral weights; Calculate sliding mode variables based on sliding surface function ,according to Calculate the baseline control quantity with the preset control law. The expression is ,in To control the gain, It is a saturation function. Boundary layer thickness; thermal disturbance deviation The feedforward compensation amount is obtained by multiplying it with a preset coefficient matrix G. ; Set the reference control quantity With feedforward compensation The signals are added together to generate the final control quantity. The digital control quantity is then converted into an analog voltage signal. The signal is processed to generate a drive signal that can adjust the operating state of the TEC. Based on the actual temperature requirements, the TEC is driven to switch between cooling and heating modes, and the laser temperature is adjusted in real time.

[0012] Furthermore, the rough set-deep belief network hybrid early warning module includes a sensor unit, a data acquisition unit, a data preprocessing unit, a rough set-deep belief network hybrid model unit, and an early warning decision unit; The sensor unit includes a temperature sensor to monitor the ambient temperature of the barley field, a humidity sensor to measure the relative humidity of the atmosphere, a pressure sensor to monitor the atmospheric pressure, a wind speed sensor to measure the wind speed in the field, and a gas detection system to obtain the concentration values ​​of three characteristic gases, CO2, CH4, and NH3, based on the second harmonic signal and the Beer-Lambert law. The data acquisition unit uses the ADC function unit built into the main control module to realize real-time acquisition and synchronous transmission of multi-sensor data; The data preprocessing unit uses Z-score standardization to unify the data scale and combines box plot method to remove outliers. The rough set-deep belief network hybrid model unit adopts a two-stage inference mechanism to construct the model. In the first stage, the rough set is used to reduce the attributes of multi-dimensional environmental features to generate the simplest decision rule set. In the second stage, the deep belief network is used to process and realize the high-order nonlinear mapping. In the output stage, a credibility measure is introduced to generate a comprehensive prediction value. The Sand Cat optimization algorithm is introduced to automatically determine the rough set reduction threshold and the hyperparameter of the number of hidden layer nodes of the deep belief network using the F1 score as the evaluation index. The early warning decision unit converts the predicted value output by the model into an early warning probability through the Sigmoid function. When the probability is greater than a preset threshold, it triggers an audible and visual alarm device and sends an early warning message to the monitoring center through a 4G module.

[0013] Furthermore, the rough set-deep belief network hybrid model first performs attribute reduction on the 6 original features through rough set, which include methane concentration, ammonia concentration, carbon dioxide concentration, temperature, wind speed and soil moisture. Then, the reduced features are input into the deep belief network to learn nonlinear mapping relationships, and finally output a comprehensive prediction value that integrates the credibility measure. First, define the feature reduction objective: by quantifying the contribution of features to early warning decisions, eliminate redundant features to generate the simplest set of decision rules; feature importance is a key indicator for measuring feature contribution, especially for conditional attribute sets. and decision attribute set , These represent methane concentration, ammonia concentration, carbon dioxide concentration, temperature, wind speed, and soil moisture, respectively. Early warning is required. For features to be important without requiring warnings The calculation formula is: ; in, For conditional attribute set For decision attribute set Dependence, when If so, it is a redundant feature and should be removed; otherwise, it should be retained. The features form a reduced feature set. ; Reduce the feature set The input is a deep belief network for nonlinear mapping learning. The deep belief network is composed of multiple layers of restricted Boltzmann machines (RBMs). The training is divided into two stages: unsupervised pre-training and supervised fine-tuning. First, unsupervised pre-training learns higher-order representations of features through RBM, and the energy function of RBM is: ; in, This is the input to the visible layer, i.e., the reduced feature vector. This is an abstract representation of the features output by the hidden layer. The visible layer bias vector. This is the hidden layer bias vector. The visible layer to hidden layer weight matrix; Based on the energy function, the activation probability of hidden layer nodes and the reconstruction probability of visible layer nodes are respectively: ; ; in, The activation probability of hidden layer nodes. For the visible layer reconstruction probability, It is the sigmoid activation function. To represent the hidden layer The bias term of each node, To represent the visible layer The input value of each node, To indicate the connection of the visible layer The node and the hidden layer The weights between nodes The dimension of the input feature. To represent the visible layer The bias of each node To represent the hidden layer The activation value of each node; In the unsupervised pre-training phase of deep belief networks (RBMs), the data vector recalculated from the visible layers of each RBM based on the activation probabilities of its corresponding hidden layer nodes is the reconstructed feature. The reconstructed feature is then compared with the mean squared error of the original input to update the data vector in reverse. , , Complete a single round of RBM training; stack multiple layers of RBM and pre-train layer by layer to achieve the mapping from reduced features to higher-order abstract features; In the supervised fine-tuning stage, the hidden layer output of the top-level RBM is used as the input of the fully connected layer, and the warning result is used as the label. The parameters of the fully connected layer are optimized by the cross-entropy loss function. The loss function value is continuously reduced by gradient descent, and the weights and biases of the entire deep belief network are adjusted in reverse. To quantify the uncertainty of the prediction, a credibility metric is introduced in the output stage. This metric is calculated based on the variance of multiple predictions by the deep belief network, and its value is between 0 and 1. The closer it is to 1, the more credible the prediction result is. The final comprehensive prediction value is obtained by multiplying the average prediction value of the deep belief network by the credibility metric. Multiple rounds of training are performed until the model performance stabilizes and converges, finally forming a rough set-deep belief network hybrid model.

[0014] Furthermore, the Sandcat optimization algorithm was used to determine the hyperparameters of the model, and a probabilistic surrogate model of hyperparameters and model performance was constructed through Gaussian process regression. The hyperparameters to be optimized include the reduction threshold of the rough set, the number of hidden layer nodes in the deep belief network, the pre-training learning rate, the fine-tuning learning rate, and the number of predictions for the credibility measure. The dataset was divided into training and validation sets in a 7:3 ratio. Ten sample points were randomly initialized to establish an initial surrogate model, and the optimal evaluation point was selected through the expectation boosting collection function. The F1-score was used as the core indicator for evaluating the model performance, and the surrogate model was updated after each round of evaluation. The iteration process continued until the improvement of the optimal solution was less than 0.5% for 15 consecutive rounds. At the same time, the inference time of the model was monitored, and finally the parameter combination with the highest F1-score and meeting the real-time requirements was selected.

[0015] Furthermore, the main control module is connected to the wide-temperature-range wavelength-locked dual DFB laser group through a dual-frequency modulation module and a voltage-controlled constant current source module. The main control module uses an STM32MP157DAA1 chip. The dual-frequency modulation drive module relies on the Cortex-M4 core of the STM32MP157DAA1 to generate a low-frequency sawtooth wave through HRTIM, and the DDS core generates a digital sine wave sequence and outputs a high-frequency sine wave through a 12-bit DAC. After impedance matching by a voltage follower, the signals are superimposed by an inverting adder. The output stage is amplified by push-pull and filtered by RC to finally output a high-precision dual-frequency drive signal, which provides input to the voltage-controlled constant current source module. The voltage-controlled constant current source module receives the drive signal from the dual-frequency modulation drive module and provides high-precision stable current to the dual DFB laser group through a symmetrical constant current output channel. At the same time, it integrates overcurrent and short-circuit protection circuits to ensure the safe operation of the laser.

[0016] The beneficial technical effects of this invention are as follows: The invention constructs a multi-module collaborative carbon-ammonia source and sink gas monitoring and early warning system for highland barley fields. Through the integration of technologies such as "intelligent model, electro-optical control, precise temperature control, and efficient power supply", it solves the problems of poor system stability, low detection accuracy, and slow early warning response in the extreme environment of the plateau, and realizes accurate monitoring of carbon-ammonia gas concentration and second-level ecological risk early warning.

[0017] 1. A phased optimization of the rough set-deep belief network hybrid model: In the first phase, the model generates the simplest decision rule set by reducing multi-dimensional feature attributes through rough set. In the second phase, the model achieves high-order nonlinear mapping through deep belief network. Combined with the Sand Cat optimization algorithm, the hyperparameters are determined with F1 score as the indicator. This not only eliminates redundant features and controls model complexity, but also improves the accuracy of early warning of carbon-ammonia source-sink imbalance in highland barley fields, ensuring the reliability of prediction in complex environments.

[0018] 2. The electronically controlled gradient refractive index liquid crystal lens and the dual curvature gradient cavity mirror collaborative optical system generate a linear refractive index gradient by voltage-controlled liquid crystal molecule orientation, replacing traditional mechanical beam adjustment, achieving beam alignment accuracy of 0.001 level and millisecond-level response, and improving light energy utilization by more than 35%; coupled with a dynamic optical path compensation structure, it can offset the cavity length deviation caused by high altitude temperature in real time, eliminate mechanical creep and back error, and ensure the long-term stability of optical detection.

[0019] 3. A dual-mode dynamic gain-thermal disturbance prediction composite sliding mode temperature control circuit predicts thermal disturbance deviation based on the temperature values ​​of the first 5 sampling cycles. The control mode switches between modes with a limit of ±2℃ between the laser's optimal operating temperature and the target temperature: when the temperature deviation exceeds this range, a linear combined sliding mode surface is used to accelerate the system state convergence to the target range; when the temperature deviation falls within this range, an integral sliding mode surface is used, and the duty cycle is adjusted based on pulse width modulation to optimize efficiency and reduce steady-state error. This scheme effectively suppresses the overshoot of traditional PID control, achieving a steady-state control accuracy of ±0.005℃ and a response time of less than 100ms, ensuring that the DFB laser wavelength drift is less than 0.3pm / ℃, providing a stable spectral reference for gas detection.

[0020] 4. The flux-temperature dual feedback and time-division multiplexing power supply system monitors the magnetic state of the transformer through the flux detection winding and recovers leakage inductance energy to the 15V output terminal through timing control. It eliminates the need for traditional RCD absorption circuits and achieves an overall efficiency of over 89%. After two-stage voltage regulation and π-type filtering, the ripple at the 12V / 15V terminals is <30mVpp and the ripple at the 5V terminal is <10mVpp, making it suitable for high-altitude, low-voltage, and low-temperature environments and providing efficient and stable power supply for the system. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of a risk early warning system for carbon-ammonia source-sink imbalance in highland barley fields. Detailed Implementation

[0022] The specific embodiments of the present invention will be further described below with reference to specific examples: A risk early warning system for carbon-ammonia source-sink imbalance in highland barley fields, such as Figure 1 As shown, it includes an optical system module, an adaptive power supply module, a temperature control module, and a main control module; The optical system module includes a wide-temperature-range wavelength-locked dual DFB laser array, first and second electrically controlled gradient refractive index liquid crystal lenses, an off-axis integrating cavity, a converging lens, and a detector, used to achieve optical detection of CO2, CH4, and NH3 in highland barley fields; Specifically, the optical system module uses off-axis integrating cavity output spectroscopy (OA-ICOS) technology as its core to achieve optical detection of CO2, CH4, and NH3 in barley fields, solving the problems of creep, backlash error, and poor stability under strong vibrations at high altitudes associated with traditional mechanical beam tuning. Specifically: The wide-temperature-range wavelength-locked dual DFB laser array can emit stable lasers adapted to the characteristic absorption wavelengths of CO2, CH4, and NH3. It suppresses wavelength drift caused by temperature fluctuations at high altitudes by wide-temperature-range wavelength locking. It includes a first DFB laser and a second DFB laser. The first DFB laser is used to emit lasers with a wavelength of 1580nm, adapted to the characteristic absorption wavelength of CO2. The second DFB laser is used to emit lasers with a wavelength of 1653.7nm, adapted to the characteristic absorption wavelengths of CH4 and NH3. It suppresses wavelength drift caused by temperature fluctuations at high altitudes by wide-temperature-range wavelength locking. The first electrically controlled gradient refractive index liquid crystal lens 1 corresponds to the CO2 laser channel, and the second electrically controlled gradient refractive index liquid crystal lens 2 corresponds to the CH4 and NH3 laser channels. First, the diverging beams of their respective channels are collimated, and then the deflection angle of the two beams is dynamically adjusted by changing the refractive index through voltage adjustment, so that they remain parallel. The two parallel laser beams are coupled into the off-axis integrating cavity. The off-axis integrating cavity 3 uses a double-curvature graded cavity mirror instead of a traditional fixed-curvature concave mirror to reduce multiple reflection losses within the laser cavity. The double-curvature graded cavity mirror is an aspherical mirror with different radii of curvature on two mutually perpendicular principal directions. The radii of curvature are continuously and gradually distributed along the mirror aperture in at least one principal direction, and the mirror reflectivity is ≥99.99%. The off-axis integrating cavity is connected to a gas sampling device, which sends air from the barley field to be measured into the cavity to sense changes in plateau temperature in real time, thereby causing the cavity to expand and contract. The optical path deviation is compensated by adjusting the cavity mirror spacing. The cavity is fabricated with a highly stable structure, suppressing interference and reducing optical loss with a specific off-axis incident angle. The beam is calibrated to ensure that it is parallel to the cavity axis. After multiple reflections and absorptions within the off-axis integrating cavity, the two parallel laser beams output transmitted light. The converging lens 4 corrects aberrations in the received transmitted light through an aspherical achromatic composite structure, eliminating spherical and chromatic aberrations of traditional single lenses. The built-in light intensity adaptive adjustment unit senses the fluctuations in light intensity at high altitudes and dynamically adjusts the transmittance to stabilize the focused light intensity, focusing the optimized transmitted light onto the sensitive area of ​​the detector, thus significantly improving the light signal reception efficiency. The aspherical achromatic composite structure is a doublet lens made of a crown glass positive lens and a flint glass negative lens cemented together, and at least one of its optical surfaces is aspherical. The dual-channel differential cryogenically adapted detector focuses the transmitted light and the reference optical path beam of the input dual DFB laser array. It uses dual-channel differential detection to cancel environmental noise, and the built-in cryogenically adapted signal amplification module ensures stable signal amplification at high altitudes and low temperatures. The amplified electrical signal is transmitted to the dual-frequency demodulation module to provide a high signal-to-noise ratio basic signal for gas concentration inversion. The reference optical path beam refers to a small portion of the beam separated from the laser output from the dual DFB laser array. The electrical signal output by the detector is first pre-amplified and filtered by the dual-frequency demodulation module, then converted from analog to digital, and then the second harmonic signals corresponding to CO2, CH4 and NH3 are extracted by the digital lock-in amplifier to provide the processed effective signals for subsequent gas concentration inversion.

[0023] The specific working process of the dual-frequency demodulation module is as follows: after the detector outputs a current signal, it is first converted into a voltage signal by a preamplifier and amplified; then the voltage signal is filtered out by two bandpass filters to remove non-target frequency signals, and then enters two lock-in amplifiers; the lock-in amplifiers extract the second harmonic signal of a specific frequency, and finally demodulate the three second harmonic signals representing the gas concentration to characterize the concentration of the multi-component gas to be measured.

[0024] The adaptive power supply module is designed for the extreme low-pressure and low-temperature environment of the Qinghai-Tibet Plateau. It achieves precise energy conversion and stable output through four-stage cascaded processing and provides stable power to the system by adopting magnetic flux-temperature dual feedback and time-division multiplexing mechanism. Specifically, the operation of the adaptive power supply module includes the following steps: Step 1.1: AC-DC front-end wide-range adaptation processing; connect to a high-altitude 160-260V wide-range fluctuating AC power supply, convert it into pulsating DC through a rectifier bridge, and then dynamically adjust the filter parameters according to the grid harmonics through an adaptive filter network. Subsequently, connect to a power factor correction circuit, monitor the input current waveform in real time through a current sampling resistor, and dynamically adjust the conduction sequence of the switching devices to make the input current and voltage phase consistent, output a stable 380V high-voltage DC and maintain a power factor above 0.98. The high-voltage DC output is used as the primary input of the subsequent DC-DC conversion. Step 1.2: DC-DC flyback converter and dual feedback control; using 380V high voltage DC as input, energy is transferred through a multi-winding transformer; a magnetic flux-temperature dual feedback mechanism is introduced, with magnetic sensing elements monitoring the magnetic flux of the magnetic core in real time, and temperature sensors synchronously collecting the temperature of the magnetic core and switching devices. When the magnetic flux approaches the saturation threshold or the temperature exceeds the dynamically set safe range, the dual feedback signals trigger the primary-side switching devices to turn off. After the magnetic flux and temperature return to the safe range, they are restarted, and the final output contains the unregulated energy of the corresponding 12V and 15V windings, which is directly sent to the time-division multiplexing unit; The primary winding of a multi-winding transformer is segmented and designed with an air gap. The controller drives the primary main switch at a fixed switching frequency to convert the 380V high-voltage DC output from the front end into the induced voltage of the transformer's multi-winding secondary side. The air gap design refers to the artificial setting of tiny air gaps in the magnetic core. Its main function is to prevent the magnetic core from saturating. By increasing the magnetic resistance in the magnetic circuit, the air gap enables the transformer to withstand larger currents or DC components without easily saturating the magnetic core, thus ensuring stable operation. A flux detection winding is wound at a key location in the magnetic core's magnetic circuit. This key location represents the region with the highest magnetic field strength. The voltage generated by the flux detection winding through electromagnetic induction is proportional to the rate of change of the magnetic flux in the core. This voltage is converted into a DC voltage representing the magnetic flux in the core by a rectifier-integrator circuit. A temperature sensor is integrated simultaneously to collect the temperature of the core and switching devices in real time. When the DC voltage exceeds a preset saturation threshold or the temperature exceeds the safe range, the main switch is turned off in conjunction with dual feedback signals. Once the magnetic flux drops to the safe range and the temperature returns to normal, the main switch is turned back on. Step 1.3: Dynamic Time-Division Multiplexing for Multiple Outputs; Based on the magnetic flux recovery rate and temperature change rate, dynamically adjust the conduction timing of the switching devices; When the magnetic flux recovery rate is detected to be lower than the first preset threshold and the temperature change rate is higher than the second preset threshold (i.e., when the magnetic flux recovery slows down and the temperature rises rapidly), divide the long conduction time into multiple pulses to suppress magnetic saturation and temperature rise; When the magnetic flux recovery rate is higher than the first preset threshold and the temperature change rate is lower than the second preset threshold (i.e., when the system state is stable), adjust the duty cycle of the pulse width modulation signal to output stable 12V and 15V voltages; Based on the dynamic adjustment of magnetic flux recovery rate and temperature change rate, three non-overlapping timing control signals are generated to divide the switching cycle into energy injection period, magnetic flux balance period and energy distribution period. Dead time is set between each stage to avoid power transistor crossover conduction. During the energy injection period, the main switch and the 12V secondary synchronous rectifier are turned on in tandem, the transformer stores energy and releases it to the 12V secondary side, and outputs 12V voltage after filtering; During the flux balance period, when the residual magnetic energy of the magnetic core is detected, the trigger circuit transfers the residual energy to the 15V secondary winding, and outputs a 15V voltage after filtering.

[0025] During the energy distribution period, all power switching transistors are turned off, and the 5V voltage regulator circuit draws power from the 12V stable bus, achieving complete decoupling of 12V and 15V energy transmission. Step 1.4: Using 12V and 15V DC voltages as inputs, a general-purpose linear regulator is used for initial voltage reduction and regulation. This general-purpose linear regulator forms a soft-start circuit through an external capacitor, which slowly turns on the regulating transistor in the initial power-up stage, thereby controlling the output voltage to rise at a gentle slope and effectively suppressing inrush current. After the general-purpose linear regulator outputs an intermediate voltage, it is then connected to a low-dropout linear regulator. The low-dropout linear regulator uses an internal error amplifier to compare the output voltage sampled by the feedback resistor network with a high-precision bandgap reference voltage, dynamically adjusting the conduction state of the regulating transistor to achieve high-precision secondary voltage regulation, and finally outputting a stable 5V voltage.

[0026] The 12V output is pre-regulated by a linear regulator to suppress noise amplification at low temperatures, and then adjusted to 5V by a low-dropout regulator. A filter network is configured at the 5V output to effectively control output ripple. A 100ms soft-start circuit is also integrated, which is linked with a dual-feedback temperature signal. The start-up time is extended as the temperature decreases at low temperatures to suppress current surges during low-temperature power-up. An overvoltage protection circuit composed of a Zener diode and a thyristor is also integrated. When the output voltage exceeds the preset value, the thyristor is triggered to conduct, short-circuiting and releasing the overvoltage energy, ultimately providing a stable power supply for the critical modules of the system.

[0027] The temperature control module provides high-precision temperature stability control for the laser based on a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm. Specifically, the working process of the temperature control module is as follows: First, a thermistor is used as a temperature sensing element to capture the laser's operating temperature in real time and convert the changes in the laser's operating temperature into corresponding analog voltage signals to provide raw feedback data for the temperature control closed loop. Secondly, a 16-bit ADC is used to convert the analog voltage signal into a digital temperature value through high-precision conversion. Then, using a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm, the temperature change trend curve is first fitted using the digital temperature values ​​of the first 5 sampling cycles to predict the thermal disturbance deviation at the next sampling moment; then, the dual control modes are divided into intervals defined by ±2℃ of the laser's optimal operating temperature, and the temperature deviation between the current actual temperature of the laser and the laser's optimal operating temperature is obtained in real time. and its rate of change When temperature deviation When the range is exceeded, a linear combination of sliding surface functions is used. The expression is: ,in, The convergence coefficient is used to balance the weights of the deviation and the rate of change; when the temperature deviation e is within the interval, the integral sliding surface function is used. The expression is: ,in, These are the integral weights used to eliminate steady-state error; Calculate sliding mode variables based on sliding surface function ,according to Calculate the baseline control quantity with the preset control law. The expression is ,in To control the gain, It is a saturation function. This refers to the boundary layer thickness; the design aims to ensure that the system state variables remain stable near the sliding surface s=0. As the core component of the control quantity, it is responsible for guiding the approach process of the system state.

[0028] thermal disturbance deviation The feedforward compensation amount is obtained by multiplying it with a preset coefficient matrix G. This compensation amount is used to proactively offset predictable thermal disturbances; the baseline control amount... With feedforward compensation The sums are used to generate the final control input, which is then sent to the 16-bit DAC. A 16-bit DAC converts digital control signals into analog voltage signals; using the ADN8835 temperature control chip, a drive signal that can adjust the operating state of the TEC is generated through the internally integrated drive circuit and PID compensation network; the TEC is driven to switch between cooling or heating modes according to the actual temperature requirements, and the laser temperature is adjusted in real time.

[0029] The main control module is used to generate laser driving signals and uses a rough set-deep belief network hybrid early warning module to provide early warning of CO2, CH4, and NH3 concentrations in barley fields.

[0030] Specifically, the main control module is connected to the wide-temperature-range wavelength-locked dual DFB laser array through a dual-frequency modulation module and a voltage-controlled constant current source module. The main control module uses an STM32MP157DAA1 chip. The dual-frequency modulation drive module relies on the Cortex-M4 core of the STM32MP157DAA1 to generate a low-frequency sawtooth wave through HRTIM, and the DDS core generates a digital sine wave sequence and outputs a high-frequency sine wave through a 12-bit DAC. After impedance matching by a voltage follower, the signals are superimposed by an inverting adder. The output stage is amplified by push-pull and filtered by RC to finally output a high-precision dual-frequency drive signal, which provides input to the voltage-controlled constant current source module. The specific operation of the dual-frequency modulation drive module is as follows: The Cortex-M4 core of the STM32MP157DAA1 main control module generates two phase-adjustable low-frequency sawtooth wave signals and a precisely adjustable duty cycle PWM waveform through a built-in high-resolution timer. Subsequently, the core queries a sine function table pre-stored in Flash memory using an on-chip direct digital frequency synthesizer core to generate a high-precision digital sine wave sequence. This sequence is converted by a digital-to-analog converter and outputs two high-frequency sine waves. The low-frequency sawtooth wave and the high-frequency sine wave are impedance-matched through voltage followers and then input to an inverting adder circuit constructed from operational amplifiers. Simultaneously, the PWM modulation signal drives the power switch after high-speed optocoupler isolation. The output stage enhances the signal driving capability through a push-pull amplifier circuit and eliminates high-frequency noise with an RC filter network, ultimately outputting a dual-frequency drive signal with adjustable amplitude and precise frequency to provide input for the voltage-controlled constant current source module.

[0031] The voltage-controlled constant current source module receives the drive signal from the dual-frequency modulation drive module and provides high-precision stable current to the dual DFB laser group through a symmetrical constant current output channel. At the same time, it integrates overcurrent and short-circuit protection circuits to ensure the safe operation of the laser.

[0032] The specific working process of the voltage-controlled constant current source module is as follows: After receiving the drive signal from the dual-frequency modulation drive module, the 16-bit high-precision DAC of the STM32MP157DAA1 generates an analog voltage signal. This signal is buffered by a voltage follower, converted to a differential signal by a differential amplifier, and then enters the negative feedback network composed of an operational amplifier and a power MOSFET. The operational amplifier compares the input voltage with the feedback voltage of the sampling resistor and dynamically adjusts the MOSFET gate voltage so that the load current follows the change of the input voltage. The sampling resistor captures the current signal, and the voltage is amplified and fed back to form a closed loop. The STM32MP157DAA1 monitors the sampling voltage and calibrates and compensates it through an ADC. The magnetically isolated current sensor detects the load current. When the current exceeds the threshold, the window comparator triggers protection, driving the gallium nitride switch to cut off the output in microseconds. The common-mode choke, TVS diode, and self-resetting fuse provide coordinated protection.

[0033] The rough set-deep belief network hybrid early warning module is the core of the early warning of carbon-ammonia source-sink imbalance risk in highland barley fields. It aims to solve the problems of traditional single-parameter early warning that cannot integrate multi-source data and is difficult to identify nonlinear correlations between carbon-ammonia sources and sinks. It achieves accurate risk prediction through multi-unit collaboration.

[0034] This module includes a sensor unit, a data acquisition unit, a data preprocessing unit, a rough set-deep belief network (RS-DBN) hybrid model unit, and an early warning decision unit. The sensor unit provides a multi-dimensional feature input basis for the model. It uses multiple types of dedicated sensors to collect key parameters for monitoring carbon-ammonia source and sink. Among them, the temperature sensor monitors the ambient temperature of the barley field, the barley pressure sensor monitors the atmospheric pressure, the wind speed sensor measures the wind speed in the field, the soil moisture sensor monitors the soil moisture, and the gas detection system simultaneously measures the concentration values ​​of three characteristic gases, CO2, CH4, and NH3. This comprehensively covers the environmental and gas parameters that affect the carbon-ammonia source and sink balance, thus balancing the accuracy and real-time performance of the model. The data acquisition unit uses the built-in ADC function unit in the main control module to realize real-time acquisition and synchronous transmission of data from multiple sensors, and also supports uploading and storing data to the cloud platform. The data preprocessing unit uses Z-score standardization to unify the data scale and combines box plot method to remove outliers; The rough set-deep belief network hybrid model unit adopts a two-stage inference mechanism to construct the model. In the first stage, the rough set is used to reduce the attributes of multi-dimensional environmental features to generate the simplest decision rule set. In the second stage, the deep belief network is used to process and realize the high-order nonlinear mapping. In the output stage, a credibility measure is introduced to generate a comprehensive prediction value. The Sand Cat optimization algorithm is introduced to automatically determine the rough set reduction threshold and the hyperparameter of the number of hidden layer nodes of the deep belief network using the F1 score as the evaluation index. Key early warning monitoring parameters, such as ambient temperature, soil moisture, wind speed, methane concentration, ammonia concentration, and carbon dioxide concentration, should be clearly defined. Specific early warning requirements are as follows: Temperature warning: An alert will be triggered when the ambient temperature is ≥35°C; Soil moisture warning: The warning is triggered when the soil volumetric water content is ≤12% or ≥40%. Wind speed warning: The warning will be triggered when the wind speed is ≤0.3m / s or ≥10m / s. Methane concentration warning: A warning is triggered when the methane concentration is ≥10ppm; Ammonia concentration warning: A warning is triggered when the ammonia concentration is ≥15ppm; Carbon dioxide concentration warning: A warning is triggered when the carbon dioxide concentration is ≥1200ppm.

[0035] In the actual environment of highland barley fields, by deploying off-axis integrating cavity output spectral gas analyzers and multi-parameter environmental sensor networks, the concentrations of CH4, NH3, and CO2 gases, as well as environmental parameters such as temperature, wind speed, and soil moisture in the field are monitored in real time at different growth stages, obtaining a large amount of raw data under conditions where early warning is needed and not needed.

[0036] First, box plots are used to identify and remove outliers from the data, eliminating transient interference and extreme biases. Then, the dataset after outlier removal is processed using Z-score normalization to unify the data scale of each monitoring parameter. Finally, a clean and well-organized 6-dimensional feature dataset is output for subsequent gradient boosting decision tree model training and validation.

[0037] The core principle of the Rough Set-Deep Belief Network (RS-DBN) hybrid model lies in its two-stage framework of "feature reduction-nonlinear mapping." First, it uses rough sets to remove redundant features to reduce noise interference. Then, it uses a deep belief network to learn high-order nonlinear relationships between features, thereby accurately capturing the complex coupling relationship between carbon and ammonia sources and sinks in barley fields and achieving reliable early warning of imbalance risks. The RS-DBN hybrid model first reduces the six original features (methane concentration, ammonia concentration, carbon dioxide concentration, temperature, wind speed, and soil moisture) using rough sets. The reduced features are then input into the deep belief network to learn nonlinear mapping relationships, ultimately outputting a comprehensive prediction value that incorporates a reliability metric. First, define the feature reduction objective: by quantifying the contribution of features to early warning decisions, eliminate redundant features to generate the simplest set of decision rules; feature importance is a key indicator for measuring feature contribution, especially for conditional attribute sets. and decision attribute set , These represent methane concentration, ammonia concentration, carbon dioxide concentration, temperature, wind speed, and soil moisture, respectively. Early warning is required. For features to be important without requiring warnings The calculation formula is: ; in, For conditional attribute set For decision attribute set Dependence, when If so, it is a redundant feature and should be removed; otherwise, it should be retained. The features form a reduced feature set. and based on and The correspondence is used to generate the simplest set of decision rules; Reduce the feature set The input is a deep belief network for nonlinear mapping learning. The deep belief network is composed of multiple layers of restricted Boltzmann machines (RBMs). The training is divided into two stages: unsupervised pre-training and supervised fine-tuning. First, unsupervised pre-training learns higher-order representations of features through RBM, and the energy function of RBM is: ; in, This is the input to the visible layer, i.e., the reduced feature vector. This is an abstract representation of the features output by the hidden layer. The visible layer bias vector. This is the hidden layer bias vector. The visible layer to hidden layer weight matrix; Based on the energy function, the activation probability of hidden layer nodes and the reconstruction probability of visible layer nodes are respectively: ; ; in, The activation probability of hidden layer nodes. For the visible layer reconstruction probability, It is the sigmoid activation function. To represent the hidden layer The bias term of each node, To represent the visible layer The input value of each node, To indicate the connection of the visible layer The node and the hidden layer The weights between nodes The dimension of the input feature. To represent the visible layer The bias of each node To represent the hidden layer The activation value of each node; In the unsupervised pre-training phase of deep belief networks (RBMs), the data vector recalculated from the visible layers of each RBM based on the activation probabilities of its corresponding hidden layer nodes is the reconstructed feature. The reconstructed feature is then compared with the mean squared error of the original input to update the data vector in reverse. , , Complete a single round of RBM training; stack multiple layers of RBM and pre-train layer by layer to achieve the mapping from reduced features to higher-order abstract features; In the supervised fine-tuning stage, the hidden layer output of the top-level RBM is used as the input of the fully connected layer, and the warning result is used as the label. The parameters of the fully connected layer are optimized by the cross-entropy loss function. The loss function value is continuously reduced using gradient descent, which inversely adjusts the weights and biases of the entire deep belief network. To quantify the uncertainty of predictions, a credibility metric is introduced in the output stage. This metric is calculated based on the variance of multiple predictions made by the deep belief network, and its value ranges from 0 to 1, with values ​​closer to 1 indicating more reliable predictions. The final comprehensive prediction value is obtained by multiplying the average prediction value of the deep belief network by the credibility metric. The "feature reduction-nonlinear mapping" process is repeated for multiple rounds of training until the model performance stabilizes and converges, ultimately forming a rough set-deep belief network hybrid model. The core of this model is to achieve accurate fusion of multi-source data and effective capture of complex correlations through two-stage collaborative learning.

[0038] The rough set-deep belief network hybrid model runs on the STM32MP157DAA1 main control module. When a new prediction sample is input, the rough set module first performs feature reduction based on a preset decision rule set. Then, the reduced features are input into the deep belief network for nonlinear mapping, and a comprehensive prediction value is generated by combining the confidence metric. The comprehensive prediction value is converted into an early warning probability through the sigmoid function. When the probability is greater than 0.5, the system triggers an early warning, the buzzer sounds continuously, the indicator light flashes, and an early warning message is sent to the monitoring center via 4G communication.

[0039] The early warning decision unit converts the predicted value output by the model into an early warning probability through the Sigmoid function. When the probability is greater than a preset threshold, it triggers the audible and visual alarm device and sends the early warning information to the monitoring center through the 4G module.

[0040] The system also includes a user interface module. The graphical user interface is developed based on the Linux operating system and the QT platform. The initial interface is divided into functional zones, and parameter configuration is achieved through a two-level menu. The first-level menu includes laser parameter settings, acquisition parameter configuration, environmental compensation settings, rough set-deep belief network hybrid model configuration, alarm threshold management, and a data analysis algorithm module. This module allows adjustment of laser parameters, rough set-deep belief network hybrid model parameters and feature reduction strategies, alarm rules, and spectral processing methods. The system supports linked analysis of the spectrum and the rough set-deep belief network hybrid model, simultaneously displaying the model decision rules and feature importance corresponding to spectral absorption peaks, correlation curves during model training, changes in the importance of reduced features, spectral anomaly waveforms and warning probabilities during alarms, and can also display multi-dimensional data, supporting graphical zooming, panning, and export.

[0041] The basic working principle of this invention is as follows: Using an STM32MP157DAA1 as the main control module, a dual-frequency signal is generated through HRTIM and DDS cores, and then synthesized into a laser drive signal through superposition, amplification, and filtering. This signal is powered by an adaptive power supply module, which converts a wide-range AC voltage of 160-260V to a high-voltage DC voltage of 380V. After DC-DC flyback conversion, dual feedback control, and time-division multiplexing, a 5V voltage is finally output to the voltage-controlled constant current source. The module outputs a high-precision current to the dual DFB laser array, with wavelengths matching the characteristic absorption peak of CO2 and the characteristic spectral lines of CH4 and NH3. Laser temperature control employs a dual-mode composite sliding mode algorithm. Temperature is captured by a thermistor and converted to voltage, then converted to a digital signal by a 16-bit ADC. The algorithm fits the temperature trend and predicts disturbances, switching the control mode according to the optimal temperature ±2°C. The generated control quantity is converted to analog voltage by a 16-bit DAC, driving the ADN8835 and TEC to achieve ±0.005°C temperature control, ensuring wavelength drift <0.3pm / °C. The optical system uses dual electrically controlled liquid crystal lenses for beam modulation, ensuring parallel coupling of the laser to the off-axis integrating cavity. An in-cavity optical path compensation structure compensates for cavity length deviations. The emitted light is stabilized and corrected by an aspherical lens, then undergoes photoelectric conversion by a detector. After signal processing by a dual-frequency demodulation module, harmonic features are extracted via digital lock-in amplification, and combined with calibration curves to achieve ppb-level gas detection. The system simultaneously acquires gas concentration and environmental parameters, which are preprocessed using Z-score normalization and box plot methods before being input into a rough set-deep belief network hybrid model. The model incorporates a confidence metric through rough set feature reduction and deep belief network mapping, and the Sand Cat optimization algorithm determines hyperparameters. Finally, the model output is converted into a warning probability via a Sigmoid function. A warning is triggered when the probability exceeds 0.5, and the Cortex-M4 core controls a buzzer and indicator light to sound an alarm. Simultaneously, the alarm information is uploaded to the cloud platform via 4G.

[0042] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A risk early warning system for carbon-ammonia source-sink imbalance in highland barley fields, characterized in that, Includes an optical system module, an adaptive power supply module, a temperature control module, and a main control module; The optical system module includes a wide-temperature-range wavelength-locked dual DFB laser array, first and second electrically controlled gradient refractive index liquid crystal lenses, an off-axis integrating cavity, a converging lens, and a detector, used to achieve optical detection of CO2, CH4, and NH3 in highland barley fields; The adaptive power supply module is designed for the extreme low-pressure and low-temperature environment of the Qinghai-Tibet Plateau. It adopts a magnetic flux-temperature dual feedback and time-division multiplexing mechanism to provide a stable power supply for the system. The temperature control module provides high-precision temperature stability control for the laser based on a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm. The main control module is used to generate laser driving signals and to use a rough set-deep belief network hybrid early warning module to provide early warning of the risk of imbalance in barley fields.

2. The system according to claim 1, wherein, The wide temperature range wavelength-locked dual DFB laser group includes a first DFB laser and a second DFB laser. The first DFB laser is used to emit laser with a wavelength of 1580nm, which is adapted to the characteristic absorption wavelength of CO2. The second DFB laser is used to emit laser with a wavelength of 1653.7nm, which is adapted to the characteristic absorption wavelengths of CH4 and NH3. The first electrically controlled gradient refractive index liquid crystal lens corresponds to the CO2 laser channel, and the second electrically controlled gradient refractive index liquid crystal lens corresponds to the CH4 and NH3 laser channels. First, the diverging beams of their respective channels are collimated, and then the voltage is adjusted to change the refractive index to dynamically adjust the deflection angle of the two beams so that the two beams remain parallel. The two parallel laser beams are coupled into the off-axis integrating cavity. The off-axis integrating cavity employs a double-curvature graded cavity mirror, which is an aspherical reflector with different radii of curvature on two mutually perpendicular principal directions. The radii of curvature are continuously and gradually distributed along at least one principal direction of the mirror aperture, and the mirror reflectivity is ≥99.99%. The off-axis integrating cavity is connected to a gas sampling device, which sends air from the barley field to be measured into the cavity. Real-time temperature changes at high altitudes are sensed, causing the cavity to expand and contract along its length. The optical path deviation is compensated by adjusting the distance between the cavity mirrors. Two parallel laser beams are reflected and absorbed multiple times within the off-axis integrating cavity before being output as transmitted light. The converging lens corrects aberrations in the received transmitted light through an aspherical achromatic combination structure. The built-in light intensity adaptive adjustment unit senses the fluctuations in plateau illumination and dynamically adjusts the transmittance to stabilize the focused light intensity, focusing the optimized transmitted light onto the sensitive area of ​​the detector. The detector will focus the transmitted light and the reference optical path beam of the dual DFB laser group, use dual-channel differential detection to cancel environmental noise, and have a built-in signal amplification module to ensure stable signal amplification at high altitude and low temperature, and transmit the amplified electrical signal to the dual-frequency demodulation module. The dual-frequency demodulation module first amplifies and filters the electrical signal, then performs analog-to-digital conversion, and finally extracts the second harmonic signals corresponding to CO2, CH4, and NH3 through a digital lock-in amplifier.

3. The system according to claim 1, wherein, The operation of the adaptive power supply module includes the following steps: Step 1.1: Connect to a 160-260V wide-range fluctuating AC power supply for high-altitude areas. Convert it to pulsating DC through a rectifier bridge, and then dynamically adjust the filter parameters according to the grid harmonics through an adaptive filter network. Subsequently, connect to a power factor correction circuit. Monitor the input current waveform in real time through a current sampling resistor and dynamically adjust the turn-on sequence of the switching devices to make the input current and voltage phase consistent, so that the output is a stable 380V high-voltage DC with a power factor maintained above 0.

98. Step 1.2: Using 380V high voltage DC as input, energy is transferred through a multi-winding transformer; a magnetic flux-temperature dual feedback mechanism is introduced. The dual feedback signals include the magnetic flux of the magnetic core monitored in real time by the magnetic sensing element and the temperature of the magnetic core and switching devices synchronously collected by the temperature sensor. When the magnetic flux approaches the saturation threshold or the temperature exceeds the dynamically set safe range, the dual feedback signals trigger the primary-side switching devices to turn off. After the magnetic flux and temperature return to the safe range, they are restarted. Finally, the output contains the unregulated energy of the corresponding 12V and 15V windings and is sent to the next unit. Step 1.3: Dynamically adjust the conduction timing of the switching devices based on the magnetic flux recovery rate and the temperature change rate; when the magnetic flux recovery rate is detected to be lower than the first preset threshold and the temperature change rate is higher than the second preset threshold, divide the long conduction time into multiple pulses; when the magnetic flux recovery rate is higher than the first preset threshold and the temperature change rate is lower than the second preset threshold, adjust the duty cycle of the pulse width modulation signal to output stable 12V and 15V voltages. Step 1.4: Using 12V and 15V DC voltages as inputs, a general-purpose linear regulator is used for initial voltage reduction and regulation. This general-purpose linear regulator forms a soft-start circuit through an external capacitor, which slowly turns on the regulating transistor in the initial power-up stage, thereby controlling the output voltage to rise at a gentle slope and effectively suppressing inrush current. After the general-purpose linear regulator outputs an intermediate voltage, it is then connected to a low-dropout linear regulator. The low-dropout linear regulator uses an internal error amplifier to compare the output voltage sampled by the feedback resistor network with a high-precision bandgap reference voltage, dynamically adjusting the conduction state of the regulating transistor to achieve high-precision secondary voltage regulation, and finally outputting a stable 5V voltage.

4. The system according to claim 3, wherein, In step 1.2, the primary winding of the multi-winding transformer is wound in sections and combined with an air gap design. The air gap design refers to artificially setting a tiny air gap in the magnetic core. The controller drives the primary main switch tube at a fixed switching frequency to convert the 380V high-voltage DC output from the front stage into the induced voltage of the secondary winding of the transformer. A flux detection winding is wound at a key location in the magnetic core's magnetic circuit. This key location represents the region with the highest magnetic field strength. The voltage generated by the flux detection winding through electromagnetic induction is proportional to the rate of change of the magnetic flux in the core. This voltage is converted into a DC voltage representing the magnetic flux in the core by a rectifier-integrator circuit. A temperature sensor is integrated simultaneously to collect the temperature of the core and switching devices in real time. When the DC voltage exceeds a preset saturation threshold or the temperature exceeds the safe range, the main switch is turned off in conjunction with dual feedback signals. Once the magnetic flux drops to the safe range and the temperature returns to normal, the main switch is turned back on. In step 1.3, the timing is dynamically adjusted based on the magnetic flux recovery rate and the temperature change rate to generate three non-overlapping timing control signals. The switching cycle is divided into an energy injection period, a magnetic flux balance period, and an energy distribution period. Dead time is set between each stage to avoid power transistor crossover conduction. During the energy injection period, the main switch and the 12V secondary synchronous rectifier are turned on in tandem, the transformer stores energy and releases it to the 12V secondary side, and outputs 12V voltage after filtering; During the flux balance period, when the residual magnetic energy of the magnetic core is detected, the trigger circuit transfers the residual energy to the 15V secondary winding, and outputs a 15V voltage after filtering. During the energy distribution period, all power switching transistors are turned off, and the 5V voltage regulator circuit draws power from the 12V stable bus, achieving complete decoupling of 12V and 15V energy transmission. In step 1.4, the 12V output is pre-regulated by a linear regulator to suppress noise amplification at low temperatures, and then adjusted to 5V by a low-dropout regulator. A filter network is configured at the 5V output terminal to effectively control the output ripple. At the same time, a 100ms soft-start circuit is integrated, which is linked to the temperature in the dual feedback signal. At low temperatures, the start-up time is extended as the temperature decreases, suppressing the current surge at low temperatures. An overvoltage protection circuit composed of a Zener diode and a thyristor is also integrated. When the output voltage exceeds the preset value, the thyristor is triggered to conduct, short-circuiting and releasing the overvoltage energy, ultimately providing a stable power supply for the key modules of the system.

5. The system according to claim 1, wherein, The specific working process of the temperature control module is as follows: First, the operating temperature change of the laser is converted into a corresponding analog voltage signal, and then the analog voltage signal is converted into a digital temperature value. Next, using a dual-mode dynamic gain-thermal disturbance prediction composite sliding mode control algorithm, the temperature change trend curve is fitted using the digital temperature values ​​from the first five sampling periods to predict the thermal disturbance deviation at the next sampling moment. The dual control modes are then divided into intervals defined by ±2℃ of the laser's optimal operating temperature, and the temperature deviation between the laser's current actual temperature and its optimal operating temperature is acquired in real time. and its rate of change When the temperature deviation e exceeds the range, a linear combination of sliding surface functions is used. The expression is: ,in, The convergence coefficient is used when the temperature deviation... When the interval is within the range, the integral sliding surface function is used. The expression is: ,in, For integral weights; Calculate sliding mode variables based on sliding surface function ,according to Calculate the baseline control quantity with the preset control law. The expression is ,in To control the gain, It is a saturation function. Boundary layer thickness; thermal disturbance deviation The feedforward compensation amount is obtained by multiplying it with a preset coefficient matrix G. ; Set the reference control quantity With feedforward compensation The signals are added together to generate the final control quantity. The digital control quantity is then converted into an analog voltage signal. The signal is processed to generate a drive signal that can adjust the operating state of the TEC. Based on the actual temperature requirements, the TEC is driven to switch between cooling and heating modes, and the laser temperature is adjusted in real time.

6. The system according to claim 1, wherein, The rough set-deep belief network hybrid early warning module includes a sensor unit, a data acquisition unit, a data preprocessing unit, a rough set-deep belief network hybrid model unit, and an early warning decision unit. The sensor unit includes a temperature sensor to monitor the ambient temperature of the barley field, a humidity sensor to measure the relative humidity of the atmosphere, a pressure sensor to monitor the atmospheric pressure, a wind speed sensor to measure the wind speed in the field, a soil moisture sensor to monitor the soil moisture, and a gas detection system to obtain the concentration values ​​of three characteristic gases, CO2, CH4, and NH3, based on the second harmonic signal and the Beer-Lambert law. The data acquisition unit uses the ADC function unit built into the main control module to realize real-time acquisition and synchronous transmission of multi-sensor data; The data preprocessing unit uses Z-score standardization to unify the data scale and combines box plot method to remove outliers. The rough set-deep belief network hybrid model unit adopts a two-stage inference mechanism to construct the model. In the first stage, the rough set is used to reduce the attributes of multi-dimensional environmental features to generate the simplest decision rule set. In the second stage, the deep belief network is used to process and realize the high-order nonlinear mapping. In the output stage, a credibility measure is introduced to generate a comprehensive prediction value. The Sand Cat optimization algorithm is introduced to automatically determine the rough set reduction threshold and the hyperparameter of the number of hidden layer nodes of the deep belief network using the F1 score as the evaluation index. The early warning decision unit converts the predicted value output by the model into an early warning probability through the Sigmoid function. When the probability is greater than a preset threshold, it triggers an audible and visual alarm device and sends an early warning message to the monitoring center through a 4G module.

7. The system according to claim 6, wherein, The rough set-deep belief network hybrid model first performs attribute reduction on the 6 original features through rough set. The 6 original features include methane concentration, ammonia concentration, carbon dioxide concentration, temperature, wind speed and soil moisture. Then, the reduced features are input into the deep belief network to learn nonlinear mapping relationships, and finally output a comprehensive prediction value that integrates the credibility measure. First, define the feature reduction objective: by quantifying the contribution of features to early warning decisions, eliminate redundant features to generate the simplest set of decision rules; feature importance is a key indicator for measuring feature contribution, especially for conditional attribute sets. and decision attribute set , These represent methane concentration, ammonia concentration, carbon dioxide concentration, temperature, wind speed, and soil moisture, respectively. Early warning is required. For features to be important without requiring warnings The calculation formula is: ; in, For conditional attribute set For decision attribute set Dependence, when If so, it is a redundant feature and should be removed; otherwise, it should be retained. The features form a reduced feature set. ; Reduced feature set The input deep belief network is trained in two stages: unsupervised pre-training and supervised fine-tuning. First, unsupervised pre-training learns higher-order representations of features through RBM, and the energy function of RBM is: ; in, This is the input to the visible layer, i.e., the reduced feature vector. This is an abstract representation of the features output by the hidden layer. The visible layer bias vector. This is the hidden layer bias vector. The visible layer to hidden layer weight matrix; Based on the energy function, the activation probability of hidden layer nodes and the reconstruction probability of visible layer nodes are respectively: ; ; in, The activation probability of hidden layer nodes. For the visible layer reconstruction probability, It is the sigmoid activation function. To represent the hidden layer The bias term of each node, To represent the visible layer The input value of each node, To indicate the connection of the visible layer The node and the hidden layer The weights between nodes The dimension of the input feature. To represent the visible layer The bias of each node To represent the hidden layer The activation value of each node; In the unsupervised pre-training phase of deep belief networks (RBMs), the data vector recalculated from the visible layers of each RBM based on the activation probabilities of its corresponding hidden layer nodes is the reconstructed feature. The reconstructed feature is then compared with the mean squared error of the original input to update the data vector in reverse. , , Complete a single round of RBM training; stack multiple layers of RBM and pre-train layer by layer to achieve the mapping from reduced features to higher-order abstract features; In the supervised fine-tuning stage, the hidden layer output of the top-level RBM is used as the input of the fully connected layer, and the warning result is used as the label. The parameters of the fully connected layer are optimized by the cross-entropy loss function. The loss function value is continuously reduced by gradient descent, and the weights and biases of the entire deep belief network are adjusted in reverse. To quantify the uncertainty of the prediction, a credibility metric is introduced in the output stage. This metric is calculated based on the variance of multiple predictions by the deep belief network, and its value is between 0 and 1. The closer it is to 1, the more credible the prediction result is. The final comprehensive prediction value is obtained by multiplying the average prediction value of the deep belief network by the credibility metric. Multiple rounds of training are performed until the model performance stabilizes and converges, finally forming a rough set-deep belief network hybrid model.

8. The system according to claim 6, wherein, The Sandcat optimization algorithm was used to determine the hyperparameters of the model, and a probabilistic surrogate model of hyperparameters and model performance was constructed using Gaussian process regression. The hyperparameters to be optimized included the rough set reduction threshold, the number of hidden layer nodes in the deep belief network, the pre-training learning rate, the fine-tuning learning rate, and the number of predictions for the credibility measure. The dataset was divided into training and validation sets in a 7:3 ratio. Ten sample points were randomly initialized to build an initial surrogate model, and the optimal evaluation point was selected by the expectation boosting sampling function. The F1-score was used as the core indicator to evaluate the model performance, and the surrogate model was updated after each round of evaluation. The iteration process continued until the improvement of the optimal solution was less than 0.5% for 15 consecutive rounds. At the same time, the inference time of the model was monitored, and finally, the parameter combination with the highest F1-score and meeting the real-time requirements was selected.

9. The system according to claim 1, wherein, The main control module is connected to a wide-temperature-range wavelength-locked dual DFB laser array via a dual-frequency modulation module and a voltage-controlled constant current source module. The main control module uses an STM32MP157DAA1 chip. The dual-frequency modulation drive module relies on the Cortex-M4 core of the STM32MP157DAA1 to generate a low-frequency sawtooth wave through HRTIM, and a digital sine wave sequence is generated by the DDS core and output as a high-frequency sine wave through a 12-bit DAC. After impedance matching by a voltage follower, the signals are superimposed by an inverting adder. The output stage is amplified by push-pull and filtered by RC to finally output a high-precision dual-frequency drive signal, which provides input to the voltage-controlled constant current source module. The voltage-controlled constant current source module receives the drive signal from the dual-frequency modulation drive module and provides high-precision stable current to the dual DFB laser group through a symmetrical constant current output channel. At the same time, it integrates overcurrent and short-circuit protection circuits to ensure the safe operation of the laser.