Abstract
In view of the low control precision, low degree of intelligence, low utilization rate of soybean milk, and poor conjunctiva quality in current Yuba skin production technology, a system of multifactor control and intelligent quality detection for Yuba skin was studied and designed in this paper. The system uses LabVIEW as the upper computer and the single chip microcomputer as the lower computer. Uses programming electronic control technology to set process parameters in advance, precisely control each factor to achieve adaptive control of wind speed, concentration, liquid level, and temperature, the control error of each factor is within 1%, and the quality of Yuba skin was detected by image processing technology. The application of the system greatly improves the production efficiency and intellectualization of the production line and reduces the damage degree of Yuba skin. An orthogonal test and response surface optimization were carried out for the process parameters. The test results show that the accuracy of the test results using radial basis kernel function (RBF) can reach 92.06% when the characteristic combination mode is all the characteristics, and the optimal yield will be 48.57% and the optimal quality score is 9.20 when the export angle is 36.75°, the export diameter is 9.90 mm, the export wind speed is 1.22 m/s, the slurry concentration is 7.66%, the slurry temperature is 83.26°C, and the liquid level is 30.52 mm. Comparison between the results from the regression model validation test and those from the response surface methodology is made. The relative errors of yield and quality were 0.14% and 0.87%, which indicates that the response surface methodology can effectively optimize the process parameters of Yuba skin.
1. Introduction
Yuba skin is also known as Yuba clothes, it is a combination of soy protein membranes and fat, and when the soybean milk is heated, a layer of the film appears on the surface, which is then dried by the cold wind to obtain Yuba skin [1]. Yuba skin is deeply sought after by people because of its rich nutrition, very palatability, easy digestion, and absorption. Studies by many scholars show that the production process conditions of Yuba skin, including slurry concentration, slurry temperature, liquid level, and slurry pH value, have different effects on the yield and quality of Yuba skin [2, 3]. Moreover, the yield and quality of Yuba skin produced under different process conditions are clearly different [4]. According to the actual production demand, adaptive adjustment of appropriate process parameters, not only effectively improves the efficiency of soybean milk conjunctival, but also optimizes the color degree of Yuba skin, to improve the yield and quality of production, and reduces the waste of soybean milk. At present, the Yuba skin production machine independently designed and researched in China has a low degree of intelligence and a relatively simple control system [5]. Therefore, how to realize the precise control of process conditions and intelligent quality detection are greatly significant to improve the yield and quality of Yuba skin. How to optimize the production line of Yuba skin, select appropriate process parameters, enrich the operating system to reduce the damage degree of Yuba skin, and improve the production rate and quality are the current mainstream research directions [6].
Aiming at the problems of control accuracy is not high in current production technology of Yuba skin, low degree of intelligence, inconsistent production formula, soybean milk utilization rate is not high, conjunctiva quality is poor, etc. [7], the multifactor control system and intelligent quality detection system are researched and designed. The system uses the STC51 single-chip microcomputer as the lower computer, and the LabVIEW control system is designed as the upper computer to accurately control a variety of production process conditions, and the image processing technology is used to detect the quality of Yuba skin intelligently, improving the intelligent degree of Yuba skin production machine [8, 9]. At the same time, the optimized process parameters are determined by an orthogonal test, and the yield and quality are improved [10].
2. Materials and Methods
2.1. Test Materials
Heilongjiang high protein soybean Hairui No. 2 was used as experimental material. The equipment used in the test is a portable computer, Yuba kin production equipment, HWF-24100, STC12C5A60S2 microcontroller, KF-102 slurry concentration sensor, DS18B20 slurry temperature sensor, HC-SR04 liquid level sensor, AR866 wind speed sensor, RST232 serial port communication, and HY-809B industrial electronic scale. The main parameters of Yuba skin production equipment are shown in Table 1.
As different grades of Yuba skin have certain differences in texture and morphology. Therefore, the quality of Yuba skin can be detected by image processing technology. The standard of quality grading of Yuba skin includes color, uniformity of color, and surface texture, according to the quality standard, Yuba skin can be divided into three grades (Master, Medium, and Inferior). Sample images of different grades of Yuba skin are shown in Figure 1, and Table 2 shows the quality grade classification standards of Yuba skin.

