Mixed gas response prediction and concentration detection method based on equivalent circuit model

Through the method based on the equivalent circuit model, combined with parameter correlation iteration and Kalman filtering, the problems of large data volume and high computational complexity of the mixed gas concentration detection model in the prior art are solved, and concentration detection with high accuracy and low computational complexity are achieved.

CN119905167AActive Publication Date: 2025-04-29UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510103606.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-04-29
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

In the prior art, the mixed gas concentration detection model requires a large amount of sample data and high computational complexity, making it difficult to achieve accurate concentration detection.

Method used

Using an equivalent circuit model based on the equivalent circuit model, the mixed gas response prediction and concentration detection are achieved by constructing an equivalent circuit model of the gas sensor array, combining parameter correlation iteration and Kalman filtering.

Benefits of technology

The requirement for sample data volume is reduced, the accuracy of detection is improved, and it can expand linearly with the increase in sensor array size, with lower computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119905167A_ABST
    Figure CN119905167A_ABST
Patent Text Reader

Abstract

The invention discloses a mixed gas response prediction and concentration detection method based on an equivalent circuit model, belongs to the technical field of mixed gas concentration detection, and particularly relates to a state variable equation of gas sensor response models of different gas types by constructing the equivalent circuit model of a gas sensor array. The parameter matrix is processed by combining parameter correlation iteration and Kalman filtering, due to the symmetry of the equivalent circuit model, the input and output ports of the mixed gas concentration measurement model and the gas sensor response model are consistent, and then the mixed gas concentration measurement model of the same gas type is determined according to the parameter matrix of the gas sensor response model; the accurate detection of the corresponding gas concentration in the mixed gas is realized; meanwhile, the obtained gas sensor response model can realize response prediction of mixed gas with known gas concentration. According to the method, a large number of data samples are not needed, a sample set can be expanded through arrangement, recombination and splicing, the calculation complexity is low, and linear expansion can be achieved along with increase of the size of a gas sensor array.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of mixed gas concentration detection, and in particular relates to a mixed gas response prediction and concentration detection method based on an equivalent circuit model. Background Art

[0002] Electronic noses can quickly respond to the types and concentration levels of mixed gas components and are widely used in industrial production, agricultural product storage, environmental testing and other fields. The chemical adsorption process of sensitive materials in gas sensors on different components of mixed gases determines the selectivity of gas sensors, causing the gas sensors to respond to other components of the mixed gas, i.e., cross-effects. Due to the existence of cross-effects, electronic noses cannot accurately detect the concentration levels of these components.

[0003] At present, the steps to establish a mixed gas concentration detection model mainly include: discovering state variables from dynamic data, extracting gas sensor features, and establishing nonlinear equations for dynamic processes. Nonlinear methods, such as kernel transformation, Koopman operator, and neural network, can transform low-dimensional space data into high-dimensional space. One way is to expand to infinite-dimensional space through Gaussian kernel or polynomial operator, and then use singular value decomposition, intrinsic orthogonal decomposition, and principal component analysis to map data to a lower-dimensional state variable space under certain accuracy constraints. Another way is to expand to higher-dimensional data through neural networks, and determine the state variable space after extracting features such as autoencoder networks, deep belief networks, and convolutional neural networks. However, such methods require more sample data and higher computational complexity. Summary of the invention

[0004] In response to the problems of large sample data volume and high computational complexity in the above-mentioned existing nonlinear methods, the present invention provides a mixed gas response prediction and concentration detection method based on an equivalent circuit model, which utilizes parameter association iteration and Kalman filtering to achieve sensor response prediction and accurate concentration detection of mixed gases. As a linear method, it requires relatively small sample data and can be linearly expanded as the size of the sensor array increases.

[0005] The technical solution adopted by the present invention is as follows:

[0006] A mixed gas response prediction and concentration detection method based on an equivalent circuit model comprises the following steps:

[0007] S1. Using a gas sensor array to test multiple groups of mixed gases with different concentrations introduced in sequence, the mixed gas includes M gas categories, the gas sensor array is composed of M sensors corresponding to each gas category, and the mth, m=1, 2, ..., Mth gas category corresponds to the mth sensor;

[0008] For each group of mixed gases introduced, each sensor in the gas sensor array collects corresponding response data to form an M-dimensional array response vector. The concentration of each gas in the mixed gas forms an M-dimensional mixed gas concentration vector. A sample point is formed by the mixed gas concentration vector and the corresponding array response vector. Sample points corresponding to multiple groups of mixed gases form a sample set S.

[0009] S2, the sample set S is repeatedly arranged, reorganized and spliced ​​to obtain an expanded sample set, and its mixed gas concentration vector and array response vector are subjected to maximum and minimum normalization processing to obtain a processed sample set S';

[0010] S3, constructing an equivalent circuit model of the gas sensor array, including gas sensor models of M different gas categories and a cross-impact part model;

