Ammonia nitrogen prediction method based on flow signals in jet impaction-negative pressure reactor

By building an LSTM-Wavelet model in a jet impingement-negative pressure reactor and using intelligent algorithms to process flow signals, the problems of low efficiency and high cost of traditional deamination devices have been solved, efficient prediction and control of ammonia nitrogen wastewater has been achieved, and deamination has been improved. efficiency and model performance.

CN117056731BActive Publication Date: 2024-09-27CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311165556.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2024-09-27
Estimated Expiration
2043-09-11

AI Technical Summary

Technical Problem

Traditional circulating biological deamination devices have problems of low efficiency and high operating costs in identifying fluid flow characteristics and regulating parameters, mainly due to insufficient nonlinear coupling and monitoring and control capabilities for complex flows.

Method used

Design a method for predicting ammonia nitrogen based on jet impact-flow signals in negative pressure reactors. By building a data collection device, using the Wavelet algorithm for data preprocessing, and building an LSTM-Wavelet model, combined with the PyTorch framework and PyQt5, the ammonia nitrogen wastewater fluid treatment is realized. An integrated front-end and back-end software program that uses intelligent algorithms and sensor technology for signal processing and prediction.

Benefits of technology

It significantly improves the experimental efficiency, enhances the accuracy of feature analysis, improves deamination efficiency, and achieves efficient prediction and control of ammonia nitrogen wastewater. It has high practical value, and the robustness and robustness of the model are improved through data enhancement technology. Generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117056731B
    Figure CN117056731B
Patent Text Reader

Abstract

The present invention relates to the technical field of deammonification equipment, and in particular to a method for predicting ammonia nitrogen based on a flow signal in a jet impact-negative pressure reactor. The steps are as follows: S1: construct a data collection device for detecting a jet impact negative pressure flash device; S2: initialize the data collection device; S3: collect data through the data collection device, and pre-process the data collected by the data collection device through the Wavelet algorithm; S4: build an LSTM-Wavelet model through the PyTorch framework. The present invention provides a method for predicting ammonia nitrogen based on a flow signal in a jet impact-negative pressure reactor, which determines whether the parameter library has completed initialization by judging the status of the parameter library table module through the acquisition parameter module, and feeds back abnormal information to the terminal for testing and adjustment; traverses the parameters, copies the parameter library data to the memory address provided by the main calling function, and realizes the parameter acquisition function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of deammonification equipment, and in particular to an ammonia nitrogen prediction method based on flow signals in a jet impact-negative pressure reactor. Background Art

[0002] The jet impact-negative pressure reactor is a highly efficient gas-liquid separation technology without internal components. However, due to the nonlinear coupling of complex flows, flow feature identification and parameter control are quite difficult. With the continuous development of computing power and corresponding algorithms, the cross-research of signal processing and fluid dynamics simulation has shown strong advantages in simulating the transient behavior of fluids and the processing of mutual reactions. For this reason, it is proposed to use signal processing technologies such as FrFT and EMD to study the nonlinear behavior of fluid flow, explore fluid dynamics phenomena, analyze internal signals of fluids, and obtain fluid flow characteristics through signal processing technology; traditional cyclic biological deammonification devices are limited by the ability to accurately monitor and control various factors, resulting in low efficiency and high operating costs;

[0003] To this end, we designed an ammonia nitrogen prediction method based on the flow signal in a jet impact-negative pressure reactor to provide another technical solution to the above technical problems. Summary of the invention

[0004] Based on this, it is necessary to provide an ammonia nitrogen prediction method based on the flow signal in a jet impact-negative pressure reactor to address the above technical problems and solve the technical problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A method for predicting ammonia nitrogen based on flow signals in a jet impact-negative pressure reactor, the steps are as follows:

[0007] S1: Construction of data collection device for detecting jet impact negative pressure flash device;

[0008] S2: Initialize the data collection device;

[0009] S3: collecting data through a data collection device, and preprocessing the data collected by the data collection device through a Wavelet algorithm;

[0010] S4: Build the LSTM-Wavelet model using the PyTorch framework.