(a)

(b)

(c)
2.2. Design of Multifactor Control System
STC12C5A60S2 single chip microcomputer is used as the main control system, and the multifactor control system includes the control and monitoring function of the production of Yuba skin.
2.2.1. Overall System Structure Design
The software and hardware of the multifactor control system are developed by KEIL and Proteus 8, and the core algorithm of the control system is simulated and optimized by MATLAB to improve the response speed of the control system and reduce the overshoot. Remote monitoring and control are realized by RS232 serial communication and LabVIEW. The sensors collect the four factors of slurry level, concentration, temperature, and wind speed in real-time. The collected analog signal is converted into a digital signal through A/D and input into the MCU. The value of each factor measured by the sensors is displayed in real-time by the LCD12864 display module, if the value is not in the preset range, the alarm module and the controller response module are started, to complete the multifactor adaptive control and adjustment. The overall block diagram of the multifactor control system for Yuba skin production is shown in Figure 2.

2.2.2. Control System Algorithm Design
Fuzzy adaptive PID is used as the core algorithm of the multifactor control system to reduce the stability error and improve the dynamic response speed of the system [11]. The fuzzy domain of the two input deviation “e” and the rate of deviation change “ec” are defined as [−6,6], and the fuzzy domain of the three outputs △Kp, △Ki, and △Kd are defined as [−3,3]. The fuzzy domain corresponds to seven language variables {NB, NM, NS, ZO, PS, PM, and PB}, respectively. According to the selected field of the fuzzy domain, the quantization factors Ke = 0.3, Kec = 15 and the resolution factors K1 = 0.5, K2 = 0.01, and K3 = 2 are obtained to realize the corresponding relationship between fuzzy quantity and actual quantity. Considering the large lag and complexity of the multifactor control system of Yuba skin production, the “trimf” type is selected as the membership function of “e” and “ec”, and the “gauss” type membership function is used for the output values △Kp, △Ki, and △Kd. According to the fuzzy control rules, the “Mamdani” method is used for reasoning, the fuzzy relation matrix is confirmed by taking small operations, and the control rule diagrams of △Kp, △Ki, and △Kd are obtained.
2.2.3. Control System Circuit Design and Simulation
The model of the HOPE62-32 general solenoid valve is selected as the concentration control valve of the control system, and the concentration of slurry in the conjunctival pool is controlled by controlling the opening and closing of the solenoid valve. The flow control valve of model G641J is selected as the liquid level control valve of the control system, and the flow of the slurry is controlled through the operation of the motor to control the liquid level of the slurry. The AS15050HA2BL industrial mute fan is selected as the wind speed controller of the control system, and the wind speed at the export of the cold air duct is controlled by controlling the speed of the fan, and the slurry temperature is controlled by the heater, and fan for heating and cooling control. After the circuit schematic design was completed, the circuit of the multifactor control system is simulated, and the result is shown in Figure 3. The current LCD module shows that the wind speed is 1.32 m/s, the liquid level is 33.6 mm, the concentration is 7.5%, and the temperature is 89°C.

2.2.4. Host Computer Software Design
The upper computer uses LabVIEW, a graphical programming software program developed by National Instruments, to record the slurry temperature, slurry level, slurry concentration, and export wind speed above the conjunctival tank. The host computer LabVIEW monitoring interfaces are shown in Figure 4. The VISA function in LabVIEW is used to realize serial port control. The serial port control system primarily entails configuring, reading, writing, and closing the serial port. First, the serial port is configured as follows: the serial port number is set to COM1, the baud rate is set to 9600, and the number of data bits is set to 8 bits, with 1 stop bit and no parity bit. Subsequently, while the loop is implemented to prevent the program from stopping for a long time, the VISA function is used to read the attribute nodes of the serial port by using bytes at the port in the middle. The serial port data are then read, and the value of each multifactor is read. Finally, the serial port is closed [12, 13].