[0011] The mth gas sensor model consists of a constant test current I connected in parallel m (t),m=1,2,...,M, circuit part, input i m (t), m=1,2,...,M and output voltage V m (t), m=1,2,...,M, the circuit part consists of the first resistor R m1 ,m=1,2,...,M, the second resistor R m2 ,m=1,2,...,M, the third resistor R m3 ,m=1,2,...,M, first capacitor C m1 ,m=1,2,...,M and the second capacitor C m2 ,m=1,2,...,M; where t is the gas sensor array test time of the sample point; R m3 With C m2 In parallel, one end of the parallel connection is connected to R m2 The first end is connected in series, and the other end is connected in parallel to I m (t) the first end; R m2 The second end is connected to R m1 The first end of C m1 The first end is connected to I m The first end of (t) and the second end are connected to R m1 The first end of R m1 The second end is connected to I m (t) the second end; and R m2 The first end is node Am, m=1,2,...,M;

[0012] The cross-impact model is at most A series group of crossover capacitors and crossover resistors is formed, and each series group is connected in series between any two nodes, that is, between node Am and node Am', m'=1, 2, ..., M and m'≠m;

[0013] S4. constructing an m-th gas sensor response model based on a state space model according to the equivalent circuit model, so as to predict the response of the m-th sensor;

[0014] The processed sample set S' is used to train the mth gas sensor response model. During the training process, the mixed gas concentration vector of each sample point in the processed sample set S' and the actual response value collected by the mth sensor are used as input to map to at most After the state variable space of 1 dimension is obtained, the predicted response value of the m-th sensor of 1 dimension is output, and then the response model of the m-th gas sensor after training is obtained; the specific process is:

[0015] S41, after the mixed gas concentration vector is input into the mth gas sensor response model, the mth gas concentration is equivalent to the constant test current I in the mth gas sensor model. m (t) and input i m (t), and thus the mixed gas concentration vector is equivalent to the constant test current I corresponding to the M gas sensor models. m (t) and input i m The input vector i is composed of the sum of (t) u (t)=[i1(t)+I1(t) i2(t)+I2(t) … i M (t)+I M (t)] T ;

[0016] S42, all first capacitors C in the equivalent circuit model m1 Voltage The second capacitor C m2 Voltage and the voltage of the cross capacitance is the state variable, forming the state variable vector

[0017] S43, according to each sensor type, select the output voltage V in the mth gas sensor model m (t) is the response output Z m (t), m = 1, 2, ..., M, or output voltage V m (t) and constant test current I m The ratio of (t) is the response output Z m (t), and then form the output vector r(t) = [Z1(t) Z2(t) … Z M (t)]T , which is equivalent to the array response vector of each sample point in the processed sample set S';

[0018] S44. According to the equivalent circuit model, the state variable equation of the state variable space is constructed based on KVL (Kirchhoff's voltage law) and KCL (Kirchhoff's current law):

[0019]

[0020] r(t)=Cv(t)+Di u (t)

[0021] In the formula, A is the state transfer matrix, B is the control matrix, C is the measurement matrix, and D is the feedforward matrix, all of which are obtained based on the equivalent circuit model;

[0022] S45, based on the matrices A, B, C and D of the state variable equation, a parameter matrix (A, B, C, D) is formed, and each element in the parameter matrix (A, B, C, D) is iteratively solved in turn by using Kalman filtering and parameter association iteration algorithm to obtain an iteratively completed parameter matrix (A, B, C, D), thereby completing the training of the mth gas sensor response model;

[0023] S5. According to the equivalent circuit model, construct an m-th mixed gas concentration measurement model based on a state space model to measure the m-th gas concentration;

[0024] The processed sample set S' is used to train the m-th mixed gas concentration measurement model. During the training process, the array response vector of each sample point in the processed sample set S' and the known m-th gas concentration are used as input to map to at most After the dimensional state variable space is obtained, the 1-dimensional m-th gas measurement concentration is output, and then the m-th mixed gas concentration measurement model after training is obtained; the specific process is:

[0025] S51, after the array response vector is input into the mth mixed gas concentration measurement model, the mth sensor true response value is equivalent to the constant test current I in the mth gas sensor model. m (t) and input i m (t), and thus the array response vector is equivalent to the input vector i u (t)=[i1(t)+I1(t) i2(t)+I2(t) … i M (t)+I M (t)] T ;

[0026] S52. Construct state variable vector based on equivalent circuit model

[0027] S53, according to each sensor type, select the output voltage V in the gas sensor model m (t) is the concentration output Z m (t), m = 1, 2, ..., M, or output voltage V m (t) and constant test current I m The ratio of (t) is the concentration output Z m (t), and then form the output vector r(t) = [Z1(t) Z2(t) … Z M (t)] T , which is equivalent to the mixed gas concentration vector of each sample point in the processed sample set S';

[0028] S54, according to the equivalent circuit model and the parameter matrix (A, B, C, D) iterated in the m-th gas sensor response model obtained in S45, the state variable equation of the state variable space is constructed based on the KVL and KCL laws:

[0029]

[0030] r(t)=Cv(t)+Di u (t)

[0031] S6. For a mixed gas to be tested that includes M types of gases, when the concentrations of each gas in the mixed gas to be tested are known and the response values ​​of each sensor need to be predicted, the concentrations of each gas are combined into an M-dimensional mixed gas concentration vector, which is input into the trained m-th gas sensor response model obtained in S4 after maximum and minimum normalization, and the predicted response value of the m-th sensor in the mixed gas to be tested is output;

