Binary mixed solution detection method and system based on complex dielectric constant

Through detection methods and systems based on complex dielectric constants, combined with SVM and integrated regression model, the problem of difficult to identify the types of mixed liquids and the content of detection components in the prior art is solved, and a safe, low-cost and efficient detection effect is achieved.

CN119688797APending Publication Date: 2025-03-25BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510152194.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify the specific types of mixed liquids and detect the content of each liquid component, especially in the utilization of the overall complex dielectric constant spectrum.

Method used

The binary mixed liquid detection method and system based on complex dielectric constants are used to measure the complex dielectric constant spectrum information of the liquid to be measured through a coplanar waveguide sensing structure or microwave sensor, and combined with the support vector machine (SVM) classification model and integrated regression model, the liquid species are identified and the component content is predicted.

Benefits of technology

It realizes effective identification of binary mixed liquids and accurate detection of component content, which is safe and low-cost, and is suitable for a wide range of material testing applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119688797A_ABST
    Figure CN119688797A_ABST
Patent Text Reader

Abstract

The invention discloses a binary mixed liquid detection method and system based on complex permittivity, and the method comprises the steps: employing a coplanar waveguide sensing structure or a microwave sensor, and measuring the complex permittivity spectrum information of a to-be-detected binary mixed liquid in a preset frequency band, and the complex permittivity spectrum information comprises a real part value and an imaginary part value; inputting the real part value and the imaginary part value of the complex dielectric constant spectrum information into a trained classification model, classifying the complex dielectric constant spectrum information, and identifying the type of the binary mixed liquid to be detected; identifying the type of the binary mixed liquid to be detected according to the complex dielectric constant spectrum information, performing regression analysis by using an integrated regression model, and predicting the content of each component in the binary mixed liquid to be detected. According to the method, by combining a microwave sensor and a machine learning technology, the types of mixed liquid can be accurately identified, and the content of each component can be predicted. The method has the advantages of safety, high efficiency, accuracy and the like, and has wide application prospects in the fields of food safety, environment monitoring and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of complex dielectric constant measurement technology and machine learning, and more specifically to a binary mixed liquid detection method and system based on complex dielectric constant. Background Art

[0002] At present, the application of microwaves in biomedicine, food safety and other fields has been increasing in recent years. In many cases, microwave detection has great advantages in safety and cost compared with traditional methods due to its non-ionizing characteristics. Material classification and detection based on dielectric constant has received increasing attention in recent years, and there have been some reports.

[0003] However, most applications are only for pure liquids of a certain material, lacking the adaptability to accurately detect different materials and determine the concentration of different materials. In addition, these applications often only use the complex dielectric constant at a certain frequency point, but lack the use of the overall complex dielectric constant spectrum.

[0004] Therefore, how to provide a method for intuitively and simply identifying the specific type of a mixed liquid and detecting the content of each liquid component on the premise of confirming the type is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0005] In view of this, the present invention provides a binary mixed liquid detection method and system based on complex dielectric constant, which can solve the problem of effective identification of mixed liquids and accurate detection of component contents, and is safe and low-cost.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] In a first aspect, an embodiment of the present invention provides a binary mixed liquid detection method based on complex dielectric constant, comprising the following steps:

[0008] S1. Using a coplanar waveguide sensing structure or a microwave sensor, measuring the complex dielectric constant spectrum information of the binary mixed liquid to be measured within a predetermined frequency band, including real part value and imaginary part value;

[0009] S2, inputting the real part value and the imaginary part value of the complex dielectric constant spectrum information into the trained classification model, classifying the complex dielectric constant spectrum information, and identifying the type of the binary mixed liquid to be tested;

[0010] S3. Identify the type of the binary mixed liquid to be tested according to the complex dielectric constant spectrum information, perform regression analysis using an integrated regression model, and predict the content of each component in the binary mixed liquid to be tested.

[0011] Furthermore, the classification model uses a support vector machine (SWM) to analyze complex dielectric constant spectrum information.

[0012] Furthermore, the training process of the classification model is as follows:

