A liquor taste recognition and evaluation method based on particle swarm optimization fuzzy neural network

CN116452065BActive Publication Date: 2026-09-29CHONGQING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310549557.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2026-09-29
Estimated Expiration
2043-05-16

AI Technical Summary

Benefits of technology

[0081](1)现有技术针对的只是某一方面的识别,如偏最小二乘回归方法识别白酒香型,用主成分分析法进行酒质评价等,本发明中提出的方法可以根据白酒的微量成分含量实现香型识别和等级划分两项任务。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116452065B_ABST
    Figure CN116452065B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of liquor taste recognition evaluation method based on particle swarm optimization fuzzy neural network, belong to intelligent learning field.The framework of fuzzy neural network is used instead of artificial evaluation, improve the efficiency of liquor recognition evaluation, it is also more convenient in operation, only need to input the physicochemical index of the liquor to be identified, can output the fragrance type and corresponding grade of recognition by fuzzy neural network.Use particle swarm optimization, so that the network has better adaptive ability and robustness.From the angle of trace component, the fragrance type and grade of liquor are analyzed by numerical value, which helps the liquor industry to establish unified identification and evaluation standard and improve evaluation index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent learning and relates to a method for identifying and evaluating the flavor of baijiu (Chinese liquor) based on particle swarm optimization fuzzy neural networks. Background Technology

[0002] The aroma profiles of baijiu (Chinese white liquor) vary greatly due to differences in various production processes, resulting in diverse flavor profiles such as strong aroma, sauce aroma, and light aroma. As the most crucial aspect of baijiu quality assessment, the standards for judging baijiu flavor and grade directly impact the objectivity of flavor grade evaluations. Advances in testing technology have enabled increasingly precise determination of trace components in baijiu. Identifying baijiu flavor and grade by analyzing trace component content using various techniques is currently a major research focus in baijiu studies.

[0003] Baijiu (Chinese white liquor) is mainly composed of ethanol and water, with other trace components accounting for only about 2% of its composition. Existing research suggests that the unique aroma of baijiu is determined by the combined content of various trace components such as esters, acids, and alcohols. Therefore, the quantity and content of these trace components can be used to comprehensively evaluate the aroma type and grade of baijiu. Based on this, various identification and evaluation methods for baijiu based on trace components have emerged. These include principal component analysis for quality evaluation, analysis of chromatographic components in strong-aroma baijiu to rank similar grades, and partial least squares regression for identifying strong-aroma, sauce-aroma, and light-aroma baijiu.

[0004] However, current methods are limited in scope, focusing on only one angle. Actual physicochemical indicators of baijiu (Chinese liquor) exhibit fuzziness, randomness, and unpredictability; the sheer number of indicators and their lack of clear definition of their impact on the final grade also contribute to these issues. Fuzzy neural networks can be used to express fuzzy inference rules. However, fuzzy inference alone cannot achieve self-learning and adaptive functions, resulting in low model adaptability. Furthermore, neural networks cannot be used alone to express rule-based fuzzy knowledge. The use of fuzzy neural networks facilitates the mathematical analysis and standardization process in baijiu aroma identification and grading. Partial least squares regression (PSR) is a classic regression method in machine learning, applied to finding the relationship between components and flavor / grade. It provides a method similar to principal component analysis, used to identify auxiliary variables with high correlation to the output among trace components. In optimizing neural network weights, backpropagation (BP) is commonly used for training and optimization. However, BP is prone to getting trapped in local optima. Particle swarm optimization (PSO) can help escape local optima by using a swarm of particles from the local neighborhood, thus optimizing the network weights.

[0005] This invention proposes a novel numerical approach for classifying the aroma and grade of baijiu (Chinese liquor). This approach involves selecting auxiliary variables with high regression coefficients using partial least squares regression, establishing a fuzzy neural network model to determine the relationship between relevant variables and aroma type, dividing the dataset, selecting auxiliary variables for specific aroma types, and using another fuzzy neural network to establish a model between relevant variables and grade. The use of particle swarm optimization (PSO) to optimize the neural network parameters also demonstrates the network's self-learning capability. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a method for identifying and evaluating the flavor of baijiu (Chinese liquor) based on particle swarm optimization fuzzy neural networks. The method involves measuring the physicochemical indicators of baijiu using gas chromatography, extracting auxiliary variables with large regression coefficients using partial least squares regression as input to the fuzzy neural network, and outputting the aroma type and grade of the baijiu. This helps improve the objectivity of the baijiu aroma type and grade identification and evaluation process, avoiding random errors.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A method for identifying and evaluating the flavor of baijiu (Chinese liquor) based on particle swarm optimization fuzzy neural networks, comprising the following steps:

[0009] S1: Obtain experimental data;

[0010] Multiple physicochemical indicators of baijiu of different aroma types were measured by gas chromatography. Each aroma type was assigned five grades: I, II, III, IV, and V. For now, we will use the strong aroma type Y. N Y-type sauce aroma J Lightly fragrant type Y Q Phoenix Fragrance Type Y F For the four aroma types, typical samples of baijiu from five grades within each aroma type were collected. Each typical sample was sampled six times to avoid random errors. The four types of samples were labeled Y according to their grade. N (wu),Y J (wu),Y Q (wu),Y F (wu), w = I, II, ..., V corresponds to five levels, and u = 1, ..., 6 corresponds to six samplings;