[0032] When it is necessary to measure the concentration of each gas in the mixed gas to be tested, the gas sensor array is used to test the mixed gas to be tested, and the corresponding array response vector is obtained. After maximum and minimum normalization processing, it is input into S5 to obtain the mth mixed gas concentration measurement model after training, and the measured concentration of the mth gas in the mixed gas to be tested is output.

[0033] Furthermore, the specific process of iterative solution using parameter association iterative algorithm in S45 is as follows:

[0034] S451. All elements in the parameter matrix (A, B, C, D) are randomly assigned initial values ​​within [-1, 1] to obtain the initial parameter matrix (A, B, C, D) 0; based on the initial parameter matrix (A, B, C, D) 0, the true response value of the mth sensor of each sample point in the processed sample set S' and the known mth gas concentration, the Kalman filter is used to fit the mth sensor fitting response value of each sample point in the lth element iteration, and then the difference square sum Sum0 of the processed sample set S' corresponding to the initial parameter matrix (A, B, C, D) 0 is calculated according to the true response value and the fitting response value of the mth sensor;

[0035] S452, let the element number l to be solved iteratively = 1, the parameter matrix (A, B, C, D)1 used in the first element iteration be the initial parameter matrix (A, B, C, D)0, and the sum of squares of the differences before the first element iteration update Sum1 be Sum0;

[0036] S453, parameter matrix (A, B, C, D) l The lth element in is pre-increased by a step size s, where s is less than 1, to obtain a new parameter matrix (A, B, C, D) l ', determine whether the change direction of the lth element is correct, based on the new parameter matrix (A, B, C, D) l ', and the mth sensor true response value of each sample point in the processed sample set S' and the known mth gas concentration, the Kalman filter is used to update the fitted response value, and then the difference square sum Sum is updated l , if the updated Sum l If it is less than before the update, the change direction of the lth element is correct, and the new parameter matrix (A, B, C, D) l 'Parameter matrix (A, B, C, D) after the lth element iteration l ; Otherwise, for the parameter matrix (A, B, C, D) l The first element in is reduced by a step size s to obtain a new parameter matrix (A, B, C, D) l ", continue to determine whether the change direction of the lth element is correct. If it is correct, use the new parameter matrix (A, B, C, D) l " is the parameter matrix (A, B, C, D) after the lth element iteration l ; Otherwise, keep the parameter matrix (A,B,C,D) l The lth element in remains unchanged;

[0037] Then the iterative solution of the lth element is completed, and the parameter matrix (A, B, C, D) after the iteration of the lth element is obtained. l ;

[0038] S454, determine the parameter matrix (A, B, C, D) after the lth element iteration l The corresponding Sum l Is it less than the preset difference square sum threshold? If so, the iterative solution is completed, and the parameter matrix (A, B, C, D) after the lth element iteration is l as the parameter matrix (A, B, C, D) after the iteration; otherwise, the parameter matrix (A, B, C, D) after the iteration of the lth element l The parameter matrix (A, B, C, D) used as the l+1th element iteration l+1 , let l=l+1, and return to step S453.

[0039] Furthermore, before the maximum and minimum normalization processing is performed on the expanded sample set in S2, the logarithm processing of the array response vector is first performed.

[0040] Furthermore, the value of the preset difference square sum threshold in S454 is determined according to the detection accuracy.

[0041] Furthermore, the value of the step size s in S453 varies with the sum of squares of the differences before updating Sum l decreases with the decrease of .

[0042] Further, in S43, when the sensor is a resistor type, the output voltage V m (t) and constant test current I m The ratio of (t) is the response output Z m (t); When the sensor is voltage type, the output voltage V m (t) is the response output Z m (t).

[0043] Furthermore, in S3, when the cross-impact of the mth gas on the m'th sensor is less than the cross-impact threshold, and the cross-impact of the m'th gas on the mth sensor is also less than the cross-impact threshold, there is no need to set a series group between node Am and node Am'; wherein the cross-impact threshold is determined according to the actual application scenario.

[0044] Furthermore, the formula for calculating the sum of squares of the difference Sum0 in S451 is:

[0045]

[0046] Where K is the total number of sample points contained in the processed sample set S'; k, k = 1, 2, ..., K is the sequence number of the sample point; is the true response value of the mth sensor in the kth sample point; is the fitted response value of the mth sensor in the kth sample point.

[0047] The beneficial effects of the present invention are:

[0048] 1. The present invention proposes a mixed gas response prediction and concentration detection method based on an equivalent circuit model. By constructing an equivalent circuit model of a gas sensor array, the state variable equations of the gas sensor response models of different gas types are obtained, and the parameter matrix is ​​processed by combining parameter association iteration and Kalman filtering. Due to the symmetry of the equivalent circuit model, the input and output ports of the mixed gas concentration measurement model and the gas sensor response model are consistent. Then, the mixed gas concentration measurement model of the same gas type is determined according to the parameter matrix of the gas sensor response model, and the corresponding gas concentration in the mixed gas is accurately detected. At the same time, the obtained gas sensor response model can realize the response prediction of the mixed gas with known gas concentration.