(a)

(b)

(c)

(d)
2.3. Quality Detection System Design of Yuba Skin
In the process of the conjunctiva of Yuba skin, different grades of Yuba skin have some differences in texture and morphology. Therefore, the extraction of texture features of Yuba skin can be used for image feature description carefully [14–16].
2.3.1. System Scheme Design
We use machine vision technology to judge the surface quality of Yuba skin and combine gray characteristic value and multitexture characteristic value to obtain the quality of Yuba skin. Compared with traditional sensory judgment, machine vision technology can effectively improve accuracy. To develop the quality detection system for Yuba skin, we have designed the quality system scheme, as shown in Figure 5. First of all, the region of interest (ROI) should be selected from the image captured by the camera before quality detection, and the ROI region extracted should be taken as the sample image of the system. Analyze the gray histogram distribution of sample images through MATLAB, and carry out histogram equalization to reduce errors. Extract the gray characteristic value, gray level co-occurrence matrix (GLCM), and gray level run length matrix (GLRLM) characteristic value of the equalized images, then the gray characteristic value contains only one factor, while GLCM and GLRLM each contain 4 factors. The SVM quality detection model is established based on the data of the three groups of characteristic values, and the 9 factors with different combination methods are detected by the model. To select the appropriate kernel function, we use different kernel functions to test the quality detection model and conduct a comparative analysis of the test results.

The sample image collection system consists of a closed enclosure (500 mm × 500 mm×1500 mm), an LED circular light source, an industrial camera (Basler ACE a2A 1920-160ucBAS), and a portable computer (Lenoy-Desktop-P6RAN3Q). The LED circular light source is placed under the Yuba skin, and the light emittance controller is used to set the brightness of the light source. The lens of the camera is facing the Yuba skin, and the distance between the lens and the object is 200 mm, the shooting area is 300 mm × 300 mm. The sample image collection system is shown in Figure 6.

2.3.2. Multicharacteristic Value Extraction
The factors affecting the quality of Yuba skin mainly include processing equipment and process conditions. In the process conditions, the increase of slurry concentration, higher protein content, and darker color of Yuba skin are the main reasons for the quality change. Therefore, we need to further explore whether there is a certain correlation between the average gray characteristic value and the quality of Yuba skin. The sensory method is used to measure the quality score of the samples produced under different concentrations, at the same time, the image processing method is used to measure the gray characteristic value of the samples under different concentrations. Then, the degree of darkness (DOD) on the surface of Yuba skin is obtained by normalization (1), in the equation, 255 represents the value of the brightest pixel (white), and 0 represents the value of the darkest pixel (black). The results of linear fitting of image processing results (predicted data) and sensory score results (experimental data) show that there is a strong correlation between the gray characteristic value and the quality of Yuba skin (Y = 11.43x + 3.78, R2 = 0.9909). Therefore, the gray characteristic value can be used as an alternative method to detect the quality of Yuba skin.
Master, medium, and inferior Yuba skin sample images are randomly selected, with 50 for each grade. First, the gray histogram distribution of the Yuba skin sample image is analyzed by MATLAB, the histogram equalization is carried out, and then the gray characteristic value is extracted from the image after the equalization. The results show that the variation of DOD of master and medium Yuba skin is relatively stable, and the distribution range is concentrated in 0.38–0.43 and 0.32–0.35, respectively. The DOD of the inferior Yuba skin varies greatly, and its distribution range is significantly different from that of the other two grades. The DOD of the inferior Yuba skin is mainly concentrated in the range of 0.22–0.31.
Grayscale processing and grayscale quantization are performed on 150 sample images in MATLAB. GLCM is obtained by calling the “Gray-Comatrix” function, and then GLCM characteristic values are extracted. Characteristic value factors are calculated, including angular second moment (ASM), contrast (CON), Correlation (COR), and inverse different moment (IDM). According to the analysis of GLCM characteristic value data results, the GLCM characteristic values of the three different grades of Yuba skin have obvious differences, so the GLCM characteristic values are suitable for the quality detection standard of Yuba skin. CLCM characteristic values are shown in Figure 7.