[0011] The obtained trace component contents include formic acid, acetic acid, propionic acid, butyric acid, isovaleric acid, hexanoic acid, lactic acid, total acid, total esters, acetaldehyde, acetal, n-propanol, isobutanol, isoamyl alcohol, ethyl acetate, ethyl butyrate, ethyl lactate, and ethyl hexanoate, totaling m trace components, with corresponding physicochemical indices (r1, r2, ..., r m );

[0012] S2: Data preprocessing, selecting auxiliary variables related to aroma type;

[0013] The sampled data in S1 were divided into four categories based on aroma type. Partial least squares regression was then used to select auxiliary variables that significantly influence aroma type classification, namely the content of several trace components with large regression coefficients. The independent variables were physicochemical indicators (r1, r2, ..., r...). m This only considers the aroma type. The dependent variable Y is set according to the aroma type: strong aroma Y=0, soy sauce aroma Y=1, light aroma Y=2, and phoenix aroma Y=3.

[0014]

[0015] After selecting several auxiliary variables with large regression coefficients and removing several variables with weak correlation, the final variables used for aroma identification are (r1,…,r). n The content of a total of n trace components; physicochemical indicators (r1,…,r) used for aroma identification. n After filtering, the data corresponding to the assigned dependent variable Y is the preprocessed liquor data;

[0016] S3: Fuzzy neural network training to identify the aroma type of baijiu;

[0017] S31: TS fuzzy neural network;

[0018] In the TS fuzzy logic system, a rule is described using the IF and THEN statements:

[0019]

[0020] In the formula R v This represents the v-th rule in the rule set. This represents the fuzzy set in this rule. c is a constant in this rule, that is, the output of the system is represented by a linear combination of the inputs, which is converted into a numerical correspondence;

[0021] The neural network structure consists of an antecedent network and an consequent network. The antecedent part is the IF part (premise) in classical fuzzy theory, and the consequent part is the THEN part (conclusion) in classical fuzzy theory. This method utilizes a multi-input single-output system (MISO), where each consequent subnetwork produces one output. For a single-output system, there is only one network in the consequent network. Let the input variables be x = [x1, ..., x...]. n There are a total of n inputs, p rules, and the output variable is Y, which is the aroma type of the baijiu.

[0022] The topology of the TS fuzzy neural network is as follows:

[0023] (1) Precursor Network

[0024] First layer: Input layer, each node represents an input variable x. i ,i=1,…,n, that is, the content r of the trace components of the selected liquor. i ;

[0025] The second layer: the fuzzification layer, receives the input variables from the first layer network and calculates the membership function of the fuzzy set corresponding to the input variables; a Gaussian function is selected as the membership function of this TS fuzzy neural network, that is:

[0026]

[0027] In the formula Let c be the membership function of the i-th auxiliary variable j-th. ij With b ij are real constants, representing the mean and variance of the membership function, respectively, corresponding to the center and width of the Gaussian function;

[0028] The third layer is the rule layer. Each node corresponds to a fuzzy rule, for a total of p fuzzy rules. Weights are calculated using two methods: minimum value and multiplication. The membership degrees of each output are multiplied to perform fuzzy calculation, yielding the applicability of each rule, expressed as θ. j To indicate,

[0029]

[0030] In the formula, j corresponds to the j-th rule, n is the number of input variables, and p is the number of rules;

[0031] The fourth layer is the defuzzification layer, which performs a normalization operation on the applicability of each rule and outputs the normalized data.

[0032]

[0033] (2) After-process network

[0034] The first layer is the input layer, where the zeroth input is not the trace component content of the liquor, but a constant value x0 = 1, used to represent the constant term in the fuzzy rule; each of the remaining nodes represents an input variable x. i This refers to the content of trace components in baijiu (Chinese liquor).

[0035] The second layer: the intermediate layer, also known as the fuzzy rule layer, is used to match fuzzy rules. Each node matches one rule, and there are a total of p nodes. Each rule matches a corresponding weighted parameter, calculated as follows:

[0036]

[0037] In the formula, x0 = 1, Y j The j-th inference part corresponding to the fuzzy rule, These are the weighting parameters of the neural network;

[0038] Third layer: Output layer, combining the output of the preceding network. The applicability of each rule is characterized, and then the final output of the entire system is calculated, namely the aroma type Y of the liquor. In a multi-input single-output system, there is only one output Y in the end.

[0039]

[0040] Particle Swarm Optimization (PSO) algorithm was used to analyze network parameters. Membership function center and width c ij ,b ij By making optimizations and corrections, the particle swarm optimization algorithm uses the interaction of information between particles to make the values ​​of the particles tend towards the optimal particle of the swarm in solving optimization problems.

[0041] The error function is defined as:

[0042]

[0043] In the formula Y g Y is the desired fragrance value output by the model, where Y is the actual fragrance value output by the fuzzy neural network.

[0044] S32: Network Training Process

[0045] The normalization operation is as follows:

[0046]

[0047] Normalization is used to ensure the variable range is x∈[0,1], eliminating large quantitative errors; initialization is performed on various parameters: the mean and variance of the membership function in the fuzzy neural network system, i.e., the center and width c of the membership function. ij ,b ij and various weighting coefficients All numbers are initialized to random numbers within (0,1); the number of rules is calculated according to p = 2n + 1;

[0048] Match the input and output, take 70% of the dataset as training data and 30% as test data, implement the model using MATLAB programming, train the network after importing the data, and use the error function to evaluate the training effect of the network.

[0049] The particle swarm optimization (PSO) algorithm is used for correction, and the optimization correction is completed when the termination condition is met.