[0049] 2. The mixed gas concentration detection method based on the equivalent circuit model proposed in the present invention is a linear method, which does not require a large number of data samples and can expand the sample set by permutation, reorganization and splicing. Compared with nonlinear methods such as neural networks, the computational complexity of the present invention is low and can be linearly expanded as the size of the gas sensor array increases;

[0050] 3. For algorithms that require large data sets, such as neural network algorithms, the gas sensor response model proposed in the present invention can be used to generate data sets based on the cross-influence mechanism, which has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Schematic diagram of the equivalent circuit model of the gas sensor array constructed in Example 1; wherein (a) is the gas sensor model corresponding to CH4; (b) is the gas sensor model corresponding to NH3; (c) is the gas sensor model corresponding to NO2; (d) is the gas sensor model corresponding to CO2; (e) is the cross-influence partial model;

[0052] Figure 2 is the absolute error distribution of the gas sensor response model in Example 1;

[0053] Figure 3 is the relative error distribution of the gas sensor response model in Example 1;

[0054] Figure 4 is the absolute error distribution of the mixed gas concentration measurement model in Example 1;

[0055] Figure 5 is the relative error distribution of the mixed gas concentration measurement model in Example 1. DETAILED DESCRIPTION

[0056] In order to better understand the purpose and function of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings. In the following specific embodiments, many specific details are set forth to provide a thorough understanding of embodiments of the present invention. However, those skilled in the art will appreciate that embodiments of the present invention may be implemented without these specific details.

[0057] Example 1

[0058] This embodiment provides a mixed gas response prediction and concentration detection method based on an equivalent circuit model, which specifically includes the following steps:

[0059] S1. For a mixed gas containing four gas categories of CH4, NH3, NO2 and CO2, a gas sensor array is used to test multiple groups of mixed gases with different concentrations introduced in sequence. The gas sensor array is composed of M=4 sensors corresponding to each gas category, and the mth, m=1, 2, ..., Mth gas category corresponds to the mth sensor;

[0060] For each group of mixed gases introduced, each sensor in the gas sensor array collects corresponding response data to form an M-dimensional array response vector. The concentration of each gas in the mixed gas forms an M-dimensional mixed gas concentration vector. A sample point is formed by the mixed gas concentration vector and the corresponding array response vector. Sample points corresponding to multiple groups of mixed gases form a sample set S.

[0061] S2, perform five permutations and reorganizations on the sample set S, splice the sample sets S from the first four reorganizations to obtain an expanded sample set for training, and the sample set S from the fifth reorganization is used for verification;

[0062] The array response vector of the above sample set is logarithmized (the formula is X = ln (x)), and then the mixed gas concentration vector and the array response vector are normalized to the maximum and minimum values ​​(the formula is ), obtain the processed sample set S' corresponding to the expanded sample set as the training set, and the validation set corresponding to the sample set S reorganized for the fifth time;

[0063] S3, construct an equivalent circuit model of the gas sensor array, including M gas sensor models of different gas categories and cross-impact partial models, such as Figure 1 As shown, Figure 1 (a) is the gas sensor model corresponding to CH4. Figure 1 (b) is the gas sensor model corresponding to NH3. Figure 1 (c) in the figure is the gas sensor model corresponding to NO2. Figure 1 (d) in the figure is the gas sensor model corresponding to CO2. Figure 1 (e) in the figure is the cross-impact partial model;

[0064] The mth gas sensor model consists of a constant test current I connected in parallel m (t),m=1,2,...,M, circuit part, input i m (t), m=1,2,...,M and output voltage V m (t), m=1,2,...,M, the circuit part consists of the first resistor R m1 ,m=1,2,...,M, the second resistor R m2 ,m=1,2,...,M, the third resistor R m3 ,m=1,2,...,M, first capacitor C m1 ,m=1,2,...,M and the second capacitor C m2 ,m=1,2,...,M; where t is the gas sensor array test time of the sample point; R m3 With C m2 In parallel, one end of the parallel connection is connected to R m2 The first end is connected in series, and the other end is connected in parallel to I m (t) the first end; R m2 The second end is connected to R m1 The first end of C m1 The first end is connected to I m The first end of (t) and the second end are connected to R m1 The first end of R m1 The second end is connected to I m (t) the second end; and R m2 The first end is node Am, m=1,2,...,M;

[0065] The cross-impact model is at most A series group of crossover capacitors and crossover resistors is formed, and each series group is connected in series between any two nodes, that is, between node Am and node Am', m'=1, 2, ..., M and m'≠m;

[0066] S4. constructing an m-th gas sensor response model based on a state space model according to the equivalent circuit model, so as to predict the response of the m-th sensor;

[0067] The processed sample set S' is used to train the mth gas sensor response model. During the training process, the mixed gas concentration vector of each sample point in the processed sample set S' and the actual response value collected by the mth sensor are used as input to map to at most After the dimensional state variable space is obtained, the predicted response value of the m-th sensor in 1 dimension is output; the specific process is as follows:

[0068] S41, after the mixed gas concentration vector is input into the mth gas sensor response model, the mth gas concentration is equivalent to the constant test current I in the mth gas sensor model. m (t) and input i m (t), and thus the mixed gas concentration vector is equivalent to the constant test current I corresponding to the M gas sensor models. m (t) and input i m The input vector i is composed of the sum of (t) u (t)=[i1(t)+I1(t) i2(t)+I2(t) … i M (t)+I M (t)] T ;

[0069] S42, all first capacitors C in the equivalent circuit model m1 Voltage The second capacitor C m2 Voltage and the voltage of the cross capacitance is the state variable, forming the state variable vector

[0070] S43, when the mth sensor is a resistor type, such as the CH4, NH3 or NO2 sensor in this embodiment, in the mth gas sensor model, the output voltage V m (t) and constant test current I m The ratio of (t) is the response output Z m (t); When the mth sensor is a voltage type, such as the CO2 sensor in this embodiment, the output voltage V m (t) is the response output Z m (t), and then form the output vector r(t) = [Z1(t) Z2(t) … Z M (t)] T , which is equivalent to the array response vector of each sample point in the processed sample set S';

[0071] S44. According to the equivalent circuit model, the state variable equations of the state variable space are constructed based on the KVL and KCL laws:

[0072]

[0073] r(t)=Cv(t)+Di u (t)

[0074] In the formula, A is the state transfer matrix, B is the control matrix, C is the measurement matrix, and D is the feedforward matrix, all of which are obtained based on the equivalent circuit model;

[0075] In this embodiment, the formulas of matrices A, B, C and D are as follows:

[0076]

[0077]

[0078] In the formula, C A12 and R A12 are the cross capacitance and cross resistance between node A1 and node A2 respectively; C A13 and R A13 are the cross capacitance and cross resistance between node A1 and node A3 respectively; C A14 and R A14 are the cross capacitance and cross resistance between node A1 and node A4 respectively; C A23 and R A23 are the cross capacitance and cross resistance between node A2 and node A3 respectively; C A24 and R A24 are the cross capacitance and cross resistance between node A2 and node A4 respectively; C A34 and R A34 are the cross capacitance and cross resistance between node A3 and node A4 respectively; f 22 、f 44 、f 66 and f 88 All of them are intermediate variables with no special meaning;

[0079] S45. Based on the matrices A, B, C and D of the state variable equation, a parameter matrix (A, B, C, D) is formed. The parameter association iteration algorithm is used. The Kalman filter and the parameter association iteration algorithm are used to iteratively solve each element in the parameter matrix (A, B, C, D) in turn to obtain the iteratively completed parameter matrix (A, B, C, D), thereby completing the training of the mth gas sensor response model. The specific process is as follows:

[0080] S451. All elements in the parameter matrix (A, B, C, D) are randomly assigned initial values ​​within [-1, 1] to obtain the initial parameter matrix (A, B, C, D) 0. Based on the initial parameter matrix (A, B, C, D) 0, the mth sensor true response value of each sample point in the processed sample set S' and the known mth gas concentration, the Kalman filter is used to fit the mth sensor fitting response value of each sample point in the lth element iteration. Then, according to the true response value and the fitting response value of the mth sensor, the difference square sum Sum0 of the processed sample set S' corresponding to the initial parameter matrix (A, B, C, D) 0 is calculated, and the formula is:

[0081]

[0082] Where K is the total number of sample points contained in the processed sample set S'; k, k = 1, 2, ..., K is the sequence number of the sample point; is the true response value of the mth sensor in the kth sample point; is the fitted response value of the mth sensor in the kth sample point;

[0083] S452, let the element number l to be solved iteratively = 1, the parameter matrix (A, B, C, D)1 used in the first element iteration be the initial parameter matrix (A, B, C, D)0, and the sum of squares of the differences before the first element iteration update Sum1 be Sum0;

[0084] S453, parameter matrix (A, B, C, D) l The lth element in is pre-increased by a step size s, where s is less than 1 and the value of s varies with the sum of squares of the differences before the update. l The decrease of decreases, and the new parameter matrix (A, B, C, D) is obtained l ', determine whether the change direction of the lth element is correct, based on the new parameter matrix (A, B, C, D) l ', and the mth sensor true response value of each sample point in the processed sample set S' and the known mth gas concentration, the Kalman filter is used to update the fitted response value, and then the difference square sum Sum is updated l , if the updated Sum l If it is less than before the update, the change direction of the lth element is correct, and the new parameter matrix (A, B, C, D) l 'Parameter matrix (A, B, C, D) after the lth element iteration l ; Otherwise, for the parameter matrix (A, B, C, D) l The first element in is reduced by a step size s to obtain a new parameter matrix (A, B, C, D) l ", continue to determine whether the change direction of the lth element is correct. If it is correct, use the new parameter matrix (A, B, C, D) l " is the parameter matrix (A, B, C, D) after the lth element iteration l ; Otherwise, keep the parameter matrix (A,B,C,D) l The lth element in remains unchanged;

[0085] Then the iterative solution of the lth element is completed, and the parameter matrix (A, B, C, D) after the iteration of the lth element is obtained. l ;