[0011] As a preferred implementation of the ammonia nitrogen prediction method based on the flow signal in the jet impact-negative pressure reactor provided by the present invention, in the step S1, the data collection device collects and monitors the attributes of different unit variables of the impact device in real time, and forms a training set with the data parameters.

[0012] As a preferred implementation of the ammonia nitrogen prediction method based on flow signals in a jet impact-negative pressure reactor provided by the present invention, in the step S1, the data collection device includes at least a negative pressure sensor, an ammonia nitrogen sensor and an ultrasonic flow meter.

[0013] As a preferred implementation of the ammonia nitrogen prediction method based on flow signals in a jet impact-negative pressure reactor provided by the present invention, in the step S2, the data collection device is initialized, and the steps are as follows:

[0014] Initialize the parameter library in the data collection device through the deinitialization module;

[0015] Determine whether the parameter library has been initialized by the status of the parameter library table module;

[0016] Feedback abnormal information during the initialization process to the terminal.

[0017] As a preferred implementation of the ammonia nitrogen prediction method based on the flow signal in the jet impact-negative pressure reactor provided by the present invention, the deinitialization module includes a reset parameter module, which is used to reset the buffer and module identifier, and rewrite the original parameters into the parameter library to achieve the reset of the parameter library.

[0018] As a preferred implementation of the ammonia nitrogen prediction method based on the flow signal in the jet impact-negative pressure reactor provided by the present invention, in the step S3, the data collected by the data collection device is preprocessed by the Wavelet algorithm, including data cleaning, normalization, and wavelet transform.

[0019] As a preferred implementation of the ammonia nitrogen prediction method based on the flow signal in the jet impact-negative pressure reactor provided by the present invention, in the S4 step, a model is constructed and an LSTM-Wavelet model is built, including setting the input data and the dimension of the intermediate hidden layer, defining the loss function of the model, selecting an optimizer, and setting the learning rate.

[0020] As a preferred implementation of the ammonia nitrogen prediction method based on the flow signal in the jet impact-negative pressure reactor provided by the present invention, the original training data file is read, the training data is read out, the data is Z-Score standardized, and after being processed into a tensor form, the processed data and its label are stored;

[0021] Let the model load the processed data and train the model.

[0022] It can be seen without a doubt that the above-mentioned technical solution of the present application can definitely solve the technical problem to be solved by the present application.

[0023] At the same time, through the above technical solutions, the present invention has at least the following beneficial effects:

[0024] The present invention provides an ammonia nitrogen prediction method based on a flow signal in a jet impact-negative pressure reactor. The parameter acquisition module determines whether the parameter library has completed initialization by judging the state of the parameter library table module, and feeds back abnormal information to the terminal, which is convenient for testing and adjustment; the parameters are traversed, and the parameter library data is copied to the memory address provided by the main calling function to realize the parameter acquisition function;

[0025] By using different algorithms to process the data collected by the intelligent device, such as EMD, FRFT, Wavelet, etc., the preprocessing step of the collected signal can significantly improve the experimental efficiency and enhance the accuracy of feature analysis;

[0026] By implementing the LSTM-Wavelet front-end and back-end integrated software program for ammonia nitrogen wastewater fluid treatment based on PyQt5, the prediction and control of ammonia nitrogen wastewater can be realized, which has high practical value; the device uses intelligent algorithms and sensor technology, proposes an LSTM-WT framework mechanism, and captures the identification information of long- and short-cycle ammonium eradication rates through the DL algorithm of the linked learning module for analysis, thereby improving the highly nonlinear and non-stationary ammonia removal efficiency at different stages; in the verification and optimization of the data, the robustness and generalization ability of the model are improved through data enhancement technology and increasing the diversity of training data. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0028] Figure 1 It is a schematic diagram of the overall design architecture of the device of the present invention;

[0029] Figure 2 It is a schematic diagram of the main program flow of the present invention;

[0030] Figure 3 This is a schematic diagram of the init initialization IPO of the present invention;

[0031] Figure 4 It is the memory distribution diagram of the present invention;

[0032] Figure 5 It is the init initialization program flow chart of the present invention;

[0033] Figure 6A flowchart of the program for realizing the mutual exclusion lock function of the present invention;