[0050] S4: Data preprocessing, selecting auxiliary variables related to grade for specific aroma types;

[0051] The data of strong-aroma baijiu obtained in S1 is divided and classified according to the grade of strong-aroma baijiu.

[0052] The content of trace components that have the greatest impact on grading under a specific aroma type is selected as an auxiliary variable and input into the fuzzy neural network.

[0053] After selecting the variables, determine the number q of input variables. The network input is (x1,…,x…). q The corresponding auxiliary variables (r1,…,r) are selected. q The rule number is calculated according to p = 2q + 1, and the output is the level of the corresponding aroma type of baijiu, denoted as y, which is divided into five levels; each level is randomly sampled six times and randomly assigned a random value near the level number.

[0054] For other strong-aroma liquor samples classified as Grade I, arbitrarily select one sample and assign the value y to 1, and assign the other five samples the value 1+rand(-0.2,0), where rand() represents a random value within the interval; the correspondence between the final value of y and the grade is defined as follows:

[0055] Grades of strong-aroma baijiu:

[0056] S5: Training a fuzzy neural network to evaluate the grade of baijiu under a specific aroma type.

[0057] The input variables for the dataset corresponding to the grading are x = [x1, ..., x]. q The system has a total of q input variables, p rules, and an output variable y, which represents the grade of baijiu under the corresponding aroma type. Initialization: c in the membership function of the fuzzy neural network system... ij ,b ij and various weighting coefficients All numbers are random numbers within the range (0,1);

[0058] Consistent with the description in S4, y characterizes the applicability of each rule. j In the inference part corresponding to the fuzzy rule, the output of this multi-input single-output system is the level y corresponding to a specific fragrance type;

[0059]

[0060] In a learning algorithm, the error function is defined as:

[0061]

[0062] In the formula y gy represents the desired output level value of the model, and y represents the actual output level value of the fuzzy neural network.

[0063] The Particle Swarm Optimization (PSO) algorithm is used for correction, and the TS fuzzy neural network is optimized with a preset small error threshold ε. N This is used to indicate that the error has converged to a smaller value, indicating that training is complete.

[0064] Match the input and output, take 70% of the dataset as training data and 30% as test data, implement the model using MATLAB programming, train the network after importing the data, and use the error function to evaluate the training effect of the network.

[0065] Repeat S4 and S5 to complete the training of the evaluation network for other types of baijiu.

[0066] (1) Divide the data of sauce-flavored liquor obtained in S1 and classify the data according to the grade of sauce-flavored liquor; perform data preprocessing and complete the training of the sauce-flavored liquor grade evaluation network;

[0067] (2) Divide the data of light-aroma baijiu obtained in S1 and classify the data according to the grade of light-aroma baijiu; perform data preprocessing and complete the training of the light-aroma baijiu grade evaluation network.

[0068] (3) Divide the data of Fengxiang-flavored liquor obtained in S1 and classify the data according to the grade of Fengxiang-flavored liquor; perform data preprocessing and complete the training of the Fengxiang-flavored liquor grade evaluation network.

[0069] An integrated evaluation framework for the aroma type and grade of baijiu is constructed. The relevant trace component information of the baijiu to be identified is input, the aroma type is identified through the aroma type identification network, and then the grade evaluation model is input to output the grade information.

[0070] Optionally, the Particle Swarm Optimization (PSO) algorithm is used to optimize a fuzzy neural network. Each particle is first randomly initialized, and then the optimal value is obtained through iterative updates. The weighting parameters, membership function center, and width of the TS fuzzy neural network's consequent network are used as particles, and the fitness value in the algorithm is the prediction error E. Particles update their velocity based on their experience with surrounding particles, and track their individual optimal values. b With the global optimal value g b To track its own position and avoid getting trapped in local optima, the global optimum is only the optimum value d within the particle's local neighborhood. b ;

[0071] The PSO algorithm solution process is as follows:

[0072] 1) Random initialization of particles in D-dimensional space

[0073] 2) Calculate the fitness value, i.e., the training error of the TS fuzzy neural network.

[0074] 3) Update the optimal values ​​of individual particles and the optimal values ​​of the swarm particles; update the particle velocity v and position p; the update formula is:

[0075] V i,h+1 =ω*V i,h +c1*r1*(l i,h -P i,h )+c2*r2*(d i,h -P i,h )

[0076] P i,h+1 =P i,h +V i,h+1

[0077] In the formula Let be the velocity of the i-th particle at time h. Let be the position of the i-th particle at iteration h, corresponding to the weighting parameters of the consequent network. Let be the individual optimal value of the i-th particle at time h. Let be the local neighborhood optimal value of the i-th particle at the h-th iteration time; c1, c2 are constants, r1, r2∈[0,1] are randomly generated constants, and ω is the inertia weight;

[0078] 4) Determine if the termination condition is met, i.e., the number of iterations of the particle swarm algorithm reaches the maximum value;

[0079] By correcting network parameters using the particle swarm optimization algorithm, the TS fuzzy neural network can be optimized, accelerating convergence and reducing oscillations during the process.

[0080] The beneficial effects of this invention are as follows:

[0081] (1) Existing technologies only target one aspect of identification, such as partial least squares regression to identify the aroma type of baijiu and principal component analysis to evaluate the quality of baijiu. The method proposed in this invention can achieve both aroma type identification and grade classification based on the content of trace components in baijiu.