[0013] 1) Using a coplanar waveguide sensing structure or a microwave sensor, measure the complex dielectric constants of various binary mixtures at a frequency of 14.5 GHz to obtain the real and imaginary spectrum information of the complex dielectric constant; divide it into a training set and a test set;

[0014] 2) construct multiple binary classification SVM models, each classifier corresponds to a liquid category, and the remaining categories are used as background;

[0015] 3) Select a linear kernel function and set a penalty parameter C to control the overfitting degree of the model; use the training set data to train multiple SVM models to learn the mapping relationship between the complex dielectric constant characteristics and the mixture category;

[0016] 4) Use the test set data to evaluate the classification accuracy of the model. According to the model evaluation results, adjust the value of the penalty parameter C and find the best parameter combination to improve the classification accuracy of the model;

[0017] 5) Select the SVM model with the best classification accuracy as the final classification model.

[0018] Furthermore, the integrated regression model includes random forest regression, linear regression, gradient boosting regression and K nearest neighbor regression models.

[0019] Furthermore, in step S3, different regression algorithms in the integrated regression model are selectively enabled to perform prediction according to the type of the binary mixed liquid to be tested.

[0020] Furthermore, the integrated regression model is trained using a K-fold cross-validation method.

[0021] Furthermore, the prediction results of the integrated regression model are weighted and aggregated to obtain a final prediction value.

[0022] Furthermore, different regression algorithms in the integrated regression model are selectively enabled for prediction, including:

[0023] When the complex dielectric constants of binary mixtures differ greatly, the K nearest neighbor method is used; for binary mixtures with small differences in complex dielectric constants that are difficult to distinguish, the linear regression model needs to be removed and only the other three types of models are aggregated.

[0024] In a second aspect, an embodiment of the present invention further provides a binary mixed liquid detection system based on complex dielectric constant, comprising:

[0025] The complex dielectric constant measurement module uses a coplanar waveguide sensing structure or a microwave sensor to measure the complex dielectric constant spectrum information of the binary mixed liquid to be measured within a predetermined frequency band, including the real part value and the imaginary part value;

[0026] A classification module, used to input the real part value and the imaginary part value of the complex dielectric constant spectrum information, and classify the complex dielectric constant spectrum information into a trained classification model to identify the type of the binary mixed liquid to be tested;

[0027] The content prediction module is used to identify the type of the binary mixed liquid to be tested according to the complex dielectric constant spectrum information, and use the integrated regression model to perform regression analysis to predict the content of each component in the binary mixed liquid to be tested.

[0028] It can be seen from the above technical solution that compared with the prior art, the present invention has the following advantages:

[0029] The present invention can be widely applied to various material detections. Compared with existing methods (such as spectral methods), the microwave method for measuring complex dielectric constants based on transmission reflection is simpler and has higher efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1 This is a flow chart of the binary mixed liquid detection method based on complex dielectric constant provided by the present invention.

[0032] Figure 2 A diagram of the training steps for the binary mixed liquid detection method based on complex dielectric constant provided by the present invention.

[0033] Figure 3 A schematic diagram of the confusion matrix of the classification model test data provided by the present invention.

[0034] Figure 4a A schematic diagram comparing the actual value and predicted value of the concentration of the water-ethanol mixture provided by the present invention.

[0035] Figure 4b A schematic diagram for comparing the actual value and predicted value of the concentration of the water-methanol mixture provided by the present invention.

[0036] Figure 4c A schematic diagram comparing the actual value and the predicted value of the concentration of the methanol-ethanol mixed solution provided by the present invention.

[0037] Figure 5 This is a specific training flow chart of the integrated regression model provided by the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] Reference Figure 1 As shown, the embodiment of the present invention discloses a binary mixed liquid detection method based on complex dielectric constant, comprising the following steps:

[0040] S1. Using a coplanar waveguide sensing structure or a microwave sensor, measure the complex dielectric constant spectrum information of the binary mixed liquid to be measured within a predetermined frequency band, including the real part value ε〝(f) and the imaginary part value ε‵(f);