[0034] Figure 7 It is a schematic diagram of the parameter library design process of the present invention;

[0035] Figure 8 It is a logic diagram of the process flow in the numerical Fourier transform domain of the present invention;

[0036] Fig. 9 It is a logic diagram of the fractional Fourier transform process of the present invention;

[0037] Fig.10 It is a schematic diagram of the wavelet transform denoising process of the present invention;

[0038] Fig.11 This is a schematic diagram of initializing training data of the present invention;

[0039] Fig.12 It is a flow chart of the training data initialization program of the present invention;

[0040] Fig.13 This is a schematic diagram of model data initialization of the present invention;

[0041] Fig.14 It is a flow chart of the training data initialization program of the present invention;

[0042] Fig.15 This is a schematic diagram of initializing training data of the present invention;

[0043] Fig.16 This is a flow chart of the model training program of the present invention;

[0044] Fig.17 It is the VMD process logic diagram of the present invention;

[0045] Fig.18 It is a schematic diagram of the host computer Qt software design architecture of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0047] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.

[0048] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0049] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0050] Reference Figure 1-Figure 18 , an ammonia nitrogen prediction method based on flow signals in a jet impact-negative pressure reactor.

[0051] Build a data collection device to detect jet impact negative pressure flash device, Figure 1 This is a schematic diagram of the overall structure of the device. By configuring the MCU and hardware board-end sensors, including the design and configuration of negative pressure sensors, ammonia nitrogen sensors, and ultrasonic flow meters, the variable attributes of each unit of the impact device are collected and monitored in real time. After storing a certain amount of data, the obtained parameters are formed into a training set of a certain scale, which is put into the LSTM-Wavelet model for training. After evaluating and analyzing the obtained deammonification prediction results, the better model is retained. The above is regarded as a single model analysis;

[0052] Equipment initialization is the basis for the operation of intelligent device systems, such as flash, circuit clock, LED flashing lights, etc., to ensure that each part of the equipment has completed initialization and operates normally.

[0053] The initialization module mainly implements the functions of initializing mutex locks, allocating buffer memory, obtaining parameter library status, reading parameter data, and resetting parameter library. Ensure that the parameter library is initialized to ensure normal use of functions in subsequent program flows. The initialization task judges whether the function is executed normally by the value of the expression of the called function to the calling function. After the parameter table is initialized, other modules can schedule memory and use API interfaces normally. Repeated initialization of the parameter library is not supported.

[0054] This part of the program implements some codes for initializing the parameter library table. The purpose is to ensure that the initialized parameter library can be used normally in the subsequent program flow. This program is a branch program in the main program. Its main task is to allocate and manage memory. In embedded systems, memory resources are very limited. Therefore, in order to effectively manage memory resources in program design, this part is placed in the initial paragraph of the main program. It is also the basis for the subsequent function functions to operate on the parameter library. Set the type of mutex lock, apply for buffer memory, copy parameter data to the file, and determine whether the parameter library is reset to zero based on the status of the parameter library table. The IPO processing output diagram is as follows Figure 2 shown.

[0055] Get the lock of the allocation area to prevent multi-thread conflicts. Calculate the actual size of the memory buf that needs to be allocated. For memory management based on the stack, the minimum unit is sizeof(system_sys_info_t) is 12 bytes. For each unit of memory, apply for it. The data adaptability is wide, and memory can be accurately applied / released. The memory layout is as follows Figure 3 shown.

[0056] The program flow logic of the initialization process is as follows Figure 5 As shown. The CPU boot ROM size is 32KB, the RAM space is 256KB, and the address space occupied is 0xff400000~0xff43ffff, which is the CPU internal space. It is used as the storage space for the kernel, stack, mapping, etc. during initialization. Only the CPU can access it, but the AXE cannot access it. The AXE boot ROM size is 16KB, the RAM space is 32KB, and the address space occupied is 0xff400000~0xff407fff, which is the AXE internal address space. Only the AXE can access it, but the CPU cannot access it. The CPU / AXE can access all peripheral modules. The general usage method is that the AXE processor runs operating systems such as LINUX / VxWorks in DDR, and the CPU runs real-time tasks, which can run in the on-chip 256KB RAM or in DDR.

