A new intelligent microwave measurement system and method for syrup brix
The least squares support vector regressor model optimized by double helix antenna probe and particle swarm algorithm solves the error problem in syrup hammer measurement, and realizes high-precision and efficient syrup hammer measurement, which is suitable for small sample data conditions .
Patent Information
- Application Number
- CN202111416642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-11-26
AI Technical Summary
The existing syrup hammer measurement methods have great errors, especially in sucrose juice from different varieties and origins. The accuracy of the conductivity method and refractive method is limited by the fluctuations of the electrolyte components and the poor penetration of the refractive meter. ,The hardware error superposition of microwave method leads to an increase in measurement error, and the small sample data is difficult to meet the needs of deep learning.
The intelligent microwave measurement system of syrup hammer using double helix antenna probe is combined with the improved particle swarm algorithm to optimize the least squares support vector regressor model, and the syrup hammer is measured by the amplitude attenuation and phase offset of the microwave signal, and the regularization parameters are optimized. and kernel function parameters to improve model performance.
It improves the accuracy and efficiency of syrup hammer measurement, reduces measurement errors, enhances the stability and accuracy of the system, and is suitable for machine learning under small sample conditions.
Smart Images

Figure CN114239696B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of food engineering, and in particular to a novel intelligent microwave measurement system and method for syrup brix. Background Art
[0002] Sugarcane juice clarification and sugar boiling crystallization are important processes in the production of sugar. The clarification effect and crystallization effect will affect the quality of sugar and the benefits of the sugar factory. Syrup bric is an important monitoring parameter in these two processes. Accurate monitoring of syrup bric is conducive to improving product quality. At present, many measurement methods have been proposed, among which the conductivity method and the refractive index method are more common. In addition, in the mathematical model of syrup bric measurement, the mixed dielectric constant and multivariate regression fitting method are currently used for modeling.
[0003] There are technical defects in measuring the brix of syrup by both the conductivity method and the refractive index method. In actual production, the purity of sugarcane juice squeezed from different varieties and different origins is different, and the composition and quantity of electrolytes contained are also different. Therefore, the conductivity of the syrup mixture fluctuates within a certain range during the production process, and the brix value measured by conductivity will have a large error. Although the use of refractive index to measure the brix of syrup has higher accuracy, due to the poor penetration of the refractometer, tiny dirt on the lens can cause a large change in the refractive index, which will have a serious impact on the accurate measurement of the instrument. In contrast, the microwave method has various advantages, such as simple mechanical structure, no harm, and high measurement accuracy. In addition, due to the strong penetration of microwaves, the tiny dirt generated at the measuring site has almost no effect on the measurement, that is, the stability is high.
[0004] When measuring the bract of syrup by microwave method, due to the inevitable errors in the measurement hardware, these errors will be superimposed in the process of deriving the relationship between the resonance parameters and the bract of syrup based on the mixed dielectric theory, which will increase the error of the final bract measurement. The multivariate regression fitting method obtains the mathematical relationship between the resonance parameters and the overall trend of the bract of syrup, but the deviation may be large for individuals. The neural network algorithm can theoretically approximate any mathematical function and can better find the mathematical relationship between variables from discrete data. Due to the small number of data samples in the microwave measurement of the bract of syrup, it is difficult to meet the needs of a large number of data samples for the current popular deep learning. As a classic and efficient model, the support vector regression machine (SVR) has a good performance in solving problems such as machine learning and no local minima under small samples. The least squares support vector regression machine (LSSVR) studied later accelerated the solution speed by integrating statistical methods, but the accuracy and robustness decreased. Summary of the invention
[0005] The object of the present invention is to provide a novel intelligent microwave measurement system and method for syrup bric degree, which can improve the accuracy and efficiency of the syrup bric degree measurement model.
[0006] To achieve the above object, the present invention provides a novel intelligent microwave measurement system for syrup brix, including a data processing and control module, a microwave signal source module, a phase and amplitude detection module, a circulator, a power divider, a transmitting antenna and a receiving antenna.
[0007] The phase-amplitude detection module includes a first phase-amplitude detection module and a second phase-amplitude detection module; the data processing and control module is an STM32F407 minimum control system board; and the transmitting antenna and the receiving antenna are both helical antennas.
[0008] The helical antenna consists of two helical antenna probes and an aluminum plate; the diameter of the helical antenna probe is 3 mm, the pitch is 1 mm, the number of spiral turns is 3, and the wire radius is 0.25 mm; the two helical antenna probes are respectively arranged in two openings of the aluminum plate, with a distance of 26 mm, and the helical antenna is covered with a protective cover made of polytetrafluoroethylene.
[0009] The data processing and control module realizes the functions of driving the microwave signal source module, collecting data, transmitting data and communicating. The data processing and control module drives the microwave signal source module to output a microwave signal of a fixed frequency, and the microwave signal is divided into a measurement signal and a reference signal;
[0010] The measurement signal passes through the circulator and is divided into a transmission signal and an echo signal by the circulator; the transmission signal is transmitted to the transmission antenna, and the transmission antenna transmits the transmission signal into the syrup. Under the action of the syrup, the microwave signal is attenuated in amplitude, and the receiving antenna receives the attenuated microwave signal and sends it to the first phase-amplitude detection module; the echo signal is directly transmitted to the second phase-amplitude detection module;
[0011] The reference signal is sent to the power divider, and the power divider divides the reference signal into two outputs, which are respectively input into the first phase-amplitude detection module and the second phase-amplitude detection module as reference standard signals;
[0012] The first phase-amplitude detection module and the second phase-amplitude detection module transmit the received signal to the data processing and control module; by comparing the received transmission signal with the reference signal, the amplitude attenuation value and the phase offset value can be obtained; by comparing the received echo signal with the reference signal, the echo phase offset value and the echo loss can be known, and compared with the attenuation of the transmission signal, the echo loss of the transmitting probe can be obtained.
[0013] The method for measuring the syrup Brix using the above-mentioned syrup Brix intelligent microwave measurement system comprises the following steps:
[0014] Step S1, using an improved particle swarm algorithm to optimize the regularization parameter C and the kernel function parameter γ of the least squares support vector regression machine model to obtain the optimal combination of the regularization parameter C and the kernel function parameter γ;
[0015] Step S2, bringing the regularization parameter C and the kernel function parameter γ obtained in step S1 into the least squares support vector regression machine model, improving the least squares support vector regression machine model, and then obtaining a syrup bract measurement model based on the least squares support vector regression machine model;
[0016] Step S3, the data processing and control module inputs the collected amplitude attenuation value and phase shift value, as well as the real part and imaginary part of the complex dielectric constant of the syrup into the syrup bric measurement model to obtain the syrup bric data.
[0017] Furthermore, in step S1, the method for optimizing the regularization parameter C and the kernel function parameter γ of the least squares support vector regression model using the improved particle swarm algorithm is:
[0018] Step S11, firstly setting the formulas involved in the improved particle swarm algorithm;
[0019] Assume that there is a particle group with N particles in a D-dimensional bounded space, represented by x = (x1, x2, ..., x N ), the velocity of the i-th particle in space is v i =(v i1 ,v i2 ,…,v iD ), x i =(x i1 ,x i2 ,…,x iD ) is its current speed and moving position; in each iteration, all particles replace the previous optimal position of the particle with the optimal position they can search at the current stage, which is regarded as the individual extreme value P i =(p i1 ,p i2 ,L,P iD ), denoted as p best ; Then update the current optimal position of the population as the overall extreme value P g =(p g1 ,p g2 ,L,p gD ), denoted as g best ; Improve the particle swarm algorithm. In the improved particle swarm algorithm, particles update and replace their positions and velocities through the following two formulas:
[0020]
[0021]
[0022] Where 1≤i≤N, 1≤d≤D, t is the number of iterations, w is the inertia weight coefficient, c1(t) and c2(t) are the acceleration coefficients of particle motion, r1 and r2 are random numbers in the range of [0,1];
[0023] Among them, w, c1(t) and c2(t) are expressed as follows:
[0024]
[0025]
[0026]
[0027] Among them, f(x i ) is the current fitness value of the particle; f min and f avg is the minimum fitness value and average fitness value in the current particle; w min 、w max is the maximum and minimum value of the inertia weight; t is the current iteration number; T max is the maximum number of iterations;
[0028] In the iterative optimization process, the individual optimal position and the group optimal position are updated according to the fitness value using equations (6) and (7):
[0029]
[0030]
[0031] Among them, fitness(x) is the fitness function, and the root mean square error of the syrup hammer is used as the fitness;
[0032] Step S12, randomly select more than 200 groups of samples as the sample set, and randomly divide them into a training set and a test set in a ratio of 3:1. The training set is used to build the model, and the test set is used for experimental verification;
[0033] Each sample data includes input data and output data. The input data is S 11 Amplitude ratio (return loss of transmitting probe), Phase 11 Phase shift (phase offset value of the transmitted signal), real part and imaginary part of the complex dielectric constant of syrup, the output data is the syrup bric; step S13, set the optimization range of the regularization parameter C and the kernel function parameter γ, the particle population size, the maximum number of iterations, randomly generate the initial position and initial velocity of each particle in the particle swarm, and initialize the least squares support vector regression machine model;
[0034] Step S14, initializing the individual optimal and global optimal positions in the particle swarm according to the set parameters;
[0035] Step S15, using the least squares support vector regression model to calculate the mean square error of the syrup hammer as the fitness value of the particle, training is performed using the data of the training set, selecting the best individual position at this time from the population according to the fitness value, and saving the best individual at this time and its fitness value;
[0036] Step S16, the particle and According to formula (1) and (6), the fitness value of the particle f(x i ), compare the current optimal fitness with the previous optimal fitness value, and select the smallest fitness value f among the particles min , and replace the optimal fitness value, and calculate it by equations (3), (4), and (5) to update the inertia weight coefficient w and c1, c2;
[0037] Step S17: replace the current population's p according to formulas (6) and (7). best and g best ;
[0038] Step S18, judging whether the set goal is achieved, if so, saving and outputting the optimal individual, the overall optimal and its fitness value, if not, jumping to step S14 to continue optimization;
[0039] Step S19, outputting the optimal combination of the regularization parameter C and the kernel function parameter γ.
[0040] Furthermore, in step S2, the regularization parameter C and the kernel function parameter γ obtained in step S1 are brought into the least squares support vector regression model, the least squares support vector regression model is improved, and then the method for obtaining the syrup bract measurement model based on the least squares support vector regression model is as follows:
[0041] Step S21, constructing a sample data set for the least squares support vector regression model, with the number of samples being no less than 200 groups, and normalizing the sample data set and randomly dividing it into a training set and a test set in a ratio of 3:1, with the training set used to construct the model and the test set used for experimental verification;
[0042] Each sample data includes input data and output data. The input data is S 11 Amplitude ratio (return loss of transmitting probe), Phase 11 Phase shift (phase offset value of the transmitted signal), real and imaginary parts of the complex dielectric constant of syrup, and the output data is the syrup Brix;
[0043] Step S22, substituting the regularization parameter C and the kernel function parameter γ optimized in step S1 into the least squares support vector regression model;
[0044] Step S23, according to the optimization problem, establish the optimization objective function as follows:
[0045]
[0046] Where W T is the transposed form of the weighted vector, C is the regularization parameter, ξ is the loss coefficient used to adjust the fitting accuracy, b represents the offset, and l represents the total number of sample sets;
[0047] Step S24, transform the optimization problem into a Lagrange equation, and construct the Lagrange equation as follows:
[0048]
[0049] Step S25, converting the Lagrange equation according to the Karush-Kuhn-Tucker (KKT) condition and the Mercer condition, the method is as follows:
[0050] The Lagrange equation is transformed according to the KKT condition as follows:
[0051]
[0052] According to Mercer condition transformation, we can get:
[0053]
[0054] Where y=[y1,y2,L,y l ], e=[1,1,L,1],α=[α1,α2,L,α l ], I is the identity matrix, Ω represents the kernel function that meets the Mercer condition;
[0055] Step S26, the objective function formula of the least squares support vector regression model is derived according to the above formula:
[0056]
[0057] Among them, K(x i ,x j ) is the kernel function;
[0058] The least square method is used to solve formula (11), and the regression expression of the least square support vector regression model is constructed according to formula (12) by combining the optimized regularization parameter C and kernel function parameter γ.
[0059] Step S26, input the test set data into the least squares support vector regression model, and denormalize the model output to obtain the result of syrup bric, which indicates that the syrup bric measurement model has been established.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] (1) The present invention uses a double helix antenna probe to measure microwave signals. Compared with the existing measurement method, the mechanical structure is simpler and the measurement accuracy is higher. Due to the strong penetration of microwaves, tiny dirt on the measurement site has almost no effect on the measurement accuracy, and the stability is higher;
[0062] (2) The present invention aims at the problems existing in the traditional mathematical model for measuring the bract of syrups, and adopts a data-driven model of a least squares support vector regression machine optimized by a particle swarm algorithm. The least squares support vector regression machine has a good performance in solving problems such as machine learning under small sample conditions and no local minima. However, since the assignment of the regularization parameter C and the kernel function parameter γ of the least squares support vector regression machine is random, it will cause random fluctuations in the model output and slow convergence speed. The present invention introduces a particle swarm algorithm to optimize the regularization parameter C and the kernel function parameter γ of the least squares support vector regression machine, thereby improving the performance of the least squares support vector regression machine measurement model and accurately and efficiently measuring the bract of syrups. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 Schematic diagram of the intelligent microwave measurement system and method for syrup brix of the present invention;
[0064] Figure 2 Flowchart for optimizing the regularization parameter C and kernel function parameter γ using the improved particle swarm algorithm;
[0065] Figure 3 Build a flow chart for the least squares support vector machine model for syrup blumetry measurement;
[0066] Figure 4 This is the schematic diagram of the microwave method for measuring the Brix of syrup. DETAILED DESCRIPTION
[0067] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.
[0068] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.
[0069] Example 1 A novel intelligent microwave measurement system and method for syrup brix
[0070] like Figure 1 As shown, the syrup brix intelligent microwave measurement system of this embodiment includes a data processing and control module, a microwave signal source module, a first phase-amplitude detection module, a second phase-amplitude detection module, a circulator, a power divider, a transmitting antenna and a receiving antenna;
[0071] Among them, the data processing and control module is the STM32F407 minimum control system board; the transmitting antenna and the receiving antenna are both helical antennas;
[0072] The helical antenna is composed of two helical antenna probes and an aluminum plate; the diameter of the helical antenna probe is 3 mm, the pitch is 1 mm, the number of spiral turns is 3, and the wire radius is 0.25 mm; the two helical antenna probes are respectively arranged in two openings of the aluminum plate, with a distance of 26 mm, and the helical antenna is covered with a protective cover made of polytetrafluoroethylene;
[0073] The data processing and control module realizes the functions of driving the microwave signal source module, collecting data, transmitting data and communicating. The data processing and control module drives the microwave signal source module to output a microwave signal of a fixed frequency. The microwave signal is divided into a measurement signal and a reference signal.
[0074] The measurement signal passes through the circulator and is divided into a transmission signal and an echo signal by the circulator; the transmission signal is transmitted to the transmission antenna, and the transmission antenna transmits the transmission signal into the syrup. Under the action of the syrup, the microwave signal is attenuated in amplitude, and the receiving antenna receives the attenuated microwave signal and sends it to the first phase-amplitude detection module; the echo signal is directly transmitted to the second phase-amplitude detection module;
[0075] The reference signal is sent to the power divider, which divides it into two outputs, which are respectively input into the first phase-amplitude detection module and the second phase-amplitude detection module as reference standard signals;
[0076] The first phase-amplitude detection module and the second phase-amplitude detection module transmit the received signal to the data processing and control module; by comparing the received transmission signal with the reference signal, the amplitude attenuation value and the phase offset value can be obtained; by comparing the received echo signal with the reference signal, the echo phase offset value and the echo loss can be known, and compared with the attenuation of the transmission signal, the echo loss of the transmitting probe can be obtained.
[0077] The method for measuring the syrup Brix using the above-mentioned syrup Brix intelligent microwave measurement system comprises the following steps:
[0078] Step S1, using the improved particle swarm algorithm to optimize the regularization parameter C and the kernel function parameter γ of the least squares support vector regression model, and obtain the optimal combination of the regularization parameter C and the kernel function parameter γ. Figure 1 As shown, it consists of the following steps:
[0079] Step S11, firstly setting the formulas involved in the improved particle swarm algorithm;
[0080] Assume that there is a particle group with N particles in a D-dimensional bounded space, represented by x = (x1, x2, ..., x N ), the velocity of the i-th particle in space is v i =(v i1 ,v i2 ,…,v iD ), x i =(x i1 ,x i2 ,…,x iD ) is its current speed and moving position; in each iteration, all particles replace the previous optimal position of the particle with the optimal position they can search at the current stage, which is regarded as the individual extreme value P i =(p i1 ,p i2 ,L,P iD ), denoted as p best ; Then update the current optimal position of the population as the overall extreme value P g =(p g1 ,p g2 ,L,p gD ), denoted as g best ; Improve the particle swarm algorithm. In the improved particle swarm algorithm, particles update and replace their positions and velocities through the following two formulas:
[0081]
[0082]
[0083] Where 1≤i≤N, 1≤d≤D, t is the number of iterations, w is the inertia weight coefficient, c1(t) and c2(t) are the acceleration coefficients of particle motion, r1 and r2 are random numbers in the range of [0,1];
[0084] Among them, w, c1(t) and c2(t) are expressed as follows:
[0085]
[0086]
[0087]
[0088] Among them, f(x i ) is the current fitness value of the particle; f min and f avg is the minimum fitness value and average fitness value in the current particle; w min 、w max is the maximum and minimum value of the inertia weight; t is the current iteration number; T max is the maximum number of iterations;
[0089] In the iterative optimization process, the individual optimal position and the group optimal position are updated according to the fitness value using equations (6) and (7):
[0090]
[0091]
[0092] Among them, fitness(x) is the fitness function, and the root mean square error of the syrup hammer is used as the fitness;
[0093] Step S12, randomly select more than 200 groups of samples as the sample set, and randomly divide them into a training set and a test set in a ratio of 3:1. The training set is used to build the model, and the test set is used for experimental verification;
[0094] Each sample data includes input data and output data. The input data is S 11 Amplitude ratio (return loss of transmitting probe), Phase 11 Phase shift (phase offset value of the transmitted signal), real and imaginary parts of the complex dielectric constant of syrup, and the output data is the syrup Brix;
[0095] Step S13, setting the optimization range of the regularization parameter C and the kernel function parameter γ, the particle population size, and the maximum number of iterations, randomly generating the initial position and initial velocity of each particle in the particle swarm, and initializing the least squares support vector regression machine model;
[0096] Step S14, initializing the individual optimal and global optimal positions in the particle swarm according to the set parameters;
[0097] Step S15, using the least squares support vector regression model to calculate the mean square error of the syrup hammer as the fitness value of the particle, training is performed using the data of the training set, selecting the best individual position at this time from the population according to the fitness value, and saving the best individual at this time and its fitness value;
[0098] Step S16, the particle and According to formula (1) and (6), the fitness value of the particle f(x i ), compare the current optimal fitness with the previous optimal fitness value, and select the smallest fitness value f among the particles min , and replace the optimal fitness value, and calculate it by equations (3), (4), and (5) to update the inertia weight coefficient w and c1, c2;
[0099] Step S17: replace the current population's p according to formulas (6) and (7). best and g best ;
[0100] Step S18, judging whether the set goal is achieved, if so, saving and outputting the optimal individual, the overall optimal and its fitness value, if not, jumping to step S14 to continue optimization;
[0101] Step S19, outputting the optimal combination of the regularization parameter C and the kernel function parameter γ.
[0102] Step S2, bringing the regularization parameter C and the kernel function parameter γ obtained in step S1 into the least squares support vector regression model, improving the least squares support vector regression model, and then obtaining the syrup bract measurement model based on the least squares support vector regression model, such as Figure 3 As shown, it consists of the following steps:
[0103] Step S21, constructing a sample data set for the least squares support vector regression model, with the number of samples being no less than 200 groups, and normalizing the sample data set and randomly dividing it into a training set and a test set in a ratio of 3:1, with the training set used to construct the model and the test set used for experimental verification;
[0104] Each sample data includes input data and output data. The input data is S 11 Amplitude ratio (return loss of transmitting probe), Phase 11 Phase shift (phase offset value of the transmitted signal), real and imaginary parts of the complex dielectric constant of syrup, and the output data is the syrup Brix;
[0105] Step S22, substituting the regularization parameter C and the kernel function parameter γ optimized in step S1 into the least squares support vector regression model;
[0106] Step S23, according to the optimization problem, establish the optimization objective function as follows:
[0107]
[0108] Where W Tis the transposed form of the weighted vector, C is the regularization parameter, ξ is the loss coefficient used to adjust the fitting accuracy, b represents the offset, and l represents the total number of sample sets;
[0109] Step S24, transform the optimization problem into a Lagrange equation, and construct the Lagrange equation as follows:
[0110]
[0111] Step S25, converting the Lagrange equation according to the Karush-Kuhn-Tucker (KKT) condition and the Mercer condition, the method is as follows:
[0112] The Lagrange equation is transformed according to the KKT condition as follows:
[0113]
[0114] According to Mercer condition transformation, we can get:
[0115]
[0116] Where y=[y1,y2,L,y l ], e=[1,1,L,1],α=[α1,α2,L,α l ], I is the identity matrix, Ω represents the kernel function that meets the Mercer condition;
[0117] Step S26, the objective function formula of the least squares support vector regression model is derived according to the above formula:
[0118]
[0119] Among them, K(x i ,x j ) is the kernel function;
[0120] The least square method is used to solve formula (11), and the regression expression of the least square support vector regression model is constructed according to formula (12) by combining the optimized regularization parameter C and kernel function parameter γ.
[0121] Step S26, input the test set data into the least squares support vector regression model, and denormalize the model output to obtain the result of syrup bric, which indicates that the syrup bric measurement model has been established.
[0122] Step S3, the data processing and control module inputs the collected amplitude attenuation value and phase shift value, as well as the real part and imaginary part of the complex dielectric constant of the syrup into the syrup bric measurement model to obtain the syrup bric data.
[0123] Working principle of the present invention:
[0124] like Figure 4 As shown, when microwaves propagate in syrup, changes in dielectric constant will cause microwave changes. The present invention converts the microwave changes into changes in syrup brix by measuring the microwave changes.
[0125] Since syrup contains water, the dielectric constant of water is larger than that of other components in syrup. Therefore, when the water content in syrup changes, that is, the syrup's brax changes, the attenuation of microwave signals injected into syrup will change. The brax of syrup can be obtained by the relationship between the dielectric constant of syrup, microwave and brax. When microwaves penetrate syrup, there is a clear relationship between the dielectric constant of syrup and the phase shift of microwave attenuation amplitude. Then, by analyzing the relationship between the dielectric constant of syrup and the brax of syrup, the two relationships are linked to obtain the relationship between the phase shift of microwave attenuation amplitude and the brax of syrup. The microwave signal source emits two specific microwave signals, one of which is the signal after being injected into syrup through the receiving transmitting end, and the other signal is used as the standard signal. By comparing the difference between the standard signal and the signal after passing through syrup, the phase shift and amplitude attenuation of the signal after microwaves penetrate syrup are obtained, and finally converted into the brax of syrup through mathematical calculation.
[0126] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A new type of intelligent microwave measurement system for syrup brix, characterized by: It includes a data processing and control module, a microwave signal source module, a phase and amplitude detection module, a circulator, a power divider, a transmitting antenna and a receiving antenna; The phase-amplitude detection module includes a first phase-amplitude detection module and a second phase-amplitude detection module; the data processing and control module is an STM32F407 minimum control system board; The data processing and control module realizes the functions of driving the microwave signal source module, collecting data, transmitting data and communicating. The data processing and control module drives the microwave signal source module to output a microwave signal of a fixed frequency, and the microwave signal is divided into a measurement signal and a reference signal; The measurement signal passes through the circulator and is divided into a transmission signal and an echo signal by the circulator; the transmission signal is transmitted to the transmission antenna, and the transmission antenna transmits the transmission signal into the syrup. Under the action of the syrup, the microwave signal is attenuated in amplitude, and the receiving antenna receives the attenuated microwave signal and sends it to the first phase-amplitude detection module; the echo signal is directly transmitted to the second phase-amplitude detection module; The reference signal is sent to the power divider, and the power divider divides the reference signal into two outputs, which are respectively input into the first phase-amplitude detection module and the second phase-amplitude detection module as reference standard signals; The first phase-amplitude detection module and the second phase-amplitude detection module transmit the received signal to the data processing and control module; by comparing the received transmission signal with the reference signal, the amplitude attenuation value and the phase offset value can be obtained; by comparing the received echo signal with the reference signal, the echo phase offset value and the echo loss can be known, and compared with the attenuation of the transmission signal, the echo loss of the transmitting probe can be obtained; The method for measuring the syrup Brix using the syrup Brix intelligent microwave measurement system comprises the following steps: Step S1, using an improved particle swarm algorithm to optimize the regularization parameter C and the kernel function parameter γ of the least squares support vector regression machine model to obtain the optimal combination of the regularization parameter C and the kernel function parameter γ; Step S2, bringing the regularization parameter C and the kernel function parameter γ obtained in step S1 into the least squares support vector regression machine model, improving the least squares support vector regression machine model, and then obtaining a syrup bract measurement model based on the least squares support vector regression machine model; Step S3, the data processing and control module inputs the collected amplitude attenuation value and phase shift value, as well as the real part and imaginary part of the complex dielectric constant of the syrup into the syrup bric measurement model to obtain the syrup bric data.
2. The intelligent microwave measurement system for syrup Brix according to claim 1, characterized in that: The transmitting antenna and the receiving antenna are both helical antennas; the helical antenna consists of two helical antenna probes and an aluminum plate; the diameter of the helical antenna probe is 3 mm, the pitch is 1 mm, the number of spiral turns is 3, and the wire radius is 0.25 mm; the two helical antenna probes are respectively arranged in two openings of the aluminum plate, with a distance of 26 mm, and the helical antenna is covered with a protective cover made of polytetrafluoroethylene.
3. A method for measuring the syrup Brix using the syrup Brix intelligent microwave measurement system according to claim 1 or 2, characterized in that: The following steps are involved: Step S1, using an improved particle swarm algorithm to optimize the regularization parameter C and the kernel function parameter γ of the least squares support vector regression machine model to obtain the optimal combination of the regularization parameter C and the kernel function parameter γ; Step S2, bringing the regularization parameter C and the kernel function parameter γ obtained in step S1 into the least squares support vector regression machine model, improving the least squares support vector regression machine model, and then obtaining a syrup bract measurement model based on the least squares support vector regression machine model; Step S3, the data processing and control module inputs the collected amplitude attenuation value and phase shift value, as well as the real part and imaginary part of the complex dielectric constant of the syrup into the syrup bric measurement model to obtain the syrup bric data.
4. The method according to claim 3, characterized in that: In step S1, the method for optimizing the regularization parameter C and the kernel function parameter γ of the least squares support vector regression model using the improved particle swarm algorithm is: Step S11, firstly setting the formulas involved in the improved particle swarm algorithm; Assume that there is a particle group with N particles in a D-dimensional bounded space, represented by x = (x1, x2, ..., x N ), the velocity of the i-th particle in space is v i =(v i1 ,v i2 ,…,v iD ), x i =(x i1 ,x i2 ,…,x iD ) is its current speed and moving position; in each iteration, all particles replace the previous optimal position of the particle with the optimal position they can search at the current stage, which is regarded as the individual extreme value P i =(p i1 ,p i2 ,L,P iD ), denoted as p best ; Then update the current optimal position of the population as the overall extreme value P g =(p g1 ,p g2 ,L,p gD ), denoted as g best ; Improve the particle swarm algorithm. In the improved particle swarm algorithm, particles update and replace their positions and velocities through the following two formulas: Where 1≤i≤N, 1≤d≤D, t is the number of iterations, w is the inertia weight coefficient, c1(t) and c2(t) are the acceleration coefficients of particle motion, r1 and r2 are random numbers in the range of [0,1]; Among them, w, c1(t) and c2(t) are expressed as follows: Among them, f(x i ) is the current fitness value of the particle; f min and f avg is the minimum fitness value and average fitness value in the current particle; w min 、w max is the maximum and minimum value of the inertia weight; t is the current iteration number; T max is the maximum number of iterations; In the iterative optimization process, the individual optimal position and the group optimal position are updated according to the fitness value using equations (6) and (7): Among them, fitness(x) is the fitness function, and the root mean square error of the syrup hammer is used as the fitness; Step S12, randomly select more than 200 groups of samples as the sample set, and randomly divide them into a training set and a test set in a ratio of 3:
1. The training set is used to build the model, and the test set is used for experimental verification; Each sample data includes input data and output data. The input data is S 11 Amplitude ratio, Phase 11 phase shift, real and imaginary parts of the complex dielectric constant of syrup, the output data is the syrup Brix, the S 11 The amplitude ratio is the return loss of the transmitting probe, the Phase 11 Phase shift is the phase offset value of the transmitted signal; Step S13, setting the optimization range of the regularization parameter C and the kernel function parameter γ, the particle population size, and the maximum number of iterations, randomly generating the initial position and initial velocity of each particle in the particle swarm, and initializing the least squares support vector regression machine model; Step S14, initializing the individual optimal and global optimal positions in the particle swarm according to the set parameters; Step S15, using the least squares support vector regression model to calculate the mean square error of the syrup hammer as the fitness value of the particle, training is performed using the data of the training set, selecting the best individual position at this time from the population according to the fitness value, and saving the best individual at this time and its fitness value; Step S16, the particle and According to formula (1) and (6), the fitness value of the particle f(x i ), compare the current optimal fitness with the previous optimal fitness value, and select the smallest fitness value f among the particles min , and replace the optimal fitness value, and calculate it by equations (3), (4), and (5) to update the inertia weight coefficient w and c1, c2; Step S17: replace the current population's p according to formulas (6) and (7). best and g best ; Step S18, judging whether the set goal is achieved, if so, saving and outputting the optimal individual, the overall optimal and its fitness value, if not, jumping to step S14 to continue optimization; Step S19, outputting the optimal combination of the regularization parameter C and the kernel function parameter γ.
5. The method according to claim 3, characterized in that: In step S2, the regularization parameter C and the kernel function parameter γ obtained in step S1 are brought into the least squares support vector regression model, the least squares support vector regression model is improved, and then the method for obtaining the syrup bract measurement model based on the least squares support vector regression model is as follows: Step S21, constructing a sample data set for the least squares support vector regression model, with the number of samples being no less than 200 groups, and normalizing the sample data set and randomly dividing it into a training set and a test set in a ratio of 3:1, with the training set used to construct the model and the test set used for experimental verification; Each sample data includes input data and output data. The input data is S 11 Amplitude ratio, Phase 11 phase shift, real and imaginary parts of the complex dielectric constant of syrup, the output data is the syrup Brix, the S 11 The amplitude ratio is the return loss of the transmitting probe, the Phase 11 Phase shift is the phase offset value of the transmitted signal; Step S22, substituting the regularization parameter C and the kernel function parameter γ optimized in step S1 into the least squares support vector regression model; Step S23, according to the optimization problem, establish the optimization objective function as follows: Where W T is the transposed form of the weighted vector, C is the regularization parameter, ξ is the loss coefficient used to adjust the fitting accuracy, b represents the offset, and l represents the total number of sample sets; Step S24, transform the optimization problem into a Lagrange equation, and construct the Lagrange equation as follows: Step S25, converting the Lagrange equation according to the Karush-Kuhn-Tucker (KKT) condition and the Mercer condition, the method is as follows: The Lagrange equation is transformed according to the KKT condition as follows: According to Mercer condition transformation, we can get: Where y=[y1,y2,L,y l ], e=[1,1,L,1],α=[α1,α2,L,α l ], I is the identity matrix, Ω represents the kernel function that meets the Mercer condition; Step S26, the objective function formula of the least squares support vector regression model is derived according to the above formula: Among them, K(x i ,x j ) is the kernel function; The least square method is used to solve formula (11), and the regression expression of the least square support vector regression model is constructed according to formula (12) by combining the optimized regularization parameter C and kernel function parameter γ. Step S26, input the test set data into the least squares support vector regression model, and denormalize the model output to obtain the result of syrup bric, which indicates that the syrup bric measurement model has been established.
Citation Information
Patent Citations
Open type intelligent monitoring comprehensive experiment platform in sugarcane sugar boiling process
CN102505048A
Sugar boiling automatic control device
CN102925593A
Blood glucose testing method and device
CN104739421A
Data measuring method for cane sugar crystallization, and apparatus thereof
CN104991037A
Noninvasive infrared blood glucose testing system
CN106725518A