[0041] S2, inputting the real part value and the imaginary part value of the complex dielectric constant spectrum information into the trained classification model, classifying the complex dielectric constant spectrum information, and identifying the type of the binary mixed liquid to be tested;

[0042] S3. Identify the type of the binary mixed liquid to be tested according to the complex dielectric constant spectrum information, perform regression analysis using an integrated regression model, and predict the content of each component in the binary mixed liquid to be tested.

[0043] Among them, the classification model is based on the support vector machine (SVM), which identifies the category according to the complex dielectric constant information obtained from actual detection. After obtaining the category data of each material, the complex dielectric constant spectrum of each material is used as a new data set, and then the corresponding concentration label is set for the subsequent integrated regression model. The integrated regression module uses the material type given by the classification model to effectively train the data set. After obtaining the mapping relationship between the complex dielectric constant spectrum information and the corresponding liquid concentration, the new verification set or test set data can be used for calculation and detection of the corresponding content.

[0044] Reference Figure 2 The training steps shown in the figure further explain the principle of the present invention as follows:

[0045] SVM is a supervised learning model that can be used for data classification analysis and can perform linear or nonlinear tasks. Its basic principle is to find an optimal hyperplane to separate data points of different categories. This optimal hyperplane is defined as the one that can maximize the interval (also called "boundary") between two different categories of data points. It should be noted that the present invention uses binary mixtures as samples, but its ideas are also applicable to ternary mixtures. For a two-class SVM, the separation hyperplane segment expression is:

[0046] w T x+b=0

[0047] Among them, w is the normal vector (the direction of the normal vector is the direction of the separating hyperplane), x is the input sample feature vector, and b is the displacement parameter. According to the linear decision function w T x+b is used to predict the category of the input feature. The classifier calculates

[0048] The determination method is as follows:

[0049]

[0050] If the result is positive, the predicted class is positive (1), otherwise it is negative (0).

[0051] In actual training, it is necessary to minimize the slope of the decision function, i.e. ||w||, so as to obtain the largest possible interval.

[0052] To implement the linear SVM classification task, the objective can be considered as a constrained optimization problem:

[0053]

[0054] y i (w T x i +b)≥1-ξ i ,i=1,2,...,N

[0055] ξ i ≥0,i=1,2,...,N

[0056] Among them, ξi is a slack variable, which is used to measure the extent to which the interval violation is allowed for the i-th instance. This constrained problem has two constrained objectives, namely, minimizing ||w|| to increase the interval, and minimizing the slack variable to reduce the interval violation. Therefore, a new parameter C is introduced to allow some sample points to be on the wrong side. C is the penalty coefficient, that is, the weight of the penalty for the instance of interval violation. The setting of C can allow the SVM to make a certain number of mistakes and keep the interval as wide as possible so that other points can still be correctly classified. The introduction of C can improve the classification model's prediction ability for various types of liquids, make the liquid classification more in line with the actual situation, and avoid overfitting. However, the selection of the value of C is very important. Improper setting may result in poor classification results or cause the model to overfit.

[0057] The integrated regression learning method is a collaborative decision-making mechanism that completes the entire learning process by building and aggregating the predictions of a set of predictors. Multiple basic regression models are trained simultaneously using the initial complex dielectric spectrum, and each model outputs a prediction result for the label. When the final prediction is required, the prediction results of these basic models are combined and the final prediction result is obtained through weighted aggregation. The integrated regressor can integrate the points of different machine learning models, reduce the risk of overfitting of a single model, and usually has better generalization ability than a single model. Therefore, we use the initial training data set to train 4 models separately and combine their results to achieve liquid concentration regression.

[0058] The following is a brief introduction to several major learning algorithms:

[0059] 1) Random forest regression: Random forest regression is a highly versatile learning algorithm that consists of multiple decision trees, each of which is a weak learner. Random forest introduces randomness to improve generalization ability. At each node of the decision tree, only a random subset of features is considered instead of all features, and then an optimal attribute is selected from the subset for regression training. This helps to reduce the correlation between decision trees, improve the diversity of the model and further reduce overfitting. The degree of randomness is determined by the parameter k, which is expressed as k=d / 3, where d is the dimension of the feature vector.