[0057] After the chip is powered on, the startup process is as follows:

[0058] 1. The CPU's ROM program starts executing by reading the first instruction from address 0xfffffffc and reading register 0x60000200bootsel, which indicates the status of the boot selection pins {EMB_AD1, EMB_AD0}. (A) If it is 0, it boots from the parallel port NORFLASH. (B) If it is 1, it boots from the NAND FLASH with a page size of 2KB. (C) If it is 3, it boots from the NAND FLASH with a page size of 4KB. (D) If it is 2, first configure PSC0 to work in SPI mode and read the ID of SPI FLASH. If the ID is not 0 or 0XFF, it boots from SPI FLASH. Otherwise, it enters the BOOT minishell command line. In the minishell command line, use the xl ff410000 command to download the program to SRAM for execution. The SRAM space from 0xff400000 to 0xff410000 is used by BOOTROM and cannot be downloaded directly to 0xff400000. Booting from the parallel port NOR FLASH / NAND FLASH / SPIFLASH, the CPU reads the boot program from FLASH to SRAM 0xff410000. The boot program size is 4KB, and then jumps to SRAM to start executing the 4KB boot initialization program.

[0059] 2. The startup initialization program generally includes initializing the clock, initializing DDR, SD card, reading parameter library data, etc., and then reading the high real-time application to SRAM / DDR, generally SRAM, such as 0xff400000. The program generally should not exceed 64KB. If it exceeds 64KB, it is best to go to DDR and jump to SRAM to start executing the high real-time application. At this time, the CPU enters the normal state and the startup process is completed.

[0060] 3. After initializing the peripherals, the CPU high real-time application reads the AXE application in FLASH to DDR. Generally, the AXE application is VxWorks / Linux, etc. After reading, the register 0x6000_0000+0x160*4AXE_START_ADDR is set as the first address of the AXE application in DDR. When the AXE processor ROM program detects that the register address is not 0, it immediately jumps to the address and starts execution. When the chip is reset, the register is 0, and the AXE ROM program has been looping to detect whether the register is 0. At this point, the AXE program is started.

[0061] The deinitialization module mainly realizes the functions of changing the parameter library status symbol, closing the parameter library file, releasing the parameter library cache space, and destroying the mutex lock. Ensure that the parameter library has been deinitialized, ensure that the program runs normally after the parameter library module ends, reduce the memory occupancy, and improve the product operation performance.

[0062] The function of the reset parameter module is mainly to reset the buffer and module identifier and rewrite the original parameters into the parameter library. This function mainly realizes the reset function of the parameter library to prevent the device from running normally after the user misoperates.

[0063] The core of the parameter acquisition module is to provide the function of obtaining parameter library data. This module determines whether the parameter library has completed initialization by judging the status of the parameter library table module, and feeds back abnormal information to the terminal for easy testing and adjustment. Traverse the parameters and copy the parameter library data to the memory address provided by the main calling function to realize the parameter acquisition function. In program design, it is very important to ensure the accuracy and stability of data flow. In the case of concurrent mechanism, there are multiple threads operating the parameter library table at the same time. The principle is as follows Figure 8 As shown. In order to prevent simultaneous operation of critical data and protect the accuracy of parameter operation, in this part of the code, the thread program design mainly uses mutex locks, which are protected by pthread_mutex mutex locks to ensure program atomicity. The mutex lock function table is shown in Table 3. A program may have multiple operations, but only one operation can be executed at the same time. Take the two operations of setData and getData as examples. If the setData function part is executed, the getData function part cannot be executed. Similarly, if the getData function part is executed, the setData function part cannot be executed. The program flow is as follows Figure 5 shown.

[0064] Table 1 Function correspondence table

[0065]

[0066] The core of the parameter setting module is the control unit. The implementation of the control unit mainly relies on the water pipe solenoid valve. This part can change the parameters by switching the water pipe solenoid valve, so the control unit can be used to set the required parameters, and then perform subsequent operations. Using the synchronous refresh mechanism, by calling the lseek() function, the pointer is moved to the file header, and then write() is used to write to the memory block. The lseek() description and write() writing process are shown in Table 2 and Figure 6 shown.