[0086] S454, determine the parameter matrix (A, B, C, D) after the lth element iteration l The corresponding Sum lIs it less than the preset difference square sum threshold 10? -3 If yes, the iterative solution is completed, and the parameter matrix (A, B, C, D) after the lth element iteration is l as the parameter matrix (A, B, C, D) after the iteration; otherwise, the parameter matrix (A, B, C, D) after the iteration of the lth element l The parameter matrix (A, B, C, D) used as the l+1th element iteration l+1 , let l=l+1, and return to step S453;

[0087] S5. According to the equivalent circuit model, construct an m-th mixed gas concentration measurement model based on a state space model to measure the m-th gas concentration;

[0088] The processed sample set S' is used to train the m-th mixed gas concentration measurement model. During the training process, the array response vector of each sample point in the processed sample set S' and the known m-th gas concentration are used as input to map to at most After the dimensional state variable space is obtained, the 1-dimensional m-th gas measurement concentration is output; the specific process is:

[0089] S51, after the array response vector is input into the mth mixed gas concentration measurement model, the mth sensor true response value is equivalent to the constant test current I in the mth gas sensor model. m (t) and input i m (t), and thus the array response vector is equivalent to the input vector i u (t)=[i1(t)+I1(t) i2(t)+I2(t) … i M (t)+I M (t)] T ;

[0090] S52. Construct state variable vector based on equivalent circuit model

[0091] S53, according to each sensor type, select the output voltage V in the gas sensor model m (t) is the concentration output Z m (t), m = 1, 2, ..., M, or output voltage V m (t) and constant test current I m The ratio of (t) is the concentration output Z m (t), and then form the output vector r(t) = [Z1(t) Z2(t) … Z M (t)] T , which is equivalent to the mixed gas concentration vector of each sample point in the processed sample set S';

[0092] S54. According to the equivalent circuit model, the state variable equation of the state variable space is constructed based on the KVL and KCL laws:

[0093]

[0094] r(t)=Cv(t)+Di u (t)

[0095] In the formula, A is the state transfer matrix, B is the control matrix, C is the measurement matrix, and D is the feedforward matrix. Due to the symmetry of the constructed equivalent circuit model, that is, the input and output ports of the m-th mixed gas concentration measurement model and the m-th gas sensor response model are consistent, the parameter matrix (A, B, C, D) formed is the same as the parameter matrix (A, B, C, D) iterated in the m-th gas sensor response model;

[0096] S6. For a mixed gas to be tested that includes M types of gases, when the concentrations of each gas in the mixed gas to be tested are known and the response values ​​of each sensor need to be predicted, the concentrations of each gas are combined into an M-dimensional mixed gas concentration vector, which is input into the m-th gas sensor response model trained in S4 after maximum and minimum normalization, and the predicted response value of the m-th sensor in the mixed gas to be tested is output;

[0097] When the concentration of each gas in the mixed gas to be tested needs to be measured, the gas sensor array is used to test the mixed gas to obtain the corresponding array response vector, which is input into the mth mixed gas concentration measurement model trained by S5 after maximum and minimum normalization, and the measured concentration of the mth gas in the mixed gas to be tested is output.

[0098] Assuming that the mth gas category is CH4, in order to verify the accuracy of the mth gas sensor response model after S4 training and the mth mixed gas concentration measurement model after S5 training obtained in this embodiment, the absolute error and relative error of the mth gas sensor response model and the mth mixed gas concentration measurement model are calculated based on the training set and the validation set, respectively, and the following is obtained: Figure 2 The absolute error distribution of the CH4 gas sensor response model is shown in Figure 3 The relative error distribution of the CH4 gas sensor response model shown in Figure 4 The absolute error distribution of the four mixed gas concentration measurement models of CH4, NH3, NO2 and CO2 is shown in Figure 5 The relative error distributions of the four mixed gas concentration measurement models of CH4, NH3, NO2 and CO2 shown in the figure indicate that the gas sensor response model obtained in this embodiment has high accuracy in sensor response prediction, and the mixed gas concentration measurement model obtained in this embodiment has high accuracy in gas concentration measurement of mixed gases.