[0060] 2) Linear regression: Linear regression is one of the simplest and most widely used statistical techniques for describing the relationship between a dependent variable and one or more independent variables. The linear model is obtained by weighting the input features and adding a constant bias. This method measures the difference between the model's predicted value and the true value through a cost function, which is usually defined by the mean square error:

[0061]

[0062] m: Sample size, that is, the total number of data points in the data set.

[0063] i: Sample index, used to indicate each data point.

[0064] y (i) : The true value of the i-th sample, that is, the actual concentration or classification label of the sample.

[0065] The predicted value of the i-th sample, that is, the concentration or classification label predicted by the model.

[0066] 3) Gradient boosting regression: Gradient boosting regression is an enhancement algorithm that uses an additive model and a forward step-by-step algorithm to achieve the optimization process of learning. According to the negative gradient information of the loss function of the current model, the newly added weak learners (such as decision trees) are trained, and then the trained weak learners are combined with the existing ones in an accumulated form. Where m is the number of training samples, is the predicted value of the i-th sample, and y(i) is the true value of the i-th sample. The whole process aims to find the optimal model parameters so that the cost function can achieve the minimum value.

[0067] 4) K-nearest neighbor: K-nearest neighbor regression is an instance-based learning method used to solve regression problems. It finds the K nearest neighbors to the test sample in the training data set and predicts the target value of the test sample based on the label values ​​of these neighbors. The value of each instance is determined by the values ​​of its K nearest neighbors. The key is to determine the value of K, that is, to consider the number of nearest neighbors, and the choice of K is usually determined by the specific problem and data set.

[0068] Three liquids, namely water, ethanol and methanol, which are easy to obtain and widely used, are selected as research objects to illustrate the characterization process of the intelligent liquid detection method based on complex dielectric constant of the present invention.

[0069] Among them, the dielectric constant of water is relatively large, and the dielectric constant of a very wide range can be obtained when combined with ethanol or methanol, while the complex dielectric constants of methanol and ethanol are relatively close. Selecting these three liquids can better verify the resolution performance and feasibility of the model under a wide range of variation and small errors. In order to avoid the existence of an intersection area in the mixed liquid, the concentration of various mixtures is limited to a level of 10% to 90% by volume. Since the real part of the complex dielectric constant corresponding to ethanol, methanol, and water increases successively at the same frequency, the concentration of the mixture in the present invention refers to the volume fraction occupied by the liquid with a low real part of the complex dielectric constant. Using a coplanar waveguide sensing structure or a microwave sensor, the complex dielectric constant of a binary mixture is measured at 14.5 GHz. The corresponding range of the complex dielectric constant of the liquid with concentration is shown in Table 1. It can be seen that the water-ethanol and water-methanol have a large range of changes. The real part of the complex dielectric constant of water-ethanol decreases from 36.47 to 5.59, and the imaginary part decreases from 34.90 to 3.48. The real part of the complex dielectric constant of water-methanol decreases from 39.40 to 7.99, and the imaginary part decreases from 35.43 to 7.47. The range of methanol-ethanol change is very small, with the real part ranging from 6.06 to 4.56 and the imaginary part ranging from 4.92 to 1.81. Whether at low or high concentrations, the complex dielectric constants of water-methanol and water-ethanol mixtures are relatively similar. At high concentrations, water-ethanol and methanol-ethanol mixtures also have similar regions.

[0070] Table 1 Variation range of complex dielectric constants of three types of binary mixtures

[0071]