[0067] Table 2 Parameter design data

[0068]

[0069] After the device is powered on, it first reads the configuration information stored in the SD card, configures the parameters, such as the initial flow rate, pipeline flow, negative pressure value, etc., and reads the previously saved ammonia nitrogen wastewater deammoniation amount, deammonification efficiency, etc. According to the current parameter settings, the values ​​are synchronized to the SD card configuration file for storage to form a log file.

[0070] The data collected by the intelligent device is processed using different algorithms, such as EMD, FRFT, Wavelet, etc. The module's preprocessing steps for the collected signals can significantly improve the experimental efficiency and enhance the accuracy of feature analysis.

[0071] Traditional Fourier transform is a standard and powerful tool for analyzing and processing stationary signals, but it is ineffective for processing and analyzing time-varying non-stationary signals. Fractional Fourier transform (FRFT) is based on the characteristic function and eigenvalue of Fourier transform. FRFT can rotate the time-frequency plane, and this change will show all the characteristics of the signal in the time domain and frequency domain. The main work of this part of the program is to analyze the received flow signal and then take corresponding actions.

[0072] Fourier transform is to change the viewing angle from time domain to frequency domain. Fractional Fourier transform is to rotate the coordinate axis of the time-frequency plane from the perspective of viewing the time-frequency plane, and then observe the signal information from the perspective of the frequency domain. The emergence of fractional Fourier transform enriches the concepts of time domain and frequency domain. With the time in the time domain as the x-axis and the frequency in the frequency domain as the y-axis, we can draw the time-frequency domain plane, that is, the fractional Fourier domain, such as Figure 8 shown.

[0073] Wavelet transform is a signal time-scale (time-frequency) analysis method. It has the characteristics of multi-resolution analysis and the ability to characterize the local characteristics of the signal in both the time and frequency domains. It is a time-frequency localization analysis method with a fixed window size but a changeable shape, and both the time window and the frequency window can be changed. That is, it has a lower time resolution and a higher frequency resolution in the low-frequency part, and a higher time resolution and a lower frequency resolution in the high-frequency part. It is very suitable for analyzing non-stationary signals and extracting local characteristics of signals, so wavelet transform is known as a microscope for analyzing and processing signals. The main work of this part of the program is to use wavelet transform to analyze the collected flow signal and then take corresponding actions.

[0074] By reading the original training data file, the training data is read out, the data is Z-Score standardized, and after processing into tensor form, the processed data and its labels are stored in the .plk file respectively, which is convenient for subsequent models to read, such as Fig.12 .

[0075] The input functions of the training data initialization process of the input model are relatively limited, among which the parameter description and function description of the inputData() function are shown in Table 3.

[0076] Table 3 InputData() Input Item Description

[0077]

[0078]

[0079] The output function of the training data initialization process of the input model is saveData(), which mainly stores the processed tensor data, as shown in Table 4.

[0080] Table 4 Description of saveData() output items

[0081]

[0082] Fig.13 The program implements the construction of the entire model, including the construction of the LSTM model, the selection of loss function and optimizer, the setting of learning rate, the flow of data, the input data, the dimension setting of the intermediate hidden layer, etc.

[0083] Build the entire model, build the LSTM-Wavelet model, set the input data and the dimensions of the intermediate hidden layer, define the loss function of the model, select the optimizer, and set the learning rate settings.

[0084] Fig.13 The input functions are relatively limited, among which the parameter description and function description of the MyNetworks() function are shown in Table 5.

[0085] Table 5 Parameter description and function description

[0086]

[0087]

[0088] By reading the original training data file, customizing the relevant parameters of the model, passing the parameters into the previously built model, loading the previously processed data, training the model, saving the model after every 500 training steps, and finally verifying the saved model on the test set.

[0089] Fig.15 The input functions are relatively limited, among which the parameter description and function description of the MyTrain() function are shown in Table 6.

[0090] Table 6 Functional description of MyTrain() function

[0091]

