Apparatus and Method for Simultaneous Measurement of Ammonia and Hydrogen Based on Gas Broadening Effect in Industrial Ammonia Cracking
By using a device and method for simultaneous ammonia and hydrogen measurement based on the gas broadening effect during ammonia cracking, combined with near-infrared lasers and deep learning models, the problems of slow response of hydrogen sensors in high-temperature multi-component environments and large measurement deviation of traditional TDLAS were solved, realizing the function of simultaneous ammonia and hydrogen measurement and improving the accuracy and real-time performance of ammonia and hydrogen concentration monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-31
AI Technical Summary
Existing hydrogen sensors are slow to respond in high-temperature, multi-component ammonia cracking environments, are not resistant to high temperatures, and are easily affected by environmental interference. Traditional TDLAS technology has large measurement deviations and high costs when measuring low-concentration ammonia, and it is difficult to achieve simultaneous measurement of ammonia and hydrogen.
An ammonia-hydrogen co-measurement device based on the gas broadening effect is adopted, including an optical detection system and a monitoring system. It uses a near-infrared laser and a pre-trained deep learning model to analyze absorption spectrum data, detects the concentration of ammonia and hydrogen through an optical fiber gas chamber and a photodetector, and achieves real-time monitoring by combining a sub-controller and a main controller.
While reducing equipment costs, the system enables simultaneous ammonia and hydrogen measurement, improving the accuracy and real-time performance of ammonia and hydrogen concentration monitoring. It is suitable for high-temperature multi-component ammonia cracking environments.
Smart Images