(a)

(b)

(c)

(d)
GLRLM is obtained by calling the “get-Gray-Level-Rumatrix” function on the same 150 sample images, and then GLRLM characteristic values are extracted. Characteristic value factors are calculated, including short-run emphasis (SRE), long-run emphasis (LRE), gray level different uniformity (GLD), and run-length different uniformity (RLD). According to the analysis of GLRLM characteristic value data results, The GLRLM characteristic values of the three different grades of Yuba skin also have obvious differences, so the GLRLM characteristic values are suitable for the quality detection standard of Yuba skin. CLRLM characteristic values are shown in Figure 8.

(a)

(b)

(c)

(d)
2.3.3. Quality Detection System Model Construction Based on SVM
In this paper, 150 sample images are collected for training to build an SVM quality detection model, and different kernel functions are used in the model for sample training. The optimal solution of the penalty factor “c” and the kernel parameter value “” in the model is obtained by cross-verification method, in which the parameters “coef” and “d” are set as the default values of the system. The training module conducts training and learning on the sample set many times and obtains the quality detection model, to carry out quality detection on the test set through this model. The model training results show that when the optimal parameters of the model are Best “c” = 3.50 and Best “” = 0.98, the robustness of the SVM model is optimal [17].
The multicharacteristic value factors collected in real-time are input into the established SVM model as input values, and the intelligent detection of Yuba skin quality is realized through SVM models with different kernel functions. The test results show that the accuracy of the SVM quality detection system improves gradually with the increase of the number of factors in the combination of characteristic values; when the characteristic combination mode is ASM + CON + COR + IDM + SRE + LRE + GLD + RLD + DOD, the accuracy of the test results using radial basis kernel function (RBF) can reach 92.06%, and the test results are shown in Table 3.
2.3.4. Quality Detection Software Interface Design
Based on the basic principle of the RBF-SVM detection system, this paper calls the GUIDE graphical interface design library of MATLAB to independently develop SVM Yuba skin quality detection software. The software interface mainly includes an image preprocessing module, multicharacteristic extraction module, and RBF-SVM quality detection module. In the actual operation, click “Choose” button first and the software will automatically select the Yuba skin image that needs quality detection and output the result. After the program runs, the factor value with multi-characteristic value will be displayed. Through the test, the software has friendly human-computer interaction and meets the requirements of intelligent detection of Yuba skin. The software interface is shown in Figure 9.

2.4. Test Platform Construction
The system is debugged and analyzed, and the test platform is constructed. First, the signal acquisition and amplification circuit are debugged. This process primarily entails adjusting the amplification factor for the accurate acquisition of information. Second, the multimeter is connected to the A/D channel of the single-chip microcomputer to view the output voltage change and debug the circuit. The measured voltage value is compared with the quantized digital value, and the error in the quantization process is corrected. Finally, the serial communication module is debugged, and the serial port is used to send and receive data to and from the microcontroller to evaluate whether the results are consistent.
To verify the data collection accuracy of each sensor, data measured by standard instruments and sensors are used for comparative analysis. Analysis results show that the measured temperature is within 0.2°C of the actual temperature, the measured concentration is within 0.1% of the actual concentration, the measured export wind speed value is within 0.08 of the actual export wind speed value, and the measured liquid level is within 0.5 mm of the actual liquid level. Thus, the system error does not affect the continuous conjunctival of Yuba skin, which satisfies the design requirements.
3. Results and Discussions
3.1. Single-Factor Test
In front of the orthogonal experiment optimization process parameters, to be determined by a single factor experiment the influence law of different factors. Given one factor as a variable and the other factors as fixed values, the effects of single-factor values on the quality and yield of Yuba skin are investigated, the yield is calculated by (2), the quality score is through the quality intelligent detection system. Seven different test values are taken for each group of single factor tests. Three parallel tests are carried out for each group of tests and the average value is taken. Through single factor tests, the independent influence law of six different factors including the liquid level, concentration, temperature, and wind speed on the quality and yield of Yuba skin is obtained, and the orthogonal level range of each factor is selected to provide a parameter basis for the orthogonal test. The yield and quality score of Yuba skin increased first and then decreased with the increase of single factor value, according to the single factor test results in Figure 10. Take the outlet diameter as an example, when the export diameter is 10 mm, the export wind speed is 1.2 m/s, the concentration is 8.5%, the temperature is 85°C, the liquid level is 30 mm, the single factor test is conducted at 0°, 15°, 30°, 45°, 60°, 75°, and 90°, respectively, and the quality score shows a large trend of change. When the export angle is 45°, the highest yield and quality scores are 48.24% and 9.20, respectively.where is conjunctival yield, %; is the quality of Yuba skin after the conjunctiva is completed, ; is the quality of dried beans, ; is water evaporation factor, and the value selected in this test is 1.

(a)

(b)
3.2. Multifactor Orthogonal Test
For the convenience of test statistics, the export angle, export diameter, export wind speed, concentration, temperature, and liquid level are recorded as follows: Xa, Xb, Xc, Xd, Xe, and Xf, respectively. The yield and quality scores are marked as Y and Q, respectively. According to the single factor test results, we can get the independent influence low of six factors on the yield and quality score of Yuba skin and determine the orthogonal level as three levels. Therefore, the orthogonal test in this paper is determined as six factors and three levels, and the test factor levels are shown in Table 4.
After selecting the factor level values, it is necessary to design an orthogonal test table [18, 19]. The test scheme is designed in Design Expert data processing software and a total of 53 test groups are generated. Under normal circumstances, due to the interaction between various test factors and measurement errors in the test, the orthogonal test results will be different. Therefore, an analysis of variance is needed to distinguish these differences to make the analysis of test data more accurate and reliable.
ANOVA is mainly used to judge whether multiple population means are consistent. Let’s assume the data set has 1, …, k, to compare their population mean μ1, μ2, …, μk, whether μ is consistent, it is necessary to sample the experimental data for analysis to make a judgment. That’s the basic problem that ANOVA is trying to solve. Figure 11 shows the concept of ANOVA.

Let the processing digit be k, the number of repeats of each treatment is n1, n2, …, nk, and the total number of experimental observations is N = ∑ni. The sum of squares, degrees of freedom, and mean square deviation of data are represented by SS, df, and MS, respectively. F is used to represent a data test, which is used to judge whether there is a significant relationship between multiple test means, and the corrected number is denoted by C = X2. The variance formula is shown in Table 5.
Through variance analysis, we can obtain a variance analysis table of yield and quality score of Yuba skin, as shown in Tables 6 and 7.
Through the analysis in Table 6 of variance analysis of yield, in the variance model of yield indicates that the response surface regression model has reached an extremely significant difference. According to the significance, it can be concluded that the influence degree of the factors affecting the yield of Yuba skin is export angle > export diameter > export wind speed > concentration > temperature > liquid level. The effect of variance sources A, A2, B2, C2, D2, E2, and F2 on the yield of Yuba skin is extremely significant, while that of variance source BC is significant.
Through the analysis in Table 7 of the variance analysis of the quality score, in the variance model of quality score indicates that the response surface regression model has reached an extremely significant difference. According to the significance, it can be concluded that the influence degree of the factors affecting the quality score of Yuba skin is export angle > export diameter > concentration > export wind speed > temperature > liquid level. The effect of variance sources A, A2, B2, C2, D2, E2, and F2 on the quality score of Yuba skin is extremely significant, while that of variance source BC is significant.
3.3. Response Surface Optimization Analysis
After the yield and quality score variance analysis of Yuba skin are completed, the regression equation model test is carried out on the test results and the insignificant terms are eliminated [20]. According to the data analysis results, the fitting equation of yield and quality of Yuba skin can be obtained, as shown in equations (3) and (4). Response surface analysis is conducted on the orthogonal test results to obtain the optimized process parameters.
The yield and quality scores of Yuba skin are taken as response indexes, and the response surface results of the interaction of 6 factors are shown in Table 8. According to the response surface analysis of the yield of Yuba skin, in 15 groups of response surface results, the response surface is formed by the interaction of export diameter and export angle, its maximum value is 48.57%, the response surface is formed by the interaction of liquid level and slurry temperature, and its response value is the minimum 48.24%. According to the response surface data analysis of production quality score of Yuba skin, in 15 groups of response surface results, the response surface formed by the interaction of export diameter and export angle, its maximum value is 9.20, the response surface formed by the interaction of slurry temperature and export wind speed, its minimum value is 9.07.
The optimal conditions of the production of Yuba skin are obtained by response surface analysis of the orthogonal tests. When the export angle is 36.75°, the export diameter is 9.90 mm, the export wind speed is 1.22 m/s, the slurry concentration is 7.66%, the slurry temperature is 83.26°C, and the liquid level is 30.52 mm, under the optimized process parameters, the optimal yield and quality score of Yuba skin are 48.57% and 9.20, respectively.
3.4. Regression Model Validation
To verify the correctness of the optimized parameters, the regression model validation test of yield and quality is carried out according to the optimized process parameters. Considering the simplicity of the test, the test parameters are selected as the export angle of 36°, the export diameter of 10 mm, the export wind speed of 1.2 m/s, the slurry concentration of 7.5%, the slurry temperature of 83°C, and the liquid level of 30.5 mm. Three regression model validation tests are carried out under this process condition, and the average value of the test results is calculated. We calculate the error between the average value obtained by the test and the predicted value obtained by the response surface method, the relative error between the average value yield of Yuba skin and the predicted value of response surface optimization is 0.14%, the relative error between the average quality score and the predicted value of response surface optimization is 0.87%, both of them are within the effective error, which verifies the rationality of the optimal value obtained by the response surface method. The verification test error table is shown in Table 9.
4. Conclusions
In this paper, multifactor control and intelligent quality detection system are studied and designed. LabVIEW software is used to design the production monitoring system of Yuba skin. SCM and other hardware modules are used for multifactor control, and the quality of Yuba skin is detected intelligently through image processing technology. The intelligent production of Yuba skin is realized, and the yield and quality of Yuba skin are improved effectively. On the premise of realizing the required functions of Yuba skin production, multifactor orthogonal test is carried out to obtain the optimized process conditions, and the optimized parameters are verified by a regression model verification test.
The conclusion is as follows:(i)Systematic error analysis shows that the measured temperature is within 0.2°C of the actual temperature, the measured concentration is within 0.1% of the actual concentration, the measured export wind speed value is within 0.08 of the actual export wind speed value, and the measured liquid level is within 0.5 mm of the actual liquid level(ii)The accuracy of the quality detection system using radial basis kernel function (RBF) can reach 92.06% when the characteristic combination mode is ASM + CON + COR + IDM + SRE + LRE + GLD + RLD + DOD(iii)The response surface analysis results show that the optimal yield is 48.57%, and the optimal quality score is 9.20, when the export angle is 36.75°, the export diameter is 9.90 mm, the export wind speed is 1.22 m/s, the slurry concentration is 7.66%, the slurry temperature is 83.26°C, and the liquid level is 30.52 mm(iv)In the regression model verification test, the relative error between the average value of yield and the predicted value of response surface is 0.14%, and the relative error between the average value of quality score and the predicted value of response surface is 0.87%, both of which are within reasonable error
Data Availability
The data underlying the results presented in the study are available within the manuscript.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments
This research was funded by Anhui Provincial Science and Technology Research Project (no. 1604a0702045) and Provincial Key Scientific Research Project of Anhui Universities (no. KJ2016A238).