[0072] For the three types of binary mixtures in Table 1, we select the concentrations of ethanol, methanol, and ethanol components as variables, and obtain the complex dielectric constant spectra at different concentrations by logarithmic fitting. Each type of mixture generates 801 spectral data in the concentration range of 10% to 90% with a step size of 0.1%, and a total of 2403 spectral data for the three types. 80% of them are used for training and verification of SVM classification models and integrated regression learning, and the remaining 20% ​​of the data are used for model performance testing. Training data and test data are obtained by stratifying the concentration to avoid misjudgment and inversion errors caused by uneven sampling. The present invention constructs a multi-class classifier through a one-versus-all expansion method. To create a classifier that can distinguish n types of materials, it is necessary to train n binary classifiers, one for each category. During the training process, each SVM classifier only performs two classifications, that is, a specific class and the rest of the classes. In this way, as long as three binary classifiers are constructed, the classification of three types of materials can be performed. For example, for the water-ethanol mixture classifier, the complex dielectric constant spectrum data belonging to the binary mixture are all marked as positive, and the dielectric spectrum data that do not belong to the binary mixture are all marked as negative. The same is true for other classifiers, and they are trained using data sets with different labels. During the verification process of the test set, the discriminant function value of each binary classifier is calculated for the dielectric spectrum data separately. Ideally, only one classifier outputs a positive value, and its discrimination result can be directly mapped to a specific category by the corresponding classifier. If no classifier is judged as positive or there are multiple positive values, the category corresponding to the maximum value of the discriminant function is selected as the test data category.

[0073] SVM classification uses a linear kernel function, and the penalty parameter is set to 0.5. After the classification network training is completed, in order to observe the accuracy of the classification results, the classification results of the validation set data and the actual values ​​are compared. The classification effect of the network is as follows Figure 3As shown in the confusion matrix, each column in the matrix represents the predicted class, and the total number of each column represents the number of data predicted to belong to this class. Each row represents the actual class to which the data belongs, and the total amount of data in each row represents the number of input data in this class. Among them, we, wm, and me are binary mixtures of water-ethanol, water-methanol, and methanol-ethanol, respectively. It can be seen that all 481 data are distributed on the diagonal of the matrix, which means that all test data are classified into actual categories. The setting of the penalty parameter is very important. If the penalty parameter is too low, the decision boundary will be very loose and the model will be underfitted. At this time, the model accuracy is significantly reduced, resulting in the inability to accurately distinguish the category when facing a relatively close complex dielectric constant spectrum. If the penalty parameter is too high, the interval conflict is very bad and the model is prone to overfitting. In this way, when there is a slight error in the measured data, it is very easy to be misjudged because it does not meet the model rules. To this end, while ensuring the accuracy of the test, it is necessary to select a lower C to achieve better model generalization effect. Taking the linear kernel function as an example, the relationship between accuracy and penalty parameter is shown in Table 2. When the value is greater than 0.2, the classification accuracy can reach 100%. When the penalty coefficient is less than 0.1, the model tends to be underfitting. At this time, 0.2 is selected as the setting value of the penalty parameter C to achieve the best balance between test accuracy and generalization ability. Since the classification effect of the linear kernel function is already good enough, there is no need to use the linear polynomial kernel function or Gaussian kernel function.

[0074] Table 2 Classification accuracy under different penalty parameters

[0075]

[0076] Four different machine learning algorithms, random forest regression, gradient boosting regression, linear regression and k-nearest neighbor regression, are combined to construct an integrated model to obtain the best prediction accuracy. The prediction results of individual regressors are aggregated by voting, and the average of all model predictions is finally taken as the final result. The category of the material affects the training of the internal parameters of each regressor. Generally, in order to obtain a good inversion effect, a set of integrated regression models needs to be trained for each category. The three types of liquid materials involved in the present invention use the same form of relaxation equations and the same frequency bands of interest. In fact, the same hyperparameters can be used. First, the K-fold (K=3) cross-validation validation method is used for the original training and validation sets to avoid overfitting. The dielectric spectrum of one of the folds is used for prediction, and the remaining folds are used to train the regressor. All four main learning models are implemented using scikit-learn. The parameter details of the algorithm are shown in Table 3, where the parameter n_estimators refers to the number of decision trees that determine the model training effect, and the K parameter n_neighbors of the K-nearestimators is the number of neighbors that are taken into consideration when predicting a certain instance. Mean Absolute Percentage Error (MAPE) is an intuitive method to evaluate the accuracy of the system's prediction results. It is obtained by calculating the average of the sum of the ratios of the absolute value of the error to the true value, which can be written as:

[0077]

[0078] Where n is the number of samples, y i is the true value of the i-th sample, is the predicted value. The smaller the value of MAPE is, the higher the prediction accuracy of the model is. In addition, in order to more intuitively see the error size of the predicted value, the root mean square error (RMSE) is also used to evaluate the network:

[0079] Table 3 Classification accuracy under different penalty parameters

[0080]

[0081] It can be seen that the average value of the sum of squares of the difference between the predicted value and the actual value is first calculated, and then the square root is taken to obtain the RMSE, which therefore has the same unit as the original label. Like MAPE, the smaller the value of RMSE, the better the performance of the model. For the three types of binary mixtures listed in the present invention, the corresponding models are trained respectively, and the prediction results are obtained. The comprehensive evaluation index is shown in Table 4, where the value in the bracket is the final regression error when the linear regression prediction result is abandoned. It can be seen that the MAPE of the three types of binary mixtures is less than 3%. Among them, the RMSE of water-methanol and water-ethanol is very small, less than 0.5, and the RMSE of methanol-ethanol mixed solution is one order of magnitude higher than the first two, because the complex dielectric constant spectra of methanol and ethanol are relatively close in the frequency band, and the influence of small concentration changes on the complex dielectric constant is much smaller than that of the other two types of mixed solutions. According to the difference in the complex dielectric constant spectra of the three types of pure liquids, it can be found that the greater the difference in the two types of complex dielectric constants constituting the mixed solution, the greater the error of its inversion. However, the overall MAPE is still very low, even the highest MAPE is still less than 3%, and when the obviously underfitting linear regression model is discarded, the error is less than 2%, which proves that the ensemble learning model is well trained. In addition, the comparison between the predicted values ​​and the actual values ​​of the specific concentration parameters of the three types of binary mixtures is shown in the figure. Figure 4a , Figure 4b , Figure 4c shown.

[0082] Table 4 Error indicators of each regression model

[0083]

[0084] For the concentration prediction of water-ethanol, the error range is (0.002, 1.39), the average is 0.31, and the median is 0.25. Among them, the median is smaller than the average, indicating that most of the error values ​​are distributed within a range with smaller error values. It can also be seen from the nearly overlapping images of the two curves that the predicted concentration is in good agreement with the test set label concentration. For the concentration prediction of water-methanol, the error range is (0.0001, 1.42), the average is 0.37, and the median is 0.30. The distribution of error statistics is similar to that of water-ethanol, except that the extreme instance errors and the overall error are larger, but the overall curve is still very consistent. For the concentration prediction of methanol-ethanol, the error range is (0.007, 3.79), the average is 0.93, and the median is 0.82. The average error is nearly twice as high as the first two categories, while the median and maximum errors are more than twice as high. Figure 4c In the comparison diagram of the actual value and predicted value of the methanol-ethanol mixture concentration, more areas where the lines do not overlap can be seen, but in general, the prediction accuracy is still very high.

[0085] In order to study the relationship between the accuracy of a single regressor and the overall accuracy in the integrated regression model, their respective errors are compared in Table 5. It can be seen from the table that in the relatively easy-to-distinguish water-ethanol and water-methanol binary mixed solutions (the complex dielectric constants differ greatly, as shown in Table 1), the best is the K nearest neighbor method, while the error of the integrated regression model ranks in the middle. In the methanol-ethanol mixed solution that is most difficult to distinguish (the complex dielectric constants differ slightly, as shown in Table 1), the linear regression method can have extremely high errors due to its limitations in nonlinear data inversion, which makes the error reach a high 2.81% when the integrated model includes the linear regression method. However, when the linear regression model is removed and only the other three types of model data are aggregated, the error of the integrated model is lower than that of all single regressors because it solves the problem that a single model tends to fall into local optimality. Therefore, when facing complex systems, the integrated model has better applicability.

[0086] Table 5 Error comparison between single regression model and integrated model

[0087]

[0088] Table 6 Error table of test data

[0089]