Figure CN122487285A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning-assisted technology, and in particular to a device and method for simultaneous ammonia and hydrogen measurement based on the gas broadening effect in industrial ammonia cracking. Background Technology
[0002] In related technologies, real-time and accurate monitoring of ammonia and hydrogen concentrations is crucial for reaction control, catalyst efficiency assessment, and energy management during industrial ammonia cracking. Real-time ammonia concentration monitoring allows for understanding current cracking rates and other parameters, enabling appropriate adjustments to catalyst temperature, inlet space velocity, and other necessary parameters. Hydrogen, however, inhibits the forward reaction in ammonia cracking; excessive hydrogen concentration without proper removal negatively impacts cracking efficiency and hydrogen production rates. Therefore, simultaneous monitoring of ammonia and hydrogen concentrations is of significant importance in practical production.
[0003] Currently common hydrogen sensors (such as thermal conductivity detectors (TCD) and electrochemical sensors) suffer from problems such as slow response speed, poor high temperature resistance, and susceptibility to environmental interference, making it difficult to operate stably in the high-temperature, multi-component, and dynamically changing ammonia cracking environment.
[0004] Tunable diode laser absorption spectroscopy (TDLAS), as a novel laser detection technology, can be used to directly measure ammonia. However, in actual ammonia cracking, the background gas is usually binary or even multi-component. Traditional TDLAS measurements of ammonia are calibrated based on a single component (nitrogen) as the background gas. When other gases are added, the broadening effects of different gases vary, especially at low concentrations of ammonia, leading to significant deviations in the measurement results. Furthermore, the traditional Voigt spectral fitting method is computationally complex and sensitive to noise, making it difficult to achieve real-time, high-precision simultaneous detection of two components. Although ammonia and hydrogen have independent absorption peaks in the mid-infrared band (4700-4719 cm⁻¹), the extremely weak absorption signal of hydrogen and the higher cost of mid-infrared lasers and laser controllers compared to near-infrared lasers prevent the simultaneous measurement of ammonia and hydrogen in actual ammonia cracking.
[0005] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0006] The main objective of this application is to propose an ammonia-hydrogen co-measurement device and method based on the gas broadening effect in industrial ammonia cracking, which can achieve the function of ammonia-hydrogen co-measurement while effectively reducing equipment costs.
[0007] To achieve the above objectives, one aspect of this application proposes an ammonia-hydrogen co-measurement device based on the gas broadening effect in industrial ammonia cracking, the device comprising: An optical detection system includes a sub-controller, a near-infrared laser, a fiber optic gas cell, and a photodetector. The fiber optic gas cell receives the reaction gas output from the ammonia catalytic cracking system. The laser output from the near-infrared laser is coupled into the fiber optic gas cell via an optical fiber, where it interacts with the reaction gas and detects the absorption spectrum data under different ammonia concentrations and different ammonia-to-hydrogen ratios. The photodetector detects the transmitted light signal from the fiber optic gas cell. The sub-controller adjusts the operating state of the near-infrared laser based on the transmitted light signal. The monitoring system includes a main controller, which pre-stores a real-time detection program. The real-time monitoring program analyzes the collision broadening effect of the absorption spectrum data based on a pre-trained deep learning model to obtain the ammonia and hydrogen concentrations in the reaction gas. Among them, the transition collision broadening of ammonia gas in the reaction mixture during the ammonia cracking process in the ammonia catalytic cracking system. It is a linear superposition of the contributions from each component in a reaction mixture composed of ammonia, hydrogen, or nitrogen, satisfying the following formula: ; In the formula, X NH 3. X H 2 and X N 2 represents the concentrations of ammonia, hydrogen, and nitrogen, respectively. X NH 3+ X H 2+ X N 2 = 1; 2 γ NH 3 -NH 3 represents the broadening factor for ammonia-ammonia collisions; 2 γ NH 3 -H 2 and 2 γ NH 3 -N 2 represents the external broadening coefficient caused by the collisions of ammonia with hydrogen and nitrogen disturbances, respectively.
[0008] In some embodiments, the near-infrared laser is a near-infrared distributed feedback semiconductor laser with a center wavelength of 1512 nm.
[0009] In some embodiments, the optical path length of the optical fiber air cell is 9.64 cm.
[0010] In some embodiments, the pre-trained deep learning model is used to obtain ammonia and hydrogen concentrations based on inverse mapping of absorption spectral data; The output formula of the pre-trained deep learning model is as follows: ; In the formula, Y=[ X NH 3, X H 2] represents the output vector. X NH 3 indicates the ammonia concentration. X H 2 represents the hydrogen concentration; W represents the trainable weights and configuration information; This represents absorption spectral data.
[0011] In some embodiments, the pre-trained deep learning model includes a spectral input layer, a deep learning feature extraction layer, and a multi-output regression head; the deep learning feature extraction layer includes a multilayer perceptron, a convolutional neural network, or a neural network based on a self-attention mechanism. The spectral input layer is used to input absorption spectral data into the deep learning feature extraction layer; The deep learning feature extraction layer is used to analyze the collision broadening effect of the absorption spectral data to obtain the ammonia and hydrogen concentrations in the reaction gas. The multi-output return head is used to output the ammonia concentration and hydrogen concentration respectively.
[0012] In some embodiments, the multilayer perceptron includes an input layer, a first linear projection layer, a plurality of cascaded residual blocks, a shared connection layer, and a second linear projection layer connected in sequence; each residual block includes a main transformation path and a jump path, the main transformation path including a first-layer normalization module, an activation function, a Dropout layer, a linear layer, and a second-layer normalization module connected in sequence; The main transformation path is responsible for learning the residual mapping and outputting the transformation result; the jump path directly passes the input to the summing node and combines it with the transformation result to form the residual result.
[0013] In some embodiments, the convolutional neural network comprises three convolutional modules connected in series, each of which includes five cascaded convolutional blocks.
[0014] In some embodiments, the self-attention-based neural network includes two cascaded encoders, each of which integrates a multi-head attention mechanism, a position feedforward network, and a residual block.
[0015] To achieve the above objectives, another aspect of this application proposes a method for simultaneous ammonia and hydrogen measurement based on the gas broadening effect in industrial ammonia cracking. This method is applied to the monitoring system of the device and includes the following steps: Acquire absorption spectrum data detected by a near-infrared laser; The collision broadening effect of the absorption spectral data was analyzed based on a pre-trained deep learning model to obtain the concentrations of ammonia and hydrogen in the reactant gas.
[0016] To achieve the above objectives, another aspect of the present application provides a computer device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described above.
[0017] The embodiments of this application include at least the following beneficial effects: This application provides a device and method for simultaneous ammonia and hydrogen measurement based on the gas broadening effect in industrial ammonia cracking. This scheme involves setting up an optical detection system and a monitoring system. The optical detection system includes a sub-controller, a near-infrared laser, a fiber optic gas chamber, and a photodetector. The fiber optic gas chamber receives the reaction gas output from the ammonia catalytic cracking system. The laser output from the near-infrared laser is coupled into the fiber optic gas chamber via an optical fiber, where it undergoes light absorption with the reaction gas, and the absorption spectrum data at different ammonia concentrations and ammonia-to-hydrogen ratios are detected. Simultaneously, after the photodetector detects the transmitted light signal from the fiber optic gas chamber, the sub-controller adjusts the operating state of the near-infrared laser based on the transmitted light signal to improve its operational stability. Then, by pre-storing a real-time detection program in the main controller of the monitoring system, the real-time monitoring program is executed to analyze the collision broadening effect of the absorption spectrum data using a pre-trained deep learning model to obtain the ammonia and hydrogen concentrations in the reaction gas. This allows for simultaneous ammonia and hydrogen measurement while effectively reducing equipment costs. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of a module of an ammonia-hydrogen co-measurement device based on the gas broadening effect in industrial ammonia cracking provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the pre-trained deep learning model provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the multilayer sensor provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the convolutional neural network provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the neural network with the self-attention mechanism provided in the embodiments of this application; Figure 6 This is a schematic diagram of the spectral absorption curves of 4% ammonia and 96% nitrogen, and 4% ammonia and 96% hydrogen provided in the embodiments of this application; Figure 7This is a schematic diagram of the spectral absorption curves of 12% ammonia and 88% nitrogen, and 12% ammonia and 88% hydrogen provided in the embodiments of this application; Figure 8 This is a schematic diagram of the spectral absorption curves of 20% ammonia and 80% nitrogen, and 20% ammonia and 80% hydrogen provided in the embodiments of this application; Figure 9 This is a schematic diagram of the spectral absorption curves of 40% ammonia and 60% nitrogen, and 40% ammonia and 60% hydrogen provided in the embodiments of this application; Figure 10 This is a schematic diagram of the spectral absorption curves of 60% ammonia and 40% nitrogen, and 60% ammonia and 40% hydrogen provided in the embodiments of this application; Figure 11 This is a schematic diagram of the spectral absorption curves of 80% ammonia and 20% nitrogen, and 80% ammonia and 20% hydrogen provided in the embodiments of this application; Figure 12 This is a schematic diagram illustrating the performance of the three models provided in this application embodiment on the test set; Figure 13 This is a schematic diagram illustrating the performance testing of the three models provided in the embodiments of this application in NH3; Figure 14 This is a schematic diagram illustrating the performance testing of the three models provided in this application embodiment in H2. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0020] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0021] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0023] In related technologies, real-time and accurate monitoring of ammonia and hydrogen concentrations is crucial for reaction control, catalyst efficiency assessment, and energy management during industrial ammonia cracking. Real-time ammonia concentration monitoring allows for understanding current cracking rates and other parameters, enabling appropriate adjustments to catalyst temperature, inlet space velocity, and other necessary parameters. Hydrogen, however, inhibits the forward reaction in ammonia cracking; excessive hydrogen concentration without proper removal negatively impacts cracking efficiency and hydrogen production rates. Therefore, simultaneous monitoring of ammonia and hydrogen concentrations is of significant importance in practical production.
[0024] Currently common hydrogen sensors (such as thermal conductivity detectors (TCD) and electrochemical sensors) suffer from problems such as slow response speed, poor high temperature resistance, and susceptibility to environmental interference, making it difficult to operate stably in the high-temperature, multi-component, and dynamically changing ammonia cracking environment.
[0025] Tunable diode laser absorption spectroscopy (TDLAS), as a novel laser detection technology, can be used to directly measure ammonia. However, in actual ammonia cracking, the background gas is usually binary or even multi-component. Traditional TDLAS measurements of ammonia are calibrated based on a single component (nitrogen) as the background gas. When other gases are added, the broadening effects of different gases vary, especially at low concentrations of ammonia, leading to significant deviations in the measurement results. Furthermore, the traditional Voigt spectral fitting method is computationally complex and sensitive to noise, making it difficult to achieve real-time, high-precision simultaneous detection of two components. Although ammonia and hydrogen have independent absorption peaks in the mid-infrared band (4700-4719 cm⁻¹), the extremely weak absorption signal of hydrogen and the higher cost of mid-infrared lasers and laser controllers compared to near-infrared lasers prevent the simultaneous measurement of ammonia and hydrogen in actual ammonia cracking.
[0026] In view of this, the embodiments of this application provide an ammonia-hydrogen co-measurement device and method based on the gas broadening effect in industrial ammonia cracking, which can realize the function of ammonia-hydrogen co-measurement while effectively reducing equipment costs.
[0027] The embodiments of this application will be described in detail below with reference to the accompanying drawings: Reference Figure 1This application provides an ammonia-hydrogen co-measurement device based on the gas broadening effect in industrial ammonia cracking. The device includes an optical detection system and a monitoring system. The optical detection system includes a sub-controller, a near-infrared laser, a fiber optic chamber, and a photodetector. The fiber optic chamber receives the reaction gas output from the ammonia catalytic cracking system. The laser output from the near-infrared laser is coupled into the fiber optic chamber via an optical fiber, where it interacts with the reaction gas and detects the absorption spectrum data at different ammonia concentrations and ammonia-hydrogen ratios. The photodetector detects the transmitted light signal from the fiber optic chamber. The sub-controller adjusts the operating state of the near-infrared laser based on the transmitted light signal. The monitoring system includes a main controller, which pre-stores a real-time detection program. The real-time monitoring program analyzes the collision broadening effect of the absorption spectrum data using a pre-trained deep learning model to obtain the ammonia and hydrogen concentrations in the reaction gas.
[0028] It is understood that the near-infrared laser in this embodiment is a near-infrared distributed feedback (DFB) semiconductor laser with a center wavelength of 1512 nm, coupled to a fiber optic gas cell with an optical path length of 9.64 cm. Specifically, the sub-controller in this embodiment can use a high-precision laser controller (current 0~200 mA, temperature control accuracy 0.001°C, root mean square noise less than 1.1 mA, long-term drift suppression better than 0.002°C) to perform current and temperature stabilization control on the near-infrared laser, so that the near-infrared laser covers the target absorption spectrum using a triangular wave scanning method. The transmitted light signal is received by an InGaAs photodetector and acquired in real time by a 16-bit data acquisition card.
[0029] It is understood that the ammonia catalytic cracking system in this embodiment includes a high-temperature cracking furnace, a catalytic reaction chamber, and a gas supply and metering unit. Specifically, this embodiment uses a vertical high-temperature tubular furnace (Hefei Kejing, OTF-1200X-S-VT), which can stably heat within the range of 300–1100°C, with a hot zone diameter of 200 mm. The temperature control accuracy is ±1.0°C, meeting the requirements for high-temperature ammonia cracking and precise temperature control. The gas delivery system uses a mass flow controller (Qixing, D07-19B) with an accuracy of ±1% of full scale and a repeatability of ±0.2% of full scale. To support training data calibration and enable stepped switching of different gas space-time velocities (GHSVs) during experiments, this embodiment uses multiple mass flow controllers (MFCs) connected in parallel across different flow ranges: three for NH3 (flow rates of 200 mL min⁻¹, 1 L min⁻¹, and 5 L min⁻¹), two for N₂ (flow rates of 250 mL min⁻¹ and 2 L min⁻¹), and two for H₂ (flow rates of 200 mL min⁻¹ and 1 L min⁻¹). This multi-flow-range parallel configuration provides a highly flexible gas mixing platform, ensuring precise and stable composition control over a wide dynamic range of NH₃ and H₂ concentrations.
[0030] During the measurement process, ammonia and carrier gas are precisely metered using a mass flow controller and introduced into the reaction chamber. Inside the reaction chamber, NH3 undergoes controlled catalytic decomposition at a preset temperature to produce H2, and N2 may also be generated. The reaction gases are extracted using a constant flow sampling system and introduced into the fiber optic gas chamber, enabling time-resolved measurements of NH3 and H2 concentrations simultaneously during the cracking process. The apparatus in this embodiment exhibits good operational stability and contamination resistance, and provides powerful optical diagnostic capabilities for in-situ studies of ammonia cracking kinetics.
[0031] In this embodiment, the transition collision broadening of ammonia gas in the reaction mixture during the ammonia cracking process in the reaction chamber of the ammonia catalytic cracking system is described. It is a linear superposition of the contributions from each component in a reaction mixture composed of ammonia, hydrogen, or nitrogen, satisfying the following formula: ; In the formula, X NH 3. X H 2 and X N 2 represents the concentrations of ammonia, hydrogen, and nitrogen, respectively. X NH 3+ X H 2+X N 2 = 1; 2 γ NH 3 -NH 3 represents the broadening factor for ammonia-ammonia collisions; 2 γ NH 3 -H 2 and 2 γ NH 3 -N 2 represents the external broadening factor caused by the collisions of ammonia with hydrogen and nitrogen disturbances, respectively; P represents the calculation formula for the transition broadening corresponding to ammonia. The broadening factor in this embodiment is related to pressure and temperature.
[0032] It is understood that the pre-trained deep learning model in this embodiment is used to obtain ammonia and hydrogen concentrations based on the inverse mapping of absorption spectral data. The output formula of the pre-trained deep learning model is as follows: ; In the formula, Y=[ X NH 3, X H 2] represents the output vector. X NH 3 indicates the ammonia concentration. X H 2 represents the hydrogen concentration; W represents the trainable weights and configuration information; This represents absorption spectral data.
[0033] The trainable weights and configuration information can be determined by training and optimizing on a comprehensive synthetic dataset covering various concentration combinations, allowing the deep learning model to implicitly capture the complex correlation between spectral line shape and gas composition, thereby avoiding explicit calculation of spectral broadening and integral absorbance under complex gas compositions.
[0034] Therefore, this embodiment does not iteratively solve the inverse problem, but instead reformulates the concentration inversion as a data-driven regression task, which can effectively improve the accuracy of the measurement.
[0035] It is understandable that, such as Figure 2As shown, the pre-trained deep learning model includes a spectral input layer (InputSpectrum), a deep-learning feature extraction layer (Deep-learning Model), and dual output regression heads (Dual OutputHeads). The deep-learning feature extraction layer includes a multilayer perceptron (MLP), a convolutional neural network (CNN), or a neural network based on a self-attention mechanism (Transformer). Specifically, the spectral input layer is used to input absorption spectral data into the deep-learning feature extraction layer; the deep-learning feature extraction layer is used to analyze the collision broadening effect of the absorption spectral data to obtain the ammonia and hydrogen concentrations in the reactant gas; the dual output regression heads are used to output the ammonia and hydrogen concentrations respectively. In this embodiment, the multispectral profile is first converted into high-dimensional features, and then these features are decoupled into two independent regression branches for simultaneously predicting the concentrations of NH3 and H2.
[0036] It is understandable that, such as Figure 3 As shown, the multilayer perceptron in this embodiment includes an input layer (InputVector), a first linear projection layer (Linear Projection), multiple cascaded residual blocks (Residual Blocks), a shared connected layer (Shared FC), and a second linear projection layer (Linear Projection) connected in sequence. Each residual block includes a main transformation path and a skip path. The main transformation path includes a first layer normalization module (LayerNorm), an activation function (Linear), a Dropout layer, a linear layer, and a second layer normalization module (LayerNorm) connected in sequence. The main transformation path is responsible for learning the residual mapping Φ(x) and outputting the transformation result; the skip path directly passes the input to the summing node and combines it with the transformation result to form the residual result. The expression for the final output y of the multilayer perceptron in this embodiment is as follows: ; In the formula, σ represents the GELU activation function.
[0037] The multilayer perceptron architecture in this embodiment facilitates a seamless flow of gradients during backpropagation, enabling the training of deeper networks than traditional multilayer perceptrons (MLPs). Physically, this allows the model to preferentially capture key spectral features related to NH3 concentration through skip connections, while residual paths fine-tune subtle changes in spectral line broadening caused by H2, thus achieving high-fidelity feature decoupling.
[0038] It is understandable that, such as Figure 4As shown, the convolutional neural network in this embodiment consists of three cascaded convolutional modules (Conv1D Layers), each of which includes five cascaded convolutional blocks (ConvBlocks) for hierarchical feature extraction. Specifically, as the network depth increases, the number of feature channels gradually increases from 32 to 256, while the temporal dimension of the spectrum is halved through a max-pooling layer. Subsequently, the deep feature maps are converted into vectors through a flattening layer and then compressed and reconstructed via a shared fully connected layer (FC layer, 768→512). Finally, these high-level semantic features are input into a bi-headed regression branch to simultaneously extract the concentrations of NH3 and H2.
[0039] Specifically, within each convolutional block, the 1D convolutional layer uses a sliding window to capture the local absorbance gradient. The feature map of layer 1, Ci, is derived as follows: ; In the formula, φ represents the convolution operator, and φ represents the ReLU activation function.
[0040] To standardize the feature distribution and suppress noise interference caused by baseline drift, batch normalization (BN) was performed before activation. Max pooling (kernel size = 2, stride = 2) was employed to reduce data dimensionality and alleviate overfitting while preserving significant spectral features. Furthermore, fully connected layers (FC layers) act as a bridge between local and global features, integrating distributed information to extract high-order correlations representing gas concentration and cross-species interference.
[0041] It is understandable that, such as Figure 5 As shown, the neural network based on the self-attention mechanism in this embodiment includes two cascaded encoders (Encoder Block 1 and Encoder Block 2), each integrating a multi-head attention (MHSA) mechanism, a position feedforward network (FFN), and a residual block. Specifically, the self-attention mechanism is crucial for capturing the "spectral fingerprint." After layer normalization, the input feature X is projected into the query matrix (Q), the key matrix (K), and the value matrix (V). By calculating the dot product of Q and K, the model quantifies the correlation strength (attention score) between any two wavelength coordinates in the spectrum. This enables the model to transcend the spatial distance limitations in the spectral domain and identify the complex association between the NH3 absorption spectrum and the H2-induced broadening effect. The mathematical expression of this mechanism is as follows: ; In the formula, dk represents the scaling factor, and softmax represents the normalized exponential function.
[0042] Following the attention layer, a feedforward neural network (FFN, consisting of two fully connected layers and a GELU activation function) performs non-linear transformations and feature enhancement: ; In the formula, σ represents the GELU function, W1 and W2 are the weight matrices of the first and second layers, respectively, and b1 and b2 represent the corresponding bias vectors.
[0043] Furthermore, consistent with the Residual Multilayer Perceptron (Res-MLP) model in the embodiments, residual connections are introduced between sub-layers to ensure lossless propagation of the original spectral information and maintain gradient stability throughout the deep architecture.
[0044] It is understandable that the three types of deep learning models mentioned above can be trained based on a training set. The data in the training set includes spectral resolution absorption characteristic curves for different concentration ratios and their corresponding ratios (curves for some ratios are shown in the image). Figure 6 , Figure 7 , Figure 8 , Figure 9 , Figure 10 and Figure 11 As shown in the figure, this curve data is used to characterize the absorption spectrum of different NH3 concentrations near 1512 nm under the corresponding background gas environment. The corresponding spectral profile can be obtained from the curve, that is, the corresponding broadening change can be obtained. Through these training sets, the deep learning model can learn the ratio of ammonia, hydrogen and nitrogen in the broadening effect under the corresponding wavelength and light absorbance relationship, and then obtain the corresponding ammonia concentration and hydrogen concentration.
[0045] After the three models described in this application embodiment have been trained on the training set, their performance will be tested on the test set. Specifically, as follows... Figure 12 As shown, the MLP model's prediction performance for NH3 is acceptable within the concentration range of 1%–70%, but its performance degrades at higher concentrations. For H2 prediction, significant biases were observed in the low and medium concentration regions, especially at 30%. For NH3, although there were slight fluctuations at high concentrations, the CNN maintained high accuracy within the key concentration range of 1%–60%. Given that ammonia cracking primarily requires stability within the low to medium concentration range, the CNN is well-suited for this task. In H2 prediction, the Convolutional Neural Network (CNN) outperformed the Multilayer Perceptron (MLP), exhibiting only slight bias in the low concentration range of 1–5%. The Transformer model achieved superior prediction performance across the entire concentration range for both gases. Compared to MLP and CNN, the Transformer model significantly improved prediction accuracy in the high-concentration NH3 region and demonstrated a reliable ability to invert H2 concentration trends.
[0046] Therefore, the overall performance hierarchy of the three models is: Transformer > CNN > MLP. While both CNN and Transformer architectures achieve good results in simultaneously predicting ammonia and hydrogen, Transformer, leveraging its global attention mechanism, exhibits superior stability and accuracy across the entire concentration range of both gases. In-depth analysis of specific model characteristics reveals the unique advantages inherent in each architecture. CNN's convolutional structure excels at capturing local spectral broadening and subtle linear variations. By effectively extracting local differences in spectral lineshapes, CNN can effectively distinguish background gas interference, explaining its robust performance in hydrogen prediction. Conversely, Transformer's self-attention mechanism dynamically evaluates the importance of different segments in the input sequence, thus better modeling the inherent long-range dependencies in the spectral signal. This capability enhances the model's robustness to noise and baseline drift, making it outstanding in ammonia concentration inversion and establishing it as the leading architecture in overall system performance.
[0047] To further quantitatively evaluate the actual performance of the three models in this application's embodiments, the mean absolute error (MAE) and coefficient of determination (R²) were used as the main evaluation metrics. MAE is a widely used metric and loss function in regression analysis; it quantifies the average absolute difference between predicted and observed values, thus reflecting the average magnitude of the prediction error. Notably, MAE is more robust than mean squared error (MSE) or root mean square error (RMSE), and is particularly suitable for datasets susceptible to outliers. As a supplement, R² is a statistical metric measuring the goodness of fit of the model; it represents the proportion of the variance of the dependent variable that the independent variables in the model can explain.
[0048] from Figure 13 and Figure 14The linear regression analysis results of the MLP, CNN, and Transformer models between predicted and actual values are shown. In NH3 prediction, the MLP model has an R² of 0.9986 and an MAE of 1.176%. CNN improves these metrics to an R² of 0.9995 and an MAE of 0.438%, while the Transformer has an R² of 0.9999 and an MAE of 0.035%. All three architectures have a coefficient of determination exceeding 0.998, indicating that the deep learning strategies used for NH3 detection have good linear responses. However, although MLP exhibits significant bias in high-concentration regions, CNN shows a significant improvement in accuracy. The Transformer achieves a near-perfect fit, highlighting its superior accuracy across the entire concentration range. In H2 prediction, the MLP model has an R² of 0.9972 and an MAE of 1.828%. The CNN and Transformer models performed comparably, with the CNN achieving an R² value of 0.9995 (MAE = 0.332%) and the Transformer achieving an R² value of 0.9996 (MAE = 0.259%). The MLP model exhibited significant bias in the low concentration range, while both the CNN and Transformer models demonstrated similar high performance across the entire concentration range, showing excellent fitting. In summary, the Transformer model achieved the best overall performance in both prediction tasks. Its accuracy in NH3 concentration retrieval was particularly outstanding (MAE < 0.04%), further validating the advantages of its self-attention mechanism in handling global spectral dependence and reducing noise interference. The CNN model performed almost identically to the Transformer model in H2 prediction, validating the effectiveness of its convolutional structure in extracting local spectral features. Its reliability in ammonia prediction was also confirmed.
[0049] Therefore, in the application of this embodiment, one of the three models mentioned above can be selected, or a combination of two or three models can be selected for concentration prediction. When making predictions using a combination of two or three models, this embodiment can predict the final concentration result by combining multiple calculation results (e.g., averaging), thereby effectively improving the accuracy of concentration prediction.
[0050] As can be seen from the above, the device in this application embodiment collects spectral data through a designated device, and analyzes the collision broadening effect of the absorption spectral data based on a pre-trained deep learning model, thereby obtaining the concentrations of ammonia and hydrogen in the reaction gas. This allows for the simultaneous measurement of ammonia and hydrogen while effectively reducing equipment costs.
[0051] This application also provides a method for simultaneous measurement of ammonia and hydrogen based on the gas broadening effect in industrial ammonia cracking. The method is applied to the monitoring system of the device and includes the following steps: Acquire absorption spectrum data detected by a near-infrared laser; The collision broadening effect of the absorption spectral data was analyzed based on a pre-trained deep learning model to obtain the concentrations of ammonia and hydrogen in the reactant gas.
[0052] It is understood that the contents of the above device embodiments are all applicable to the present method embodiments. The specific functions implemented in the present method embodiments are the same as those in the above device embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0053] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0054] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0055] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0056] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0057] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0058] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0059] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0060] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0061] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0062] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0063] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0064] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0065] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0066] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0067] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0068] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0070] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A device for simultaneous measurement of ammonia and hydrogen based on the gas-broadening effect in industrial ammonia cracking, characterized in that, The device includes: An optical detection system includes a sub-controller, a near-infrared laser, a fiber optic gas chamber, and a photodetector. The fiber optic gas chamber receives the reaction gas output from the ammonia catalytic cracking system. The laser output from the near-infrared laser is coupled into the fiber optic gas chamber via an optical fiber, where it interacts with the reaction gas and detects the absorption spectrum data under different ammonia concentrations and different ammonia-to-hydrogen ratios. The photodetector detects the transmitted light signal from the fiber optic gas chamber. The sub-controller adjusts the operating state of the near-infrared laser based on the transmitted light signal. A monitoring system includes a main controller pre-stored with a real-time detection program. This real-time monitoring program analyzes the collision broadening effect of the absorption spectrum data based on a pre-trained deep learning model to obtain the ammonia and hydrogen concentrations in the reaction gas. The transition collisional broadening of ammonia gas in the reaction mixture in the ammonia catalytic cracking system corresponds to is a linear superposition of each component in the reaction mixture consisting of ammonia, hydrogen or nitrogen, and satisfies the following formula: ; In the formula, X NH 3. X H 2 and X N 2 represents the concentrations of ammonia, hydrogen, and nitrogen, respectively. X NH 3+ X H 2+ X N 2 = 1; 2 γ NH 3 -NH 3 represents the broadening factor for ammonia-ammonia collisions; 2 γ NH 3 -H 2 and 2 γ NH 3 -N 2 represents the external broadening coefficient caused by the collisions of ammonia with hydrogen and nitrogen disturbances, respectively.
2. The apparatus according to claim 1, characterized in that, The near-infrared laser is a near-infrared distributed feedback semiconductor laser with a center wavelength of 1512nm.
3. The apparatus according to claim 1, characterized in that, The optical path length of the fiber optic air cell is 9.64 cm.
4. The apparatus according to claim 1, characterized in that, The pre-trained deep learning model is used to obtain ammonia and hydrogen concentrations based on inverse mapping of absorption spectral data. The output formula of the pre-trained deep learning model is as follows: ; In the formula, Y=[ X NH 3, X H 2] represents the output vector. X NH 3 indicates the ammonia concentration. X H 2 represents the hydrogen concentration; W represents the trainable weights and configuration information; This represents absorption spectral data.
5. The apparatus according to claim 1, characterized in that, The pre-trained deep learning model includes a spectral input layer, a deep learning feature extraction layer, and a multi-output regression head; the deep learning feature extraction layer includes a multilayer perceptron, a convolutional neural network, or a neural network based on a self-attention mechanism. The spectral input layer is used to input absorption spectral data into the deep learning feature extraction layer; The deep learning feature extraction layer is used to analyze the collision broadening effect of the absorption spectral data to obtain the ammonia and hydrogen concentrations in the reaction gas. The multi-output return head is used to output the ammonia concentration and hydrogen concentration respectively.
6. The apparatus according to claim 5, characterized in that, The multilayer perceptron includes an input layer, a first linear projection layer, multiple cascaded residual blocks, a shared connection layer, and a second linear projection layer connected in sequence; each residual block includes a main transformation path and a jump path, and the main transformation path includes a first-layer normalization module, an activation function, a Dropout layer, a linear layer, and a second-layer normalization module connected in sequence. The main transformation path is responsible for learning the residual mapping and outputting the transformation result; the jump path directly passes the input to the summing node and combines it with the transformation result to form the residual result.
7. The apparatus according to claim 5, characterized in that, The convolutional neural network consists of three cascaded convolutional modules, each of which includes five cascaded convolutional blocks.
8. The apparatus according to claim 5, characterized in that, The neural network based on the self-attention mechanism includes two cascaded encoders, each of which integrates a multi-head attention mechanism, a position feedforward network, and a residual block.
9. A method for simultaneous determination of ammonia and hydrogen based on gas broadening effect in industrial ammonia cracking, characterized in that, The method is applied to the monitoring system of the device according to any one of claims 1-8, and the method includes the following steps: Acquire absorption spectrum data detected by a near-infrared laser; The collision broadening effect of the absorption spectral data was analyzed based on a pre-trained deep learning model to obtain the concentrations of ammonia and hydrogen in the reactant gas.
10. A computer device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in claim 9.