[0082] (2) Due to the nonlinear relationship between evaluation levels, the graded evaluation has problems of imperfection and large differences in indicators. Applying fuzzy neural networks can help overcome this confusion and achieve a unified grade division when there are many different physicochemical indicators.

[0083] (3) The manual evaluation method has a large subjective error and random factors. Using physicochemical indicators to identify and evaluate baijiu is a more objective and rigorous method that can fairly identify and evaluate the aroma type and grade of baijiu.

[0084] (4) Replacing manual evaluation with a fuzzy neural network framework improves the efficiency of liquor identification and evaluation, and is also relatively simple to operate. Only the physicochemical indicators of the liquor to be identified need to be input, and the fuzzy neural network can output the identified aroma type and corresponding grade. Optimization using a particle swarm optimization algorithm gives the network better adaptability and robustness.

[0085] (5) Analyzing the aroma and grade of baijiu from the perspective of trace components with numerical values ​​helps the baijiu industry establish unified identification and evaluation standards and improve evaluation indicators.

[0086] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0087] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0088] Figure 1 The operating plan for the winery;

[0089] Figure 2 This is a flowchart illustrating the design of the present invention.

[0090] Figure 3 The structure is a TS fuzzy neural network.

[0091] Figure 4 A flowchart for network training operations to differentiate fragrance types;

[0092] Figure 5 Here is a flowchart of the network training process;

[0093] Figure 6 For training operation flowchart. Detailed Implementation

[0094] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0095] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0096] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0097] This invention addresses the process of determining the aroma type and grade of baijiu (Chinese liquor) based on its physicochemical indicators. It designs a model using a fuzzy neural network to establish the relationship between relevant physicochemical indicators and the aroma type and grade of baijiu. This model has reference value for baijiu aroma type identification and grading, and the method of using physicochemical indicators for evaluation is relatively objective. Since physicochemical indicators have many independent variables, high correlation, and strong uncertainty, partial least squares regression can be used to process the data first, followed by training with a fuzzy neural network. Utilizing the fuzzy reasoning and self-learning capabilities of the fuzzy neural network, the identification and evaluation of baijiu aroma type and grade can be achieved based on physicochemical indicators.

[0098] The operating procedure for wineries in this invention is as follows: Figure 1 As shown in the figure. (r1, r2, ..., r m The ) represents the physicochemical indicators of baijiu (Chinese liquor), specifically the content of trace components, where m is the total quantity of trace components. To achieve the above objectives, the specific design process in this invention is as follows: Figure 2 As shown, it includes the following five steps:

[0099] S1: Obtain experimental data.

[0100] Multiple sets of physicochemical indicators, i.e., trace component contents of baijiu, of different aroma types were measured by gas chromatography. For ease of description, each aroma type is assumed to have 5 grades (I, II, III, IV, V), and we will temporarily take the strong aroma type Y as an example. N Y-type sauce aroma J Lightly fragrant type Y Q Phoenix Fragrance Type Y FTo ensure sufficient data, representative samples were taken from five grades of baijiu across four aroma types. Each representative sample was sampled six times to minimize random errors. The four types of samples were labeled Y according to their grade. N (wu),Y J (wu),Y Q (wu),Y F (wu), w=I,II,…,V corresponds to five levels, u=1,…,6 corresponds to six samplings.

[0101] The obtained trace component contents include formic acid, acetic acid, propionic acid, butyric acid, isovaleric acid, hexanoic acid, lactic acid, total acid, total esters, acetaldehyde, acetal, n-propanol, isobutanol, isoamyl alcohol, ethyl acetate, ethyl butyrate, ethyl lactate, and ethyl hexanoate, totaling m trace components, with corresponding physicochemical indices (r1, r2, ..., r...). m ).

[0102] S2: Data preprocessing, selecting auxiliary variables related to aroma type.

[0103] Partial least squares regression is a typical regression analysis method in machine learning, combining the functions of multiple linear regression, principal component regression, and least squares. It can identify several relevant variables that have a significant impact on the dependent variable from data with small sample sizes, high correlation, and many independent variables.

[0104] The data preprocessing process in this invention first divides the sampled data in S1 into four categories based on aroma type. Then, partial least squares regression is used to select auxiliary variables that have a significant impact on aroma type classification, namely, the content of several trace components with large regression coefficients. The independent variables are physicochemical indicators (r1, r2, ..., r...). m Since the identification only considers the aroma type, the dependent variable Y can be set as follows: strong aroma Y=0, soy sauce aroma Y=1, light aroma Y=2, and phoenix aroma Y=3.

[0105]

[0106] After selecting several auxiliary variables with large regression coefficients and removing several variables with weak correlation, the final variables used for aroma identification are (r1,…,r). n The content of a total of n trace components is determined. Physicochemical indicators (r1,…,r) used for aroma identification are also considered. n After filtering, the data corresponding to the assigned dependent variable Y is the preprocessed liquor data.

[0107] S3: Fuzzy neural network training to identify the aroma of baijiu.

[0108] S31: TS fuzzy neural network.

[0109] Fuzzy reasoning is similar to human thought processes and is suitable for problems with fuzziness and uncertainty. Most knowledge possesses characteristics of fuzziness and uncertainty, and the identification and grading of aroma types in baijiu (Chinese liquor) also exhibits these characteristics.

[0110] Fuzzy reasoning consists of a domain, elements, and sets. Domain: All objects discussed during the reasoning process. Element: The object within the domain. Set: The entire set of elements that share certain definite and distinguishable characteristics. Membership degree is usually used to describe the degree to which an element belongs to a set. The general form of a fuzzy rule is an IF-THEN statement, which will be elaborated on in the subsequent TS fuzzy logic system section.

[0111] Neural networks possess self-learning and adaptive characteristics, offering significant advantages in parameter update and correction. Fuzzy neural networks combine the advantages of fuzzy reasoning and neural networks, making them superior to simple logical reasoning and neural networks. They can describe the nonlinear relationship between physicochemical indicators and grade evaluation in liquor grading based on prior knowledge, thus improving the evaluation indicators. This invention selects the TS fuzzy neural network, a typical mechanism for fuzzy modeling of complex nonlinear systems, which constitutes a linear combination of various rules.

[0112] In the TS fuzzy logic system, a rule is described using the IF and THEN statements:

[0113]

[0114] In the formula R v This represents the v-th rule in the rule set. This represents the fuzzy set in this rule. c is a constant in this rule. That is, the system output can be represented by a linear combination of the inputs, which can be converted into a numerical correspondence.

[0115] The neural network structure consists of an antecedent network and an consequent network. The antecedent part is the IF (premise) part in classical fuzzy theory, and the consequent part is the THEN part. In this invention, the system is a multiple-input single-output (MISO) system, where each consequent sub-network produces one output. Therefore, for a single-output system, there is only one consequent network. Let the input variables be x = [x1, ..., x...]. n There are a total of n inputs, p rules, and the output variable is Y, which is the aroma type of baijiu.

[0116] TS fuzzy neural network topology as follows Figure 3 As shown.

[0117] (1) Precursor Network (Feature Network)

[0118] First layer: Input layer, each node represents an input variable x. i (i = 1, ..., n), that is, the content r of the trace components in the selected liquor. i .

[0119] The second layer, the fuzzification layer, receives the input variables from the first layer and calculates the membership function of the fuzzy set corresponding to the input variables. A Gaussian function is chosen as the membership function for this TS fuzzy neural network, i.e.

[0120]

[0121] In the formula Let c be the membership function of the i-th auxiliary variable j-th. ij With b ij are real constants, representing the mean and variance of the membership function, respectively, which correspond to the center and width of the Gaussian function.

[0122] The third layer: the rule layer. Each node corresponds to one fuzzy rule, for a total of p fuzzy rules. Weights are calculated using two methods: minimum value and multiplication. In this invention, the membership degrees of the output are multiplied to perform fuzzy calculation, obtaining the applicability of each rule, denoted by θ. j To indicate,

[0123]

[0124] In the formula, j corresponds to the j-th rule, n is the number of input variables, and p is the number of rules.

[0125] The fourth layer is the defuzzification layer, which performs a normalization operation on the applicability of each rule and outputs the normalized data.

[0126]

[0127] (2) Aftermath Network (Functional Network)

[0128] The first layer is the input layer, where the zeroth input is not the trace component content of the liquor, but a constant value x0 = 1, used to represent the constant term in the fuzzy rule. Each of the remaining nodes represents an input variable x. i (i = 1, ..., n), representing the trace component content of baijiu.

[0129] The second layer: the intermediate layer, also known as the fuzzy rule layer, is used to match fuzzy rules. Each node matches one rule, so there are a total of p nodes. Each rule matches a corresponding weighted parameter, calculated as follows:

[0130]

[0131] In the formula, x0 = 1, Y j The j-th inference part corresponding to the fuzzy rule, These are the weighting parameters of the neural network.

[0132] Third layer: Output layer, combining the output of the preceding network. The applicability of each rule is characterized, and then the final output of the entire system is calculated, namely the aroma type Y corresponding to the liquor. As a multi-input single-output system, there is only one output Y in the end.

[0133]

[0134] Particle Swarm Optimization (PSO) algorithm is used to evaluate network parameters. Membership function center and width c ij ,b ij By making optimizations and corrections, the particle swarm optimization algorithm can make the values ​​of particles tend towards the optimal particle in the swarm by interacting with information between particles in solving optimization problems.

[0135] The error function is defined as:

[0136]

[0137] In the formula Y g Y is the desired fragrance value output by the model, where Y is the actual fragrance value output by the fuzzy neural network.

[0138] In this problem, the Particle Swarm Optimization (PSO) algorithm is used to optimize a fuzzy neural network. Each particle is first randomly initialized, and then the optimal value is obtained through iterative updates. The weighted parameters of the TS fuzzy neural network's consequent network, the center and width of the membership function, are used as particles, and the fitness value in the algorithm is the prediction error E. Particles update their velocities based on their experience with surrounding particles, tracking their individual optimal values. b With the global optimal value g b To track its own position and avoid getting trapped in local optima, the global optimum is only the optimum value d within the particle's local neighborhood. b .

[0139] The PSO algorithm solution process is as follows:

[0140] 1) Random initialization of particles in D-dimensional space

[0141] 2) Calculate the fitness value, i.e., the training error of the TS fuzzy neural network.

[0142] 3) Update the optimal values ​​of individual particles and the overall optimal values ​​of the particle swarm; update the particle velocity v and position p. The update formula is:

[0143] V i,h+1 =ω*Vi,h +c1*r1*(l i,h -P i,h )+c2*r2*(d i,h -P i,h )

[0144] P i,h+1 =P i,h +V i,h+1

[0145] In the formula Let be the velocity of the i-th particle at time h. Let be the position of the i-th particle at iteration h, corresponding to the weighting parameters of the consequent network. Let be the individual optimal value of the i-th particle at time h. Let ω be the local neighborhood optimal value of the i-th particle at time h-th iteration. c1 and c2 are constants, r1 and r2 ∈ [0,1] are randomly generated constants, and ω is the inertia weight.

[0146] 4) Determine if the termination condition is met (the number of iterations in the particle swarm optimization algorithm reaches its maximum value).

[0147] By correcting network parameters using the particle swarm optimization algorithm, the TS fuzzy neural network can be optimized, the convergence speed can be accelerated, and the oscillations during the process can be reduced.

[0148] S32: Network Training Process

[0149] Because the content of trace components in baijiu varies considerably, the data is first normalized to avoid excessive prediction errors during network fitting. The normalization process is as follows:

[0150]

[0151] Normalization ensures the variable range is x∈[0,1], eliminating significant quantitative errors. Initialize parameters: the mean and variance of the membership function in the fuzzy neural network system, i.e., the center and width c of the membership function. ij ,b ij and various weighting coefficients All numbers are initialized to random numbers within (0,1); the number of rules is calculated according to p = 2n + 1.

[0152] By matching the input and output, 70% of the dataset is used as training data and 30% as test data. The model is implemented using MATLAB programming. After importing the data, the network can be trained, and the training effect is evaluated using an error function. The specific operation process is as follows: Figure 4 .

[0153] The Particle Swarm Optimization (PSO) algorithm is used for correction, and the process of optimizing the TS fuzzy neural network is as follows: Figure 5 As shown, optimization correction is completed once the termination condition is met. Since the particle swarm optimization algorithm is sensitive to the food input, the parameters ω, c1, and c2 cannot be randomly generated directly; instead, suitable parameters are pre-set based on relevant data. In the figure, num represents the number of input training samples, and ε is a preset small threshold, used to indicate that training is complete when the error converges to a small value.

[0154] S4: Data preprocessing, selecting auxiliary variables related to grade for specific aroma types.

[0155] The data of strong-aroma baijiu obtained in S1 is divided and classified according to the grade of strong-aroma baijiu.

[0156] The auxiliary variables and outputs for different aroma types of baijiu are different. Taking strong aroma type as an example, according to the partial least squares regression method mentioned above, the auxiliary variables that have the greatest impact on the grade evaluation in strong aroma type are selected. It needs to be distinguished from S2. S2 determines the variables related to aroma type through partial least squares regression method, while S4 determines the variables related to baijiu grade under a specific aroma type. That is, the contents of several trace components that have the greatest impact on grade classification under a specific aroma type are selected as auxiliary variables and input into the fuzzy neural network.

[0157] After selecting the variables, the number of input variables q can be determined. The network input is (x1,…,x…). q The corresponding auxiliary variables (r1,…,r) are selected. q The rule number is calculated according to p = 2q + 1, and the output is the grade of the corresponding aroma type of baijiu, denoted as y. According to the previous definition, it is divided into five grades. Each grade is randomly sampled six times, and a random value near the grade number is assigned. Taking other strong-aroma baijiu samples classified as grade I as an example, one sample is randomly selected and assigned the value 1 to y, while the other five are assigned the value 1 + rand(-0.2, 0), where rand() represents a random value within the interval. To ensure the model training effect, other baijiu samples that meet the grade classification can also be taken simultaneously in the neural network training data, and the assignment process is the same. The final value of y and the correspondence between the grade are defined as follows (taking strong-aroma baijiu as an example).

[0158] Grades of strong-aroma baijiu:

[0159] S5: Training a fuzzy neural network to evaluate the grade of baijiu under a specific aroma type.

[0160] The setup for the fuzzy neural network is similar to that in S4. It's important to note the difference in labeling methods between the datasets for grade classification and those for aroma type recognition. The input variable is x = [x1, ..., x...]. qThe system has a total of q input variables, p rules, and an output variable y, which represents the grade of the baijiu under the corresponding aroma type. Initialization: c in the membership function of the fuzzy neural network system... ij ,b ij and various weighting coefficients All numbers are random numbers within the range (0,1).

[0161] The definitions in the network are basically the same as those in S4, except for variables and rules, so they will not be repeated here. Consistent with the description in S4, y characterizes the applicability of each rule. j The inference part corresponding to the fuzzy rule is that the output of the multi-input single-output system is the level y corresponding to a specific fragrance type.

[0162]

[0163] The error function in a learning algorithm is defined as follows:

[0164]

[0165] In the formula y g y represents the desired output level value of the model, and y represents the actual output level value of the fuzzy neural network.

[0166] The Particle Swarm Optimization (PSO) algorithm is used for correction, and the TS fuzzy neural network is optimized with a preset small error threshold ε. N This indicates that training is complete when the error converges to a small value. Optimization and correction process and Figure 5 similar.

[0167] By matching the input and output, 70% of the dataset is used as training data and 30% as test data. The model is implemented using MATLAB programming. After importing the data, the network can be trained, and the training effect is evaluated using an error function. The specific operation process can be represented as follows: Figure 6 .

[0168] Repeat steps S4 and S5 to complete the network training for evaluating the grade of other types of baijiu.

[0169] (1) Divide the data of Maotai-flavor liquor obtained in S1 and classify the data according to the grade of Maotai-flavor liquor. Perform data preprocessing and complete the training of Maotai-flavor liquor grade evaluation network.

[0170] (2) Divide the data of light-aroma baijiu obtained in S1 and classify the data according to the grade of light-aroma baijiu. Perform data preprocessing and complete the training of the light-aroma baijiu grade evaluation network.

[0171] (3) Divide the data of Feng-flavor Baijiu obtained in S1 and classify the data according to the grade of Feng-flavor Baijiu. Perform data preprocessing and complete the training of the Feng-flavor Baijiu grade evaluation network.

[0172] By integrating aroma identification and grading models and utilizing fuzzy neural networks as a fundamental reasoning system, an integrated evaluation framework for the aroma type and grading of baijiu can be constructed. Simply input the relevant trace component information of the baijiu to be identified, and the aroma identification network will identify the aroma type, which will then be fed into the grading model to output the grading information.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for identifying and evaluating the flavor of baijiu (Chinese liquor) based on particle swarm optimization fuzzy neural networks, characterized in that: The method includes the following steps: S1: Obtain experimental data; Multiple physicochemical indicators of baijiu of different aroma types were measured by gas chromatography. Each aroma type was assigned five grades: I, II, III, IV, and V. For now, we will use the strong aroma type. Soy sauce flavor Lightly fragrant Phoenix Fragrance Type For the four aroma types, five grades of baijiu were sampled, with each typical sample taken six times to avoid random errors. The four types of samples were labeled according to their grade. , Corresponding to five levels, Corresponding to six samplings; The obtained trace component contents include formic acid, acetic acid, propionic acid, butyric acid, isovaleric acid, hexanoic acid, lactic acid, total acid, total esters, acetaldehyde, acetal, n-propanol, isobutanol, isoamyl alcohol, ethyl acetate, ethyl butyrate, ethyl lactate, and ethyl hexanoate, totaling [amount missing]. m The trace components, and their corresponding physicochemical properties are as follows: ; S2: Data preprocessing, selecting auxiliary variables related to aroma type; The sampled data in S1 were divided into four categories based on aroma type, and partial least squares regression was used to determine the classification of these categories. m The regression coefficients corresponding to each trace component are determined and sorted in descending order of these coefficients. The coefficients with the highest values ​​are then selected. n Trace components were used as auxiliary variables for aroma identification; the independent variables were physicochemical indicators. Only for fragrance type identification, dependent variable Y Based on the fragrance type, it is classified as a strong fragrance. Y =0, soy sauce flavor Y =1, Light Fragrance Y =2, Phoenix Fragrance Type Y =3, that is The variables ultimately used for fragrance identification are ,total n Content of trace components; physicochemical indicators used for aroma identification After filtering, the dependent variable is assigned a value. Y The corresponding data is the preprocessed liquor data; S3: Fuzzy neural network training to identify the aroma type of baijiu; S31: TS fuzzy neural network; In the TS fuzzy logic system, a rule is described using the IF and THEN statements: In the formula Represents the first rule in the rule set. v Rule 1 This represents the fuzzy set in this rule. All of these are constants in this rule, meaning that the system's output is represented by a linear combination of the inputs, which is converted into a numerical correspondence. The neural network structure consists of an antecedent network and an consequent network. The antecedent part is the IF (premise) part in classical fuzzy theory, and the consequent part is the THEN part. This method utilizes a multi-input single-output (MISO) system, where each consequent subnetwork produces one output. For a single-output system, the consequent network contains only one network. Let the input variable be... ,total n There are input values ​​and a total of rules. p The output variable is... Y This refers to the aroma type of baijiu (Chinese liquor). The topology of the TS fuzzy neural network is as follows: (1) Antecedent network First layer: Input layer, where each node represents an input variable. That is, the content of trace components in the screened liquor ; The second layer: the fuzzification layer, receives the input variables from the first layer network and calculates the membership function of the fuzzy set corresponding to the input variables; a Gaussian function is selected as the membership function of this TS fuzzy neural network, that is: In the formula For the first i The first auxiliary variable j Membership function, and are real constants, representing the mean and variance of the membership function, respectively, corresponding to the center and width of the Gaussian function; The third layer: the rule layer, where each node corresponds to a fuzzy rule, totaling... p There are several fuzzy rules; the weights can be calculated using two methods: minimum value and multiplication. The membership degrees of each output are then multiplied to perform fuzzy calculation, yielding the applicability of each rule. To indicate, In the formula j Corresponding to the j Rule 1 n The number of input variables. p For the number of rules; The fourth layer is the defuzzification layer, which performs a normalization operation on the applicability of each rule and outputs the normalized data. ; (2) After-process network The first layer is the input layer, where the zeroth input value is not the content of trace components in the liquor, but a constant value. One node represents the constant term in the fuzzy rule; the remaining nodes each represent an input variable. This refers to the content of trace components in baijiu (Chinese liquor). The second layer: the intermediate layer, also known as the fuzzy rule layer, is used to match fuzzy rules. Each node matches one rule, and there are a total of [number missing]. p For each node, each rule matches a corresponding weighted parameter, calculated as follows: In the formula, , The corresponding fuzzy rule j One inference section, These are the weighting parameters of the neural network; Third layer: Output layer, combining the output of the preceding network. This characterizes the applicability of each rule, and then calculates the final output of the entire system, which is the aroma type of the baijiu. Y A multi-input single-output system ultimately has only one output. Y ; Particle Swarm Optimization (PSO) algorithm was used to analyze network parameters. Membership function center and width , By making optimizations and corrections, the particle swarm optimization algorithm uses the interaction of information between particles to make the values ​​of the particles tend towards the optimal particle of the swarm in solving optimization problems. The error function is defined as: In the formula Output fragrance values ​​for the desired model. Y This represents the actual fragrance type value output by the fuzzy neural network. S32: Network Training Process The normalization operation is as follows: Normalization ensures that the range of variables is [value missing]. Initialize the parameters: the mean and variance of the membership function in the fuzzy neural network system, i.e., the center and width of the membership function. , and various weighting coefficients All numbers are initialized to random numbers within (0,1); the rule number is determined according to... p =2 n +1 is used for calculation; Match the input and output, take 70% of the dataset as training data and 30% as test data, implement the model using MATLAB programming, train the network after importing the data, and use the error function to evaluate the training effect of the network. The particle swarm optimization (PSO) algorithm is used for correction, and the optimization correction is completed when the termination condition is met. S4: Data preprocessing, selecting auxiliary variables related to grade for specific aroma types; The data of strong-aroma baijiu obtained in S1 is divided and classified according to the grade of strong-aroma baijiu. The content of trace components that have the greatest impact on grading under a specific aroma type is selected as an auxiliary variable and input into the fuzzy neural network. After selecting variables, determine the number of input variables. q Network input is Corresponding auxiliary variables The number of rules is based on p =2 q The calculation is incremented by 1, and the output is the grade of the corresponding aroma type of baijiu, denoted as... y The system is divided into five levels; each level is randomly sampled six times, and a random value near the corresponding number of that level is randomly assigned. For those classified into levels Other strong-aroma liquor samples, randomly select one of the samples for sampling. y The value is 1, and the other five values ​​are 1+rand(-0.2,0), where rand() represents randomly selecting a value within the range; the final value is specified as 1. y The correspondence between numerical values ​​and levels is as follows: S5: Training a fuzzy neural network to evaluate the grade of baijiu under a specific aroma type. The input variables for the dataset corresponding to the level division are ,total q There are input values ​​and a total of rules. p The output variable is... y This corresponds to the grade of baijiu under the specified aroma type; initialization: the membership function of the fuzzy neural network system... , and various weighting coefficients All numbers are random numbers within the range (0,1); Consistent with the description in S4, it characterizes the applicability of each rule. Corresponding to the inference part of the fuzzy rule, the output of this multi-input single-output system is the grade corresponding to a specific aroma type. y ; The error function in a learning algorithm is defined as: In the formula Output the desired level value for the model. y This represents the actual output level value of the fuzzy neural network; The Particle Swarm Optimization (PSO) algorithm is used for correction, and the TS fuzzy neural network is optimized with a preset error threshold. When the error value of the error function is less than the error threshold When the network training has converged and training is complete, it is determined that the training has ended. Match the input and output, take 70% of the dataset as training data and 30% as test data, implement the model using MATLAB programming, train the network after importing the data, and use the error function to evaluate the training effect of the network. Repeat S4 and S5 to complete the training of the evaluation network for other types of baijiu. (1) Divide the data of sauce-flavored liquor obtained in S1 and classify the data according to the grade of sauce-flavored liquor; perform data preprocessing and complete the training of sauce-flavored liquor grade evaluation network; (2) Divide the data of light-aroma baijiu obtained in S1 and classify the data according to the grade of light-aroma baijiu; perform data preprocessing and complete the training of the light-aroma baijiu grade evaluation network; (3) Divide the data of Fengxiang-flavored liquor obtained in S1 and classify the data according to the grade of Fengxiang-flavored liquor; perform data preprocessing and complete the training of the Fengxiang-flavored liquor grade evaluation network. An integrated evaluation framework for the aroma type and grade of baijiu is constructed. The relevant trace component information of the baijiu to be identified is input, the aroma type is identified through the aroma type identification network, and then the grade evaluation model is input to output the grade information.

2. The method for identifying and evaluating the flavor of baijiu (Chinese liquor) based on particle swarm optimization fuzzy neural network according to claim 1, characterized in that: The Particle Swarm Optimization (PSO) algorithm is used to optimize fuzzy neural networks. Each particle is first randomly initialized, and then the optimal value is obtained through iterative updates. The weighting parameters of the successor network, the center and width of the membership function of the TS fuzzy neural network are used as particles, and the fitness value in the algorithm is the prediction error. E Particles update their velocity based on their experience with surrounding particles, tracking their individual optimal values. With global optimum To track its own position and avoid getting trapped in local optima, the global optimum is only the optimum within the particle's local neighborhood. ; The PSO algorithm solution process is as follows: 1) D Random initialization of particles in dimensional space 2) Calculate the fitness value, i.e., the training error of the TS fuzzy neural network. 3) Update the optimal values ​​of individual particles and the optimal values ​​of the swarm particles; update the particle velocity. v With position p The updated formula is: In the formula For the first i Individual particles h The speed at the next iteration time For the first i Individual particles h The position at the next iteration corresponds to the weighting parameters of the consequent network. For the first i The particle in the first h The individual optimal value at the next iteration. For the first h The iteration time is... i The local neighborhood optimal value of an individual particle; , It is a constant. A randomly generated constant. Inertial weight; 4) Determine if the termination condition is met, i.e., the number of iterations of the particle swarm algorithm reaches its maximum value; By correcting network parameters using the particle swarm optimization algorithm, the TS fuzzy neural network can be optimized, accelerating convergence and reducing oscillations during the process.

Citation Information

Patent Citations

  • <60>Co-Gamma ray irradiation liquor method with optimized irradiation process parameters

    CN104182572A

  • Wine brewing process optimization method based on big data analysis

    CN111476428A