[0090] The specific test results are shown in Table 6. Due to the differences in the test environment and measurement frequency range between the reference and the present invention, it can be seen that the overall error is slightly larger than the model MAPE. All errors are below 8%, and the extreme value of the absolute concentration difference is 3.75%, which shows that the intelligent liquid detection method has a good classification detection effect on the three types of mixed liquids.

[0091] It should be noted that the same idea is also applicable to mixed liquids with more types, but a more complex classifier needs to be constructed. In this method, for k categories, we train k SVM classifiers. Each classifier takes one category as the specific class and all other categories as the remaining classes. For example, if there are three categories A, B, and C, the following three SVM classifiers need to be trained:

[0092] Classifier 1: A vs (B+C)

[0093] Classifier 2: B vs (A+C)

[0094] Classifier 3: C vs (A+B)

[0095] When predicting, we input the test sample into all classifiers and select the class with the highest score as the prediction result.

[0096] By analogy, if there are four categories, four SVM classifiers need to be trained, with the class to be detected as the specific class and the others as the remaining classes.

[0097] In addition, in order to make the training process more clear, different from Figure 2 The overall training steps diagram, refer to Figure 5 As shown, it is a further refined flow chart of the integrated regression model training process provided by the present invention, including:

[0098] Data preparation: A dataset of methanol, ethanol and water mixtures with different mixture concentrations is formed, where the mixture concentration in this embodiment refers to the volume fraction of the liquid with a low real part of the complex dielectric constant. The training dataset is divided into multiple subsets, each of which contains a certain number of samples.

[0099] Classification model training: For three types of binary mixtures, the concentrations of ethanol, methanol, and ethanol components were selected as variables, and the complex dielectric constant spectra at different concentrations were obtained by logarithmic fitting. In order to better simulate the actual test situation, a random noise error of 5% on average was added to the complex dielectric constant spectrum. Each type of mixture generated 801 spectral data in the concentration range of 10% to 90% with a step size of 0.1%, and a total of 2403 spectral data for the three types. 80% of the data was used for training and verification, and 20% of the data was used for model performance testing.

[0100] Ensemble model training: Use different regression algorithms (such as random forest regression, linear regression, gradient boosting regression, and K nearest neighbors) to train each subset and obtain multiple basic regression models.

[0101] Model prediction: Use the test set data and input it into each basic regression model to obtain multiple prediction results.

[0102] Result aggregation: The prediction results of each basic regression model are weighted and aggregated, and the present invention performs an average operation to obtain the final prediction result.

[0103] Model evaluation: Use the actual value of the test set to compare with the final prediction result to evaluate the performance of the integrated regression model.

[0104] The integrated regression model is a powerful regression prediction tool that can effectively improve prediction accuracy and generalization ability by combining the advantages of multiple models.

[0105] Based on the same inventive concept, the present invention also provides a binary mixed liquid detection system based on complex dielectric constant, comprising:

[0106] The complex dielectric constant measurement module uses a coplanar waveguide sensing structure or a microwave sensor to measure the complex dielectric constant spectrum information of the binary mixed liquid to be measured within a predetermined frequency band, including the real part value and the imaginary part value;

[0107] A classification module, used to input the real part value and the imaginary part value of the complex dielectric constant spectrum information, and classify the complex dielectric constant spectrum information into a trained classification model to identify the type of the binary mixed liquid to be tested;

[0108] The content prediction module is used to identify the type of the binary mixed liquid to be tested according to the complex dielectric constant spectrum information, and use the integrated regression model to perform regression analysis to predict the content of each component in the binary mixed liquid to be tested.

[0109] The system can accurately identify the type of binary mixed liquid to be tested, such as water-ethanol, water-methanol or methanol-ethanol mixtures, through the classification module. This provides a basis for subsequent content prediction. The content prediction module uses an integrated regression model to accurately predict the content of each component in the binary mixed liquid to be tested. Even when the concentration of the components is similar, the system can accurately distinguish and predict the content of each component. In addition, the system is easy to operate. You only need to place the liquid sample to be tested in the measurement module for measurement to obtain the prediction results of the type of mixed liquid and the content of each component.