[0099] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A mixed gas response prediction and concentration detection method based on an equivalent circuit model, characterized in that: The following steps are involved: S1. Using a gas sensor array to test multiple groups of mixed gases with different concentrations introduced in sequence, the mixed gas includes M gas categories, the gas sensor array is composed of M sensors corresponding to each gas category, and the mth, m=1, 2, ..., Mth gas category corresponds to the mth sensor; For each group of mixed gases introduced, each sensor in the gas sensor array collects corresponding response data to form an M-dimensional array response vector. The concentration of each gas in the mixed gas forms an M-dimensional mixed gas concentration vector. A sample point is formed by the mixed gas concentration vector and the corresponding array response vector. Sample points corresponding to multiple groups of mixed gases form a sample set S. S2, the sample set S is repeatedly arranged, reorganized and spliced ​​to obtain an expanded sample set, and its mixed gas concentration vector and array response vector are subjected to maximum and minimum normalization processing to obtain a processed sample set S'; S3, constructing an equivalent circuit model of the gas sensor array, including gas sensor models of M different gas categories and a cross-impact part model; The mth gas sensor model consists of a constant test current I connected in parallel m (t),m=1,2,...,M, circuit part, input i m (t), m=1,2,...,M and output voltage V m (t), m=1,2,...,M, the circuit part consists of the first resistor R m1 ,m=1,2,...,M, the second resistor R m2 ,m=1,2,...,M, the third resistor R m3 ,m=1,2,...,M, first capacitor C m1 ,m=1,2,...,M and the second capacitor C m2 ,m=1,2,...,M; where t is the gas sensor array test time of the sample point; R m3 With C m2 In parallel, one end of the parallel connection is connected to R m2 The first end is connected in series, and the other end is connected in parallel to I m (t) the first end; R m2 The second end is connected to R m1 The first end of C m1 The first end is connected to I m The first end of (t) and the second end are connected to R m1 The first end of R m1 The second end is connected to I m (t) the second end; and R m2 The first end is node Am, m=1,2,...,M; The cross-impact model is at most A series group of crossover capacitors and crossover resistors is formed, and each series group is connected in series between any two nodes, that is, between node Am and node Am', m'=1, 2, ..., M and m'≠m; S4. constructing an m-th gas sensor response model based on a state space model according to the equivalent circuit model, so as to predict the response of the m-th sensor; The processed sample set S' is used to train the mth gas sensor response model. During the training process, the mixed gas concentration vector of each sample point in the processed sample set S' and the actual response value collected by the mth sensor are used as input to map to at most After the state variable space of 1 dimension is obtained, the predicted response value of the m-th sensor of 1 dimension is output, and then the response model of the m-th gas sensor after training is obtained; the specific process is: S41, after the mixed gas concentration vector is input into the mth gas sensor response model, the mth gas concentration is equivalent to the constant test current I in the mth gas sensor model. m (t) and input i m (t), and thus the mixed gas concentration vector is equivalent to the constant test current I corresponding to the M gas sensor models. m (t) and input i m The input vector i is composed of the sum of (t) u (t)=[i1(t)+I1(t) i2(t)+I2(t)…i M (t)+I M (t)] T ; S42, all first capacitors C in the equivalent circuit model m1 Voltage The second capacitor C m2 Voltage and the voltage of the cross capacitance is the state variable, forming the state variable vector S43, according to each sensor type, select the output voltage V in the mth gas sensor model m (t) is the response output Z m (t), m = 1, 2, ..., M, or output voltage V m (t) and constant test current I m The ratio of (t) is the response output Z m (t), and then form the output vector r(t) = [Z1(t) Z2(t)…Z M (t)] T , which is equivalent to the array response vector of each sample point in the processed sample set S'; S44. According to the equivalent circuit model, the state variable equations of the state variable space are constructed based on the KVL and KCL laws: r(t)=Cv(t)+Di u (t) In the formula, A is the state transfer matrix, B is the control matrix, C is the measurement matrix, and D is the feedforward matrix, all of which are obtained based on the equivalent circuit model; S45, based on the matrices A, B, C and D of the state variable equation, a parameter matrix (A, B, C, D) is formed, and each element in the parameter matrix (A, B, C, D) is iteratively solved in turn by using Kalman filtering and parameter association iteration algorithm to obtain an iteratively completed parameter matrix (A, B, C, D), thereby completing the training of the mth gas sensor response model; S5. According to the equivalent circuit model, construct an m-th mixed gas concentration measurement model based on a state space model to measure the m-th gas concentration; The processed sample set S' is used to train the m-th mixed gas concentration measurement model. During the training process, the array response vector of each sample point in the processed sample set S' and the known m-th gas concentration are used as input to map to at most After the dimensional state variable space is obtained, the 1-dimensional m-th gas measurement concentration is output, and then the m-th mixed gas concentration measurement model after training is obtained; the specific process is: S51, after the array response vector is input into the mth mixed gas concentration measurement model, the mth sensor true response value is equivalent to the constant test current I in the mth gas sensor model. m (t) and input i m (t), and thus the array response vector is equivalent to the input vector i u (t)=[i1(t)+I1(t) i2(t)+I2(t)…i M (t)+I M (t)] T ; S52. Construct state variable vector based on equivalent circuit model S53, according to each sensor type, select the output voltage V in the gas sensor model m (t) is the concentration output Z m (t), m = 1, 2, ..., M, or output voltage V m (t) and constant test current I m The ratio of (t) is the concentration output Z m (t), and then form the output vector r(t) = [Z1(t) Z2(t)…Z M (t)] T , which is equivalent to the mixed gas concentration vector of each sample point in the processed sample set S'; S54, according to the equivalent circuit model and the parameter matrix (A, B, C, D) iterated in the m-th gas sensor response model obtained in S45, the state variable equation of the state variable space is constructed based on the KVL and KCL laws: r(t)=Cv(t)+Di u (t) S6. For a mixed gas to be tested that includes M types of gases, when the concentrations of each gas in the mixed gas to be tested are known and the response values ​​of each sensor need to be predicted, the concentrations of each gas are combined into an M-dimensional mixed gas concentration vector, which is input into the trained m-th gas sensor response model obtained in S4 after maximum and minimum normalization, and the predicted response value of the m-th sensor in the mixed gas to be tested is output; When it is necessary to measure the concentration of each gas in the mixed gas to be tested, the gas sensor array is used to test the mixed gas to be tested, and the corresponding array response vector is obtained. After maximum and minimum normalization processing, it is input into S5 to obtain the mth mixed gas concentration measurement model after training, and the measured concentration of the mth gas in the mixed gas to be tested is output.