[0092] The fluctuation signal generated during the fluid flow process is contaminated by random noise. For such signals, the high-frequency IMF obtained after EMD decomposition is often considered to be noise, and it is generally believed that the influence of noise in the low-frequency IMF can be ignored. Many existing denoising methods discard high-frequency IMFs and reconstruct them with the remaining IMFs. However, the number of discarded high-frequency components is an important factor affecting the denoising effect. Too many will lose effective signals and cause signal distortion, while too few will not result in obvious denoising effects, which is not conducive to extracting effective signals. Therefore, it is necessary to correctly judge the noise layer IMF and transition layer IMF and perform corresponding processing.

[0093] The variational mode decomposition is used to suppress the modal aliasing phenomenon of the EMD method (avoiding aliasing by controlling the bandwidth). Different from the EMD principle, the VMD decomposition method uses iterative search for the optimal solution of the variational model to determine the center frequency and bandwidth of each decomposed component. It is a completely non-recursive model. The model searches for a set of modal components and their respective center frequencies, and each mode is smooth after demodulation to the baseband. Konstantin Dragomiretskiy proved through experimental results that this method is more robust in terms of sampling and noise. The VMD method has high feature extraction accuracy and reliability, and has good noise resistance. In the process of fluid flow, extremely complex turbulence is often presented, which adds a lot of difficulty to previous data analysis. The fluid flow eigensignal decomposed by VMD signal can linearly describe the fluid activity in the reaction, which improves the reliability of data analysis research.

[0094] LSTM-Wavelet is a deep learning algorithm for time series prediction. It combines the advantages of LSTM neural network and wavelet analysis, and can effectively model and predict time series data. In response to the needs of ammonia nitrogen wastewater fluid treatment, PyQt5 is used to implement a front-end and back-end integrated software program, which can be operated through a graphical interface to achieve prediction and control of ammonia nitrogen wastewater fluid treatment.

[0095] The front-end interface of the software program can be implemented using the GUI library of PyQt5, including interface design and user interaction. Users can input relevant parameters of ammonia nitrogen wastewater through the interface, such as flow rate, temperature, pH value, etc., and then click the "Predict" button to make a prediction. The program will automatically call the LSTM-Wavelet algorithm to process and predict the data, and display the results on the interface. In addition, control parameters can be set through the interface, such as adding the dosage of chemical agents, adjusting the stirring speed, etc., to achieve control of the ammonia nitrogen wastewater fluid treatment process.

[0096] The backend implementation of the software program can use Python language and PyTorch deep learning framework to implement LSTM-Wavelet algorithm. The specific implementation process includes steps such as data preprocessing, model training and prediction. First, the historical data of ammonia nitrogen wastewater needs to be preprocessed, including data cleaning, normalization, wavelet transform, etc., to facilitate model training and prediction. Then, the LSTM-Wavelet model can be built using PyTorch framework and trained with historical data. Finally, the model can be used to predict new ammonia nitrogen wastewater data and return the results to the front-end interface.

[0097] Table 7 Functional description

[0098]

[0099] Among them, the load data() function is used to load the ammonia nitrogen wastewater fluid data from the data source, and the preprocess_data() function is used to preprocess the data, including data cleaning and normalization. The split data() function divides the data into a training set and a test set for model training and testing. The build model() function is used to build the LSTM-Wavelet model, the train model() function is used to train the model, and the evaluate model() function is used to evaluate the performance of the model. Finally, the predict() function is used to predict the new ammonia nitrogen wastewater fluid data.

[0100] The above interface functions will be integrated into a front-end and back-end integrated software, and users can complete the processing and prediction of ammonia nitrogen wastewater fluid data through simple operations.

[0101] When used, LSTM-Wavelet is a deep learning algorithm for time series prediction, which combines the advantages of LSTM neural network and wavelet analysis, and can effectively model and predict time series data. In response to the needs of ammonia nitrogen wastewater fluid treatment, we can use PyQt5 to implement a front-end and back-end integrated software program, which can be operated through a graphical interface to achieve prediction and control of ammonia nitrogen wastewater fluid treatment.

[0102] The front-end interface of the software program can be implemented using the GUI library of PyQt5, including interface design and user interaction. Users can input relevant parameters of ammonia nitrogen wastewater through the interface, such as flow rate, temperature, pH value, etc., and then click the "Predict" button to make a prediction. The program will automatically call the LSTM-Wavelet algorithm to process and predict the data, and display the results on the interface. In addition, control parameters can be set through the interface, such as adding the dosage of chemical agents, adjusting the stirring speed, etc., to achieve control of the ammonia nitrogen wastewater fluid treatment process.

[0103] The backend implementation of the software program can use Python language and PyTorch deep learning framework to implement LSTM-Wavelet algorithm. The specific implementation process includes steps such as data preprocessing, model training and prediction. First, the historical data of ammonia nitrogen wastewater needs to be preprocessed, including data cleaning, normalization, wavelet transform, etc., to facilitate model training and prediction. Then, the LSTM-Wavelet model can be built using PyTorch framework and trained with historical data. Finally, the model can be used to predict new ammonia nitrogen wastewater data and return the results to the front-end interface.

[0104] The device uses intelligent algorithms and sensor technology, proposes an LSTM-WT framework mechanism, and captures the identification information of long- and short-cycle ammonium root removal rates through the DL algorithm of the linked learning module for analysis, thereby improving the highly nonlinear and non-stationary deammonification efficiency at different stages. In the verification and optimization of data, the robustness and generalization ability of the model are improved through data enhancement technology and increased training data diversity. During the training process, these enhanced data are used to train the model to achieve better deammonification effects. In practice, the ammonia nitrogen removal rate of wastewater can reach 99.95% after the device runs for 12 hours.

[0105] In summary, the front-end and back-end integrated software program for ammonia nitrogen wastewater fluid treatment based on LSTM-Wavelet implemented based on PyQt5 can realize the prediction and control of ammonia nitrogen wastewater, which has high practical value.

[0106] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for predicting ammonia nitrogen based on flow signals in a jet impact-negative pressure reactor, characterized in that: Here are the steps: S1: Construct a data collection device to detect the jet impact negative pressure flash device; S2: Initialize the data collection device; S3: collecting data through a data collection device, and preprocessing the data collected by the data collection device through a Wavelet algorithm; S4: Build LSTM-Wavelet model using PyTorch framework; In the step S1, the data collection device collects and monitors the variable attributes of different units of the impact device in real time, and forms a training set with the data parameters; By configuring the MCU and hardware board sensors, including the design and configuration of negative pressure sensors, ammonia nitrogen sensors, and ultrasonic flow meters, the variable attributes of each unit of the impact device are collected and monitored in real time. After storing a certain amount of data, the obtained parameters are formed into a training set of a certain measure; In the step S4, a model is constructed to build an LSTM-Wavelet model, including setting the input data, the dimension of the intermediate hidden layer, defining the loss function of the model, selecting an optimizer, and setting the learning rate; Read the original training data file, read out the training data, perform Z-Score standardization on the data, process it into tensor form, and store the processed data and its labels; Let the model load the processed data and train the model; Use the PyTorch framework to build the LSTM-Wavelet model and train it with historical data; finally, use the LSTM-Wavelet model to predict the new ammonia nitrogen wastewater data and return the results to the front-end interface.

2. The method for predicting ammonia nitrogen based on flow signals in a jet impact-negative pressure reactor according to claim 1, characterized in that: In the step S1, the data collection device includes at least a negative pressure sensor, an ammonia nitrogen sensor and an ultrasonic flow meter.

3. The method for predicting ammonia nitrogen based on flow signals in a jet impact-negative pressure reactor according to claim 1, characterized in that: In step S2, the data collection device is initialized, and the steps are as follows: Initialize the parameter library in the data collection device through the deinitialization module; Determine whether the parameter library has been initialized by the status of the parameter library table module; The deinitialization module is used to change the parameter library status symbol, close the parameter library file, release the parameter library cache space, and destroy the mutex lock; Feedback abnormal information during the initialization process to the terminal.

4. The method for predicting ammonia nitrogen based on flow signals in a jet impact-negative pressure reactor according to claim 3, characterized in that: The deinitialization module includes a parameter reset module, which is used to reset the buffer and module identifier, rewrite the original parameters into the parameter library, and realize the reset of the parameter library.