[0110] The binary mixed liquid detection system based on complex dielectric constant provided by the present invention can accurately identify the type of binary mixed liquid and predict the content of each component with high precision. It is easy to operate, has a wide range of applications, is highly safe, and has broad application prospects.

[0111] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0112] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A binary mixed liquid detection method based on complex dielectric constant, characterized in that: The following steps are involved: S1. Using a coplanar waveguide sensing structure or a microwave sensor, measuring the complex dielectric constant spectrum information of the binary mixed liquid to be measured within a predetermined frequency band, including real part value and imaginary part value; S2, inputting the real part value and the imaginary part value of the complex dielectric constant spectrum information into the trained classification model, classifying the complex dielectric constant spectrum information, and identifying the type of the binary mixed liquid to be tested; S3. Identify the type of the binary mixed liquid to be tested according to the complex dielectric constant spectrum information, perform regression analysis using an integrated regression model, and predict the content of each component in the binary mixed liquid to be tested.

2. A binary mixed liquid detection method based on complex dielectric constant according to claim 1, characterized in that: The classification model uses support vector machine (SWM) to analyze complex dielectric constant spectrum information.

3. A binary mixed liquid detection method based on complex dielectric constant according to claim 1, characterized in that: The training process of the classification model is as follows: 1) Using a coplanar waveguide sensing structure or a microwave sensor, measure the complex dielectric constants of various binary mixtures at a frequency of 14.5 GHz to obtain the real and imaginary spectrum information of the complex dielectric constant; divide it into a training set and a test set; 2) construct multiple binary classification SVM models, each classifier corresponds to a liquid category, and the remaining categories are used as background; 3) Select a linear kernel function and set a penalty parameter C to control the overfitting degree of the model; use the training set data to train multiple SVM models to learn the mapping relationship between the complex dielectric constant characteristics and the mixture category; 4) Use the test set data to evaluate the classification accuracy of the model. According to the model evaluation results, adjust the value of the penalty parameter C and find the best parameter combination to improve the classification accuracy of the model; 5) Select the SVM model with the best classification accuracy as the final classification model.

4. A binary mixed liquid detection method based on complex dielectric constant according to claim 3, characterized in that: The integrated regression model includes random forest regression, linear regression, gradient boosting regression and K nearest neighbor regression models.

5. A binary mixed liquid detection method based on complex dielectric constant according to claim 4, characterized in that: In step S3, different regression algorithms in the integrated regression model are selectively enabled to perform prediction according to the type of the binary mixed liquid to be tested.

6. A binary mixed liquid detection method based on complex dielectric constant according to claim 4, characterized in that: The integrated regression model is trained using the K-fold cross-validation method.

7. A binary mixed liquid detection method based on complex dielectric constant according to claim 4, characterized in that: The prediction results of the integrated regression model are weighted and aggregated to obtain the final prediction value.

8. The method for detecting a binary mixed solution based on complex dielectric constant according to claim 5, characterized in that: Selectively enable different regression algorithms in the ensemble regression model for prediction, including: When the complex dielectric constants of binary mixtures differ greatly, the K nearest neighbor method is used; for binary mixtures with small differences in complex dielectric constants that are difficult to distinguish, the linear regression model needs to be removed and only the other three types of models are aggregated.

9. A binary mixed liquid detection system based on complex dielectric constant, characterized in that: include: The complex dielectric constant measurement module uses a coplanar waveguide sensing structure or a microwave sensor to measure the complex dielectric constant spectrum information of the binary mixed liquid to be measured within a predetermined frequency band, including the real part value and the imaginary part value; A classification module, used to input the real part value and the imaginary part value of the complex dielectric constant spectrum information, and classify the complex dielectric constant spectrum information into a trained classification model to identify the type of the binary mixed liquid to be tested; The content prediction module is used to identify the type of the binary mixed liquid to be tested according to the complex dielectric constant spectrum information, and use the integrated regression model to perform regression analysis to predict the content of each component in the binary mixed liquid to be tested.