2. The mixed gas response prediction and concentration detection method based on the equivalent circuit model according to claim 1 is characterized in that: The specific process of iterative solution using parameter association iterative algorithm in S45 is as follows: S451. All elements in the parameter matrix (A, B, C, D) are randomly assigned initial values ​​within [-1, 1] to obtain the initial parameter matrix (A, B, C, D) 0; based on the initial parameter matrix (A, B, C, D) 0, the mth sensor true response value of each sample point in the processed sample set S' and the known mth gas concentration, the Kalman filter is used to fit the mth sensor fitting response value of each sample point in the lth element iteration, and then the difference square sum Sum0 of the processed sample set S' corresponding to the initial parameter matrix (A, B, C, D) 0 is calculated according to the true response value and the fitting response value of the mth sensor; S452, let the element number l to be solved iteratively = 1, the parameter matrix (A, B, C, D)1 used in the first element iteration be the initial parameter matrix (A, B, C, D)0, and the sum of squares of the differences before the first element iteration update Sum1 be Sum0; S453, parameter matrix (A, B, C, D) l The lth element in is pre-increased by a step size s, where s is less than 1, to obtain a new parameter matrix (A, B, C, D) l ', determine whether the change direction of the lth element is correct, based on the new parameter matrix (A, B, C, D) l ', and the true response value of the mth sensor at each sample point in the processed sample set S' and the known concentration of the mth gas, the Kalman filter is used to update the fitted response value, and then the difference square sum Sum is updated l , if the updated Sum l If it is less than before the update, the change direction of the lth element is correct, and the new parameter matrix (A, B, C, D) l 'Parameter matrix (A, B, C, D) after the lth element iteration l ; Otherwise, for the parameter matrix (A, B, C, D) l The first element in is reduced by a step size s to obtain a new parameter matrix (A, B, C, D) l ", continue to determine whether the change direction of the lth element is correct. If it is correct, use the new parameter matrix (A, B, C, D) l " is the parameter matrix (A, B, C, D) after the lth element iteration l ; Otherwise, keep the parameter matrix (A,B,C,D) l The lth element in remains unchanged; Then the iterative solution of the lth element is completed, and the parameter matrix (A, B, C, D) after the iteration of the lth element is obtained. l ; S454, determine the parameter matrix (A, B, C, D) after the lth element iteration l The corresponding Sum l Is it less than the preset difference square sum threshold? If so, the iterative solution is completed, and the parameter matrix (A, B, C, D) after the lth element iteration is l as the parameter matrix (A, B, C, D) after the iteration; otherwise, the parameter matrix (A, B, C, D) after the iteration of the lth element l The parameter matrix (A, B, C, D) used as the l+1th element iteration l+1 , let l=l+1, and return to step S453.

3. The mixed gas response prediction and concentration detection method based on the equivalent circuit model according to claim 2 is characterized in that: The value of the preset difference square sum threshold in S454 is determined according to the detection accuracy.

4. The mixed gas response prediction and concentration detection method based on the equivalent circuit model according to claim 2 is characterized in that: The value of step length s in S453 varies with the sum of squared differences before update. l decreases with the decrease of .

5. The mixed gas response prediction and concentration detection method based on the equivalent circuit model according to claim 2, characterized in that: The formula for calculating the sum of squares of the difference Sum0 in S451 is: Where K is the total number of sample points contained in the processed sample set S'; k, k = 1, 2, ..., K is the sequence number of the sample point; is the true response value of the mth sensor in the kth sample point; is the fitted response value of the mth sensor in the kth sample point.

6. The mixed gas response prediction and concentration detection method based on an equivalent circuit model according to any one of claims 1 to 5, characterized in that: Before the maximum and minimum normalization processing is performed on the expanded sample set in S2, the logarithm processing of the array response vector is first performed.

7. The mixed gas response prediction and concentration detection method based on an equivalent circuit model according to any one of claims 1 to 5, characterized in that: In S43, when the sensor is a resistor type, the output voltage V m (t) and constant test current I m The ratio of (t) is the response output Z m (t); When the sensor is voltage type, the output voltage V m (t) is the response output Z m (t).

8. The mixed gas response prediction and concentration detection method based on an equivalent circuit model according to any one of claims 1 to 5, characterized in that: In S3, when the cross-impact of the mth gas on the m'th sensor is less than the cross-impact threshold, and the cross-impact of the m'th gas on the mth sensor is also less than the cross-impact threshold, there is no need to set a series group between node Am and node Am'; wherein the cross-impact threshold is determined according to the actual application scenario.

Citation Information

Patent Citations

  • Lithium ion battery peak power prediction method considering heat effect influence

    CN112526350A

  • Flow battery model parameter identification and performance prediction method based on ordinary differential equation

    CN116047297A