Prediction of CH4 concentration in biogas based on support vector machine

Publisher:温文儒雅Latest update time:2012-11-30 Source: 21IC Keywords:SVM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Based on different working principles, the existing CH4 concentration detection methods mainly include: Ostwald gas detection method, catalytic combustion method, and infrared spectroscopy detection method. At present, the infrared multi-wavelength method is more commonly used to predict the CH4 concentration in biogas. However, this method will also bring new problems. For example: when detecting the CH4 concentration in biogas, the high amount of CO2 in the biogas will affect the output of the CH4 channel and the reference channel, thereby affecting the prediction accuracy of CH4. Therefore, this article discusses the use of data processing methods to improve the prediction accuracy of CH1 concentration.

At present, the commonly used CH4 concentration prediction algorithms include linear interpolation, multiple regression, and neural network (NN). Among them, linear interpolation and multiple regression are traditional algorithms with low accuracy; neural networks require a large number of samples to fit a better model and are prone to fall into local minimum points. The support vector machine (SVM) discussed in this paper specifically solves the small sample problem and seeks the global optimal solution based on the principle of minimizing structural risk.

When predicting the CH4 concentration in biogas, this paper attempts for the first time to use temperature as an important factor affecting the detector output. A temperature chamber is introduced to control the ambient temperature of the detector to obtain 693 samples at different temperatures. The temperature and the detector output are used as the input of SVM to establish a CH4 prediction model and obtain ideal prediction accuracy.

1 Introduction to Support Vector Machine

SVM is a machine learning method that greatly improves the generalization ability of the learning machine based on the principle of structural risk minimization. It transforms the optimization problem into a convex quadratic programming problem. The solution obtained by the quadratic programming is unique and globally optimal, so there is no local extreme value problem of general neural networks.

Regression support vector machine (SVR) is the application of support vector machine in regression learning. Its basic idea is: for a given training sample point {(x1, y1), (x2, y2), ..., (xn, yn)}, a function f(x) is regressed through SVR training, so that the output value of each input sample obtained by the function and the target value corresponding to the input sample do not differ by more than the error e, and the regressed function is as smooth as possible, which can overcome the shortcomings of low prediction accuracy of traditional linear interpolation and multivariate regression methods, solve the impact of high concentration CO2 on the output of CH4 channel and reference channel, and has better generalization ability than NN. In addition, temperature has a certain influence on the output of gas detectors. This paper studies the use of temperature as one of the inputs of the model, and the voltage output of the multi-channel detector as the input of SVM to achieve CH4 concentration prediction.

2. Acquisition of experimental data

2.1 System structure and infrared multi-wavelength detection

The hardware system structure is shown in Figure 1. After the high-pressure standard gas CH4 in the cylinder is reduced in pressure by the pressure reducing valve, it flows to the flow meter 1 in the gas distribution box through the gas pipeline. The gas distribution box further controls and measures the flow rate of the gas in the flow meter 1 through its own computer software. After flowing out of the gas distribution box, it is mixed with CO2 and N2 (dilution effect, non-heteronuclear molecules, and little effect on the CH4 channel) passing through flow meters 2 and 3 in a fixed ratio, and then enters the incubator. The biogas detection circuit board in the incubator includes a multi-channel detector (CH4, CO2), reference end) and the corresponding signal processing circuit. After passing through the detection gas chamber, the gas is discharged to the fume hood.

The above-mentioned biogas detection is based on the principle of infrared absorption, as shown in FIG2 .

Gases with heteronuclear molecular structures (molecules composed of different types of chemical atoms) have selective absorption characteristics for infrared rays in the mid-infrared band. The characteristic absorption peak wavelengths of CH4 are 3.32μm and CO2 are 4.24μm. The front ends of the CH4 and CO2 channels of the detector are equipped with filters for the characteristic absorption of CH4 and CO2, respectively. The detector outputs a voltage after receiving infrared radiation. The greater the gas concentration during detection, the stronger the absorption of infrared light of its characteristic wavelength, and the smaller the corresponding detection voltage. The infrared photons that can pass through the reference end filter are almost not absorbed by the gas, which can best reflect the light source information and the pollution of the gas chamber. In practice, the filter of the detector is limited by the process, and the skirt of its transmission spectrum cannot completely avoid the cross-sensitive area of ​​the two gas absorption zones. Therefore, when the gas concentration is high, interference problems will occur. For example, the characteristic absorption peak wavelength of CH4 in Figure 2 is 3.32μm, but there is also absorption between 4.2 and 4.4μm. This paper uses SVM to solve this cross-interference problem.

2.2 Experimental data acquisition process

(1) Assemble the experimental system according to the structure in Figure 1;

(2) Set the incubator temperature to T1 and wait for 2 hours to allow the temperature to remain constant;

(3) Set the flow rates of the three flow meters to 0, open the host computer data acquisition software, and prepare for data acquisition;

(4) Open the pressure reducing valve of the gas cylinder to allow the gas to flow out;

(5) According to the gas concentration Ci to be configured, set the flow rate of flow meters 1, 2, and 3 respectively; when the sensor output is stable, obtain the output values ​​of CH4, CO2, and the reference end and save them;

(6) The calibration range of CH4 concentration is 0% to 100% (0%, 1%, 2%, ..., 100%, a total of 19 calibration points), and CO2 is 0% to 100% (0%, 0.5%, 1%, ..., 100%, a total of 23 calibration points). During the actual calibration, first fix the CH4 concentration and continuously change the CO2 concentration to obtain a set of measurement values; then change the CH4 concentration to another fixed value, and then continuously change the CO2 concentration to obtain another set of measurement values; repeat (5) to collect the detector output values ​​of different gas concentration combinations;

(7) Change the incubator temperature Ti, repeat (2) to (6), and obtain data at different temperatures.

Through the above data collection process, 693 sets of test data at 0℃, 25℃, 40℃, and 50℃ were finally obtained to prepare for SVR. The experimental data are shown in Table 1. The U1, U2, and Ur rows represent the A/D values ​​of CH4, CO2, and the reference end, respectively.

3 CH4 concentration prediction algorithm based on SVM

3.1 Establishment of SVM prediction model

From the above analysis, we can see that the reference end (Ref detection end) can best reflect the light source information; U1/Ur, U2/Ur can better reflect the degree of absorption of CH4 and CO2 to their characteristic photons compared with U1 and U2; for the same component of biogas mixture, when the temperature is different, the outputs of several channels of the sensor are not in the same number domain. In view of the fact that SVM is good at solving small sample and nonlinear problems and has good generalization ability, the temperature T, U1/Ur, U2/Ur are used as the three-dimensional input of the support vector machine to establish the SVM prediction block diagram of CH4 concentration, as shown in Figure 3. The output of SVM is the predicted value of CH4 concentration.

Common kernel functions of SVM include polynomial, radial basis function (RBF), Sigmoid, etc. Among them, Gauss radial basis function can better simulate the characteristic information of spectral signal such as spectral peak, so RBF kernel function is selected. The parameters of SVM are σ2 and γ. If σ2 is too large, the model will converge prematurely; γ controls the degree of punishment for samples that exceed the error. (σ2, γ) is selected by repeated trials. After the model is established, T, U1/Ur, and U2/Ur of the test sample are substituted into the model for calculation, and the model prediction value is compared with the experimental calibration value until the model prediction accuracy requirements are met. This paper finally determines σ2=10 000 and γ=1.

3.2 Results and Analysis

Among the 693 samples obtained, 543 were randomly selected as training samples and 150 as test samples. The proposed method was compared with several methods including Linear Interpolation (LI), Multiple Regression (MR), BP neural network, RBF neural network, and SVM-noT without temperature as input. The specific methods are as follows:

(1) Linear interpolation method: Based on the known points (x01, y01), (x02, y02), …, (xon, y0n), a y = A x model (A is the coefficient matrix) is established according to the spatial linear relationship to solve for y11, y12, …, y1n corresponding to x11, x12, …, x1n;

(2) Polynomial regression method: Based on the known points (x01, y01), (x02, y02), ..., (x0n, y0n), a polynomial model y = f(x) is established according to the least squares principle, and then y11, y12, ..., y1n corresponding to x11, x12, ..., x1n are solved;

(3) BP neural network method: A multi-layer forward neural network based on the error back propagation algorithm is used to establish the input and output model of known samples. In this paper, the BP neural network model is established with temperature T, U1/Ur, and U2/Ur as input and the predicted concentration of CH4 as output;

(4) RBF neural network method: a type of forward neural network based on function approximation theory and with radial basis function as the transfer function, which can fit the best model in multidimensional space. In this paper, the RBF neural network model is established with temperature T, U1/Ur, U2/Ur as input and the predicted concentration of CH4 as output;

(5) SVM-noT method: The influence of temperature factor is not considered. That is, the “temperature T” input at the front end of the “SVM module” in FIG3 is removed, and only the two-element inputs U1/Ur and U2/Ur are retained to establish the input and output model.

During the test, x1j is used as the input of the model established by the above five methods, and the output is the predicted concentration of CH4, which can verify the accuracy of these models. The vector xij=[T, U1/Ur, U2/Ur], i=0,1;j=1,2,…,n;x0j is the training sample, x1j is the test sample,

To predict the concentration. When comparing the SVM method considering temperature in this paper with the first five methods, the maximum absolute error and the absolute average error of the prediction results are used for comparison. The simulation results of the six methods are shown in Figure 4.

As can be seen from the figure: SVM is better than MR, RBF, BP, LI and SVM-not methods, with the smallest error and the best prediction accuracy. The kernel function of the SVM model can better simulate the characteristic information such as the spectral peak of the spectral signal, fully consider the impact of other components in biogas on the CH4 channel output, and achieve better nonlinear mapping of U1/Ur, U2/Ur, temperature T to CH4 concentration values, and has better generalization ability.

4 Conclusion

Aiming at the problem of predicting CH4 concentration in biogas, an experimental system was built, a large amount of experimental data was obtained, and a method of predicting CH4 concentration by taking temperature T, the output of CH4 and CO2 detectors as the input of SVM was discussed. This method was compared with the five commonly used methods of LI, MR, BP, RBF, and SVM-noT. The experimental results show that the proposed method has high prediction accuracy and provides a good idea for predicting CH4 concentration in biogas.

Keywords:SVM Reference address:Prediction of CH4 concentration in biogas based on support vector machine

Previous article:Comparison and analysis of exploratory testing and manual testing
Next article:Linear prediction and its implementation in Matlab

Recommended ReadingLatest update time:2024-11-16 15:04

Design of MRS signal acquisition module based on orthogonal vector amplification ---- Hardware design of acquisition module (Part 2)
4.3 Phase-locked loop circuit 4.3.1 Design ideas of frequency doubling circuit One cycle of the sine wave stored in the CPLD's FLASH is output with 256 points, and the frequency of the sine wave is required to be adjustable within the range of 1300Hz to 3000Hz with a step size of 0.1Hz. This requires the clock fre
[Test Measurement]
Design of MRS signal acquisition module based on orthogonal vector amplification ---- Hardware design of acquisition module (Part 2)
NEC Yamanashi MR and Renesas MCU Smart Water Meter Solution
The development of water meters has a history of nearly 200 years. In the early stage, water meters from countries such as Britain, France, Japan and Germany have always occupied the Chinese water meter industry for a long time. With the development of urban water supply, China's water meter industry has also develope
[Microcontroller]
NEC Yamanashi MR and Renesas MCU Smart Water Meter Solution
Design of MRS signal acquisition module based on orthogonal vector amplification ---- Hardware design of acquisition module (I)
Chapter 4: Acquisition Module Hardware Design 4.1 Power supply and ground part The NMR water detector is powered by two 12V batteries. The power input of this module is 24V. The design requires analog ±5V, digital +5V and digital +3.3V, so a DC-DC module is needed for level conversion. The circuit diagram is shown
[Test Measurement]
Design of MRS signal acquisition module based on orthogonal vector amplification ---- Hardware design of acquisition module (I)
Design of UPS based on MR16 single chip microcomputer
This paper introduces a fully digital UPS design method based on Motorala single chip microcomputer MR16. A prototype is made according to the design idea and good experimental results are obtained. 1 Main circuit design The main circuit of the system mainly includes three parts: battery, inverter circuit
[Power Management]
Design of UPS based on MR16 single chip microcomputer
TPS92560 High Transformer Compatibility MR16/AR111 LED Spotlight Driver Power Solution
summary     As a replacement lamp, the M16/AR111 LED spotlight must meet the requirements of high efficiency, reliability and economy, and its driver power design must also be compatible with the electronic transformer in the original MR16/AR111 halogen lamp power supply architecture. This article first starts with
[Power Management]
TPS92560 High Transformer Compatibility MR16/AR111 LED Spotlight Driver Power Solution
A new generation of memory is showing its strength. MRAM opens the next wave of storage
Currently, several chip manufacturers are working on developing a new generation of memory technology called STT-MRAM, but this technology still faces many challenges in its manufacturing and testing. STT-MRAM (also known as spin transfer torque MRAM technology) has gained market attention for combining the characteri
[Mobile phone portable]
A new generation of memory is showing its strength. MRAM opens the next wave of storage
MiR AMR deployment safety guide creates a safer new era of human-machine collaboration in intralogistics
Mobile Industrial Robots (MiR), Denmark’s fastest growing robot manufacturer and global market leader in mobile robots, has released a white paper titled “Safety Guidelines for Mobile Robot Deployment”, which provides forward-looking guidance for the safe use of autonomous mobile robots in multiple fields. This also h
[Internet of Things]
MiR AMR deployment safety guide creates a safer new era of human-machine collaboration in intralogistics
Electronic compass based on AMR magnetoresistive sensor and acceleration sensor
The function of the vehicle electronic compass is to help users determine the direction of the vehicle, accurately display the azimuth angle and provide correct operating instructions. Therefore, the accuracy of navigation has become an important indicator to measure the performance of the system. Th
[Industrial Control]
Electronic compass based on AMR magnetoresistive sensor and acceleration sensor
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号