# Soft Sensor Modeling Method Based on SPA-GWO-SVR for Marine Protease Fermentation Process

Authors: Zhu Li; Khalil Ur Rehman; Liu Wenhui; Faiza Atique
Journal: Journal of Control Science and Engineering
 (2021)

---

## Abstract

The marine protease fermentation process is a highly nonlinear, time-varying, multivariable, and strongly coupled complex biochemical reaction process. Due to the growth and reproduction of living organisms, the internal mechanism is very complicated. Some key variables (such as cell concentration, substrate concentration, and enzyme activity) that directly reflect the fermentation process's quality are difficult to measure in real-time by traditional measurement methods. A soft sensor model based on a support vector regression (SVR) is proposed in this paper to resolve this problem. To further improve the model's prediction accuracy, the grey wolf optimization (GWO) algorithm is used to optimize the critical parameters (kernel function widthσ, penalty factor c, and insensitivity coefficient ε) of the SVR model. To study the influence of selecting auxiliary variables on soft sensor modeling, the successive projection algorithm (SPA) is used to determine the characteristic variables and compare them with grey relation analysis (GRA) algorithm. Finally, the Excel spreadsheet data was called by MATLAB programming, and the established SPA-GWO-SVR soft sensor model predicted crucial biological variables. The simulation results show that the SPA-GWO-SVR model has higher prediction accuracy and generalization ability than the traditional SPA-SVR model. The real-time monitoring was processed by MATLAB software for the marine protease fermentation process, which met the requirements of optimal control of the marine protease fermentation process.


---

## Body

## 1. Introduction

In recent years, marine biotechnology’s rapid development makes marine microbiological engineering occupy an essential proportion in the national economic system. Marine low-temperature alkaline protease is a new kind of protease source and, compared with other terrestrial proteases, can effectively solve such problems as high requirement of enzyme activity, instability, and inactivation in harsh environment in industrial production. These excellent characteristics make it widely used in the washing industry, environmental protection, food processing, and national defence [1, 2]. In the actual fermentation process, to increase the production efficiency and product quality of enzyme preparation and reduce the economic cost, the fermentation process’s environmental variables should be controlled in a specific range. However, the process of cell growth, reproduction, and metabolic enzyme production is significantly reflected by the external environment. There is a complicated non-linear dynamic relationship among various state variables of the fermentation process, which is difficult to decouple. The critical biological variables reflecting the quality of fermentation have severe defects in measurement stability and price. In the fermentation process, temperature, airflow, pH value, dissolved oxygen concentration, motor stirring speed, etc., can be detected by mature hardware sensors. However, cell concentration, substrate concentration, and enzyme activity, which are target quality variables that play a significant role in the fermentation process, are challenging to measure in real-time. Therefore, studying the real-time measurement method of the fermentation process’s key variables is of great significance for improving the quality of fermentation products, reducing the consumption of raw materials, and power energy [3].The traditional analytical mathematical model cannot meet the requirements of fermentation process control. Using soft sensor modeling to establish a mathematical model between auxiliary variables (easy to measure) and target quality variables (difficult to measure) in real-time provides a new way for real-time and accurate measurement of biological fermentation variables [4]. The model structure of the soft sensor is shown in Figure 1. This figure shows the basic principle of a soft sensor model where inputs from a bioprocess are measured by hardware sensor/sensors, and new information is estimated. Soft sensor modeling can overcome many shortcomings of manual analysis and real-time instrumentation and has become the leading direction of the development of advanced control technology in the fermentation industry [5]. The core of soft sensor modeling is to establish a mathematical model. The accuracy and generalization of the model directly determine the results of soft measurement. The main methods of soft sensor modeling include process mechanism analysis, state estimation [6], regression analysis [7], artificial neural network (ANN) [8], and deep neural networks (DNN) [9], etc.Figure 1
Principle of the soft sensor model.However, it is challenging to obtain the system state-space model by relying entirely on mechanism analysis to establish an accurate soft sensor model. Regression analysis requires a lot of data and is more sensitive to measurement errors. The prediction method based on neural networks has become a research hotspot in the field of soft-sensing. However, for a very complex non-linear system such as the fermentation process of marine microorganisms, if there is no prior knowledge, the neural network method is blindly applied, and the measurement of critical biological variables cannot be solved well. In the literature [10], the back-propagation neural network (BPNN) is used to measure the flocculent bacteria's fermentation yield and flocculation rate. However, the BPNN has the disadvantages of slow convergence and weak anti-interference ability. Deep neural networks have also been employed for process soft sensor modeling in the recent few years. Deep learning-based model is suitable for large training samples, and it enjoys high efficiency and robustness. In the literature [9], a layer-wise data augmentation strategy with stacked auto-encoder (LWDA-SAE) is applied to predict the boiling points in a hydrocracking process. In the literature [11], a dynamic convolutional neural network (DCNN) strategy is introduced to learn hierarchical local non-linear dynamic features for soft sensor modeling. In the literature [12], a spatiotemporal attention-based long short-term memory (LSTM) network is applied to predict an industrial process’s quality variables. In another paper, the researchers applied the DNN-based model to predict the quality variables of fermentation process [13].In this article, the support vector machine regression (SVR) algorithm is applied to predict the quality variables of the marine protease fermentation process, a common and useful method used for small amounts of data. It is a machine learning method based on statistical learning theory and structural risk minimization [14]. However, in SVR modeling, normalization parameters and kernel parameters are the parameters that must be optimized, and their values will directly affect the training and generalization performance of the model. Commonly used parameter optimization methods include grid search with cross-validation (GSCV) and genetic algorithms (GA). The GSCV method and GA algorithm are computationally intensive and may fall into the local optimum [15]. Therefore, a grey wolf optimization (GWO) algorithm is used to optimize the SVR soft sensor model's essential parameters. Besides, in soft sensor modeling, the choice of auxiliary variables is also necessary. Many scholars have ignored the influence of selecting additional variables on the soft sensor modeling of the microbial fermentation process. If some unimportant independent variables are introduced into the soft sensor model, the accuracy of the model will be reduced. The successive projection algorithm (SPA) is considered to be one of the best indicators for evaluating the correlation of variables in the process of fermentation and compared with the grey relation analysis (GRA) algorithm [16]. Finally, the proposed soft sensor modeling method based on SPA-GWO-SVR is applied to predict the target quality variables such as cell concentration, substrate concentration, and the marine protease fermentation process’s enzyme activity. The simulation results show that the constructed soft sensor model has a simple structure, high modeling accuracy, and reasonable practicability.


## 2. Materials and Methods

### 2.1. Successive Projection Algorithm (SPA)

SPA [17] is an influential variable selection method, which can minimize the correlation between auxiliary variables and eliminate redundant variables. Suppose XM×J is the original data matrix, where M is the total number of samples, J is the number of auxiliary variables, N is the number of selected characteristic variables, and Xk0 is the initial variable. Start with the first auxiliary variable, calculate its projection on the remaining variables, introduce the variable with the largest projection vector into the set, and end after N iterations. The specific implementation steps are as follows:Step 1. Select a column of data variable j, assign it to Xj, and write it as Xk0.Step 2. Let S be the set of remaining variables, expressed explicitly as S=j|j∉k0,k1,⋯,kN−1,1≤j≤J.Step 3. Calculate the projection of the remaining variables according to formula (1).(1)PXj=Xj−XjTXkn−1Xkn−1Xkn−1TXkn−1−1.Step 4. Select the maximum projection value according to formula (2):(2)kn=argmaxPXj,j∈s.Step 5. Let Xj=PXj,j∈S use the maximum projection value in Step 4 as the comparison value of the next iteration.Step 6. Let n=n+1, if n<N, return to Step 2 to continue the iteration.Step 7. Calculate the root mean square error (RMSE) corresponding to each variable subset by combining the multivariate correction method and the cross-validation method, select the variable subset with the smallest RMSE, determine the set with the smallest number of variables, and use the variables as characteristic variables.


### 2.2. Support Vector Regression (SVR) Algorithm

SVR is a regression prediction algorithm suitable for dealing with non-linear problems. The algorithm mainly uses ascending dimensions to construct a linear decision function in a high-dimensional space to achieve linear regression [18]. SVR uses a similar theory as the SVM for classification problems, with just a few slight differences. The machine-like SVM can be equivalent to the network shown in Figure 2. This figure shows the working procedure of SVR, where xm is the input vector, kxi,xj is a kernel function, and ai is weights. Suppose the training sample set is x1,y1,x2,y2,⋯,xi,yi,xi,yi∈R an auxiliary variable, and yi the soft sensor model's critical biological variables. The purpose is to find a regression model y=w⋅x+b on a high-dimensional space. To ensure the flatness of the model curve, we need to find the smallest w and finally transform the optimization problem into(3)minRw,w=12w,w+c∑i=1lξi+ξi∗,s.t.y−w⋅x−b∈−ε−ξi,ε+ξi.Figure 2
Support vector regression architecture.C is a regulation parameter, w is a weight vector, b is bias unit, ξ and ξ∗ are slack variables, and ε is the insensitivity coefficient. By introducing Lagrange multipliers ai and ai∗, the Lagrange function is constructed, and formula (3) is further transformed into a dual problem:(4)maxφa=∑i=1lai−ai∗yi+ε∑i=1lai−ai∗−12∑i,j=1lai−ai∗aj−aj∗xi⋅yi,s.t.∑i=1lai−ai∗=0ai,ai∗∈0,c.To simplify the calculation, the kernel function is introduced to replace the inner product calculation. This paper uses the radial basis kernel function (RBF) with fewer parameters:(5)kxi,xj=exp−xi−xj22σ2.Among them,kxi,xj is a kernel function, and σ is the width parameter of the kernel function. By seeking partial derivatives, solve for ai,ai∗ and b, where the corresponding vector for ai≠0 or ai∗≠0 is the support vector. The final analytical expression of SVR is(6)y=∑i=1lai−ai∗kxi,xj+b.Although SVR has good generalization ability and good regression prediction effect for small samples and non-linear data, the critical parameters in the SVR model, such as the kernel function width parameterσ, penalty factor c, and insensitivity coefficient ε, and the quality of the initial parameter settings, will have a significant impact on the stability and prediction accuracy of the model. Therefore, to solve this problem, this work uses an intelligent optimization algorithm based on GWO to initialize and optimize the parameters of the SVR soft sensor model of the marine protease fermentation process. The GWO algorithm [19] proposed in 2014 is significantly better than the GA algorithm, particle swarm optimization algorithm (PSO), and optimization effect.


### 2.3. GWO-SVR Prediction Model

Grey wolf optimization (GWO) algorithm is a new type of swarm intelligence optimization algorithm, by simulating the leadership mechanism at all levels of the grey wolf population and the process of wolves encircling, hunting, and attacking to achieve the purpose of optimization search [20].First, calculate each wolf’s fitness in the wolf pack and arrange them in order from high to low. The wolf pack is divided intoα wolf, β wolf, δ wolf, ω wolf, among which α wolf, β wolf, and δ wolf are looking to play a leading role in the optimization process. When the grey wolf surrounds the prey, the position is updated by formulas (9) and (10):(7)D=C⋅XPt−Xt,Xt+1=XPt−A⋅D,stA=2a⋅r1−a;C=2⋅r2.Among them,t represents the number of iterations; XP represents the position of the prey, which is the optimal global solution; X represents the position of the current wolf pack; D represents the distance between the prey and the wolf pack; r1 and r2 represent a random value within 0,1 number; and a represents a number that drops from 2 to 0.After the prey is surrounded, the wolves need to hunt,α wolf, β wolf, δ wolf are assumed to be the three global optimal solutions, and ω wolf updates the position again according to these three optimal solutions:(8)Dα=C1⋅Xα−X,Dβ=C2⋅Xβ−X,Dδ=C3⋅Xδ−X.Among them,Xα, Xβ, and Xδ represent the positions of α wolf, β wolf, and δ wolf, respectively; C1, C2, C3 represent random vectors; and X represents the position of the current solution; when the approximate distance between the current solution and the α wolf, β wolf, δ wolf, and ω wolf is calculated, the position Xt+1 of the wolf that needs to be updated is as follows:(9)Xt+1=Xα+Xβ+Xδ−A1⋅Dα+A2⋅Dβ+A3⋅Dδ3.Among them,A1, A2, and A3 represent random vectors. Finally, the wolves attack the prey, which is to determine the optimal solution. It is mainly by observing the value A to determine whether the optimal solution is found. If A>1, it means that the wolf pack is getting farther and farther away from its prey, and the optimal solution cannot be concentrated; if it means that the wolf pack is concentrated on the prey, it can be captured.Using GWO to optimize SVR is actually to find the optimal kernel function width parameterσ, penalty factor c, and insensitivity coefficient ε in the SVR through the above update process. The specific implementation steps are as follows:Step 1. Initialize the parameters. Determine the training set and prediction set samples of the SVR model. Set the maximum number of iterations T, the population size N, and the optimization range of σ, c, and ε.Step 2. Randomly generate grey wolf packs. The individual position vector of each grey wolf pack consists of σ, c and ε, and calculate the fitness value of each grey wolf.Step 3. Classify the grey wolf population according to the fitness value, and update the individual position of the grey wolf population.Step 4. Calculate each grey wolf individual’s fitness value at the new position and compare it with the optimal fitness value of the previous iteration. If it is better than the fitness value, the grey wolf individual replaces the group’s optimal fitness value. And replace the fitness value with the grey wolf individual position; otherwise, keep the original optimal fitness value.Step 5. If the number of iterations exceeds the maximum number of iterations, the learning process ends, and the output global optimal position is the optimal value of σ, c, and ε in SVR; otherwise, return to Step 3 to continue parameter optimization.Step 6. Use the optimized σ, c, and ε to establish the SVR model.


## 2.1. Successive Projection Algorithm (SPA)

SPA [17] is an influential variable selection method, which can minimize the correlation between auxiliary variables and eliminate redundant variables. Suppose XM×J is the original data matrix, where M is the total number of samples, J is the number of auxiliary variables, N is the number of selected characteristic variables, and Xk0 is the initial variable. Start with the first auxiliary variable, calculate its projection on the remaining variables, introduce the variable with the largest projection vector into the set, and end after N iterations. The specific implementation steps are as follows:Step 1. Select a column of data variable j, assign it to Xj, and write it as Xk0.Step 2. Let S be the set of remaining variables, expressed explicitly as S=j|j∉k0,k1,⋯,kN−1,1≤j≤J.Step 3. Calculate the projection of the remaining variables according to formula (1).(1)PXj=Xj−XjTXkn−1Xkn−1Xkn−1TXkn−1−1.Step 4. Select the maximum projection value according to formula (2):(2)kn=argmaxPXj,j∈s.Step 5. Let Xj=PXj,j∈S use the maximum projection value in Step 4 as the comparison value of the next iteration.Step 6. Let n=n+1, if n<N, return to Step 2 to continue the iteration.Step 7. Calculate the root mean square error (RMSE) corresponding to each variable subset by combining the multivariate correction method and the cross-validation method, select the variable subset with the smallest RMSE, determine the set with the smallest number of variables, and use the variables as characteristic variables.


## 2.2. Support Vector Regression (SVR) Algorithm

SVR is a regression prediction algorithm suitable for dealing with non-linear problems. The algorithm mainly uses ascending dimensions to construct a linear decision function in a high-dimensional space to achieve linear regression [18]. SVR uses a similar theory as the SVM for classification problems, with just a few slight differences. The machine-like SVM can be equivalent to the network shown in Figure 2. This figure shows the working procedure of SVR, where xm is the input vector, kxi,xj is a kernel function, and ai is weights. Suppose the training sample set is x1,y1,x2,y2,⋯,xi,yi,xi,yi∈R an auxiliary variable, and yi the soft sensor model's critical biological variables. The purpose is to find a regression model y=w⋅x+b on a high-dimensional space. To ensure the flatness of the model curve, we need to find the smallest w and finally transform the optimization problem into(3)minRw,w=12w,w+c∑i=1lξi+ξi∗,s.t.y−w⋅x−b∈−ε−ξi,ε+ξi.Figure 2
Support vector regression architecture.C is a regulation parameter, w is a weight vector, b is bias unit, ξ and ξ∗ are slack variables, and ε is the insensitivity coefficient. By introducing Lagrange multipliers ai and ai∗, the Lagrange function is constructed, and formula (3) is further transformed into a dual problem:(4)maxφa=∑i=1lai−ai∗yi+ε∑i=1lai−ai∗−12∑i,j=1lai−ai∗aj−aj∗xi⋅yi,s.t.∑i=1lai−ai∗=0ai,ai∗∈0,c.To simplify the calculation, the kernel function is introduced to replace the inner product calculation. This paper uses the radial basis kernel function (RBF) with fewer parameters:(5)kxi,xj=exp−xi−xj22σ2.Among them,kxi,xj is a kernel function, and σ is the width parameter of the kernel function. By seeking partial derivatives, solve for ai,ai∗ and b, where the corresponding vector for ai≠0 or ai∗≠0 is the support vector. The final analytical expression of SVR is(6)y=∑i=1lai−ai∗kxi,xj+b.Although SVR has good generalization ability and good regression prediction effect for small samples and non-linear data, the critical parameters in the SVR model, such as the kernel function width parameterσ, penalty factor c, and insensitivity coefficient ε, and the quality of the initial parameter settings, will have a significant impact on the stability and prediction accuracy of the model. Therefore, to solve this problem, this work uses an intelligent optimization algorithm based on GWO to initialize and optimize the parameters of the SVR soft sensor model of the marine protease fermentation process. The GWO algorithm [19] proposed in 2014 is significantly better than the GA algorithm, particle swarm optimization algorithm (PSO), and optimization effect.


## 2.3. GWO-SVR Prediction Model

Grey wolf optimization (GWO) algorithm is a new type of swarm intelligence optimization algorithm, by simulating the leadership mechanism at all levels of the grey wolf population and the process of wolves encircling, hunting, and attacking to achieve the purpose of optimization search [20].First, calculate each wolf’s fitness in the wolf pack and arrange them in order from high to low. The wolf pack is divided intoα wolf, β wolf, δ wolf, ω wolf, among which α wolf, β wolf, and δ wolf are looking to play a leading role in the optimization process. When the grey wolf surrounds the prey, the position is updated by formulas (9) and (10):(7)D=C⋅XPt−Xt,Xt+1=XPt−A⋅D,stA=2a⋅r1−a;C=2⋅r2.Among them,t represents the number of iterations; XP represents the position of the prey, which is the optimal global solution; X represents the position of the current wolf pack; D represents the distance between the prey and the wolf pack; r1 and r2 represent a random value within 0,1 number; and a represents a number that drops from 2 to 0.After the prey is surrounded, the wolves need to hunt,α wolf, β wolf, δ wolf are assumed to be the three global optimal solutions, and ω wolf updates the position again according to these three optimal solutions:(8)Dα=C1⋅Xα−X,Dβ=C2⋅Xβ−X,Dδ=C3⋅Xδ−X.Among them,Xα, Xβ, and Xδ represent the positions of α wolf, β wolf, and δ wolf, respectively; C1, C2, C3 represent random vectors; and X represents the position of the current solution; when the approximate distance between the current solution and the α wolf, β wolf, δ wolf, and ω wolf is calculated, the position Xt+1 of the wolf that needs to be updated is as follows:(9)Xt+1=Xα+Xβ+Xδ−A1⋅Dα+A2⋅Dβ+A3⋅Dδ3.Among them,A1, A2, and A3 represent random vectors. Finally, the wolves attack the prey, which is to determine the optimal solution. It is mainly by observing the value A to determine whether the optimal solution is found. If A>1, it means that the wolf pack is getting farther and farther away from its prey, and the optimal solution cannot be concentrated; if it means that the wolf pack is concentrated on the prey, it can be captured.Using GWO to optimize SVR is actually to find the optimal kernel function width parameterσ, penalty factor c, and insensitivity coefficient ε in the SVR through the above update process. The specific implementation steps are as follows:Step 1. Initialize the parameters. Determine the training set and prediction set samples of the SVR model. Set the maximum number of iterations T, the population size N, and the optimization range of σ, c, and ε.Step 2. Randomly generate grey wolf packs. The individual position vector of each grey wolf pack consists of σ, c and ε, and calculate the fitness value of each grey wolf.Step 3. Classify the grey wolf population according to the fitness value, and update the individual position of the grey wolf population.Step 4. Calculate each grey wolf individual’s fitness value at the new position and compare it with the optimal fitness value of the previous iteration. If it is better than the fitness value, the grey wolf individual replaces the group’s optimal fitness value. And replace the fitness value with the grey wolf individual position; otherwise, keep the original optimal fitness value.Step 5. If the number of iterations exceeds the maximum number of iterations, the learning process ends, and the output global optimal position is the optimal value of σ, c, and ε in SVR; otherwise, return to Step 3 to continue parameter optimization.Step 6. Use the optimized σ, c, and ε to establish the SVR model.


## 3. Results and Discussion

### 3.1. Fermentation Experiment

The experimental data have been collected from the fermentation control system platform, made by Jiangsu University, China. The fermentation tank was the RT_100L_Y model of Zhenjiang Ritai Biological equipment company. Marine protease fermentation is taken as an example for experimental verification, and the process of fermentation is conducted in the biological fermentation tank. The basic flow of the fermentation process is shown in Figure3. To make the experiment close to the actual production process, the experiment process was designed as follows.Figure 3
Technological process of marine protease fermentation process.In the process of marine protease fermentation, the temperature of the fermentation tank is controlled at 25°C∼28°C, the pressure of the fermentation tank is controlled at 0.03–0.05 Mpa, the dissolved oxygen is maintained at 35%∼75%, the airflow is owned at 1000 L/h, and the speed is held at 300–500 r/min. The experiment sampling period is 15 minutes, and 11 auxiliary variables are acquired through various sensors and transmitted to the computer by a distributed control system (DCS) form a database. Under normal fermentation conditions, take samples every hour to analyze the cell concentrationX, substrate concentration S, and enzyme activity P offline. X is determined by the mycelial dry weight method; S is determined by Fehling reagent method; P is determined by Folin-phenol reagent method. A total of 10 batches of fermentation data were obtained with 80 h span between every batch. The first 9 batches of fermentation data were used to train the soft sensor model for minimum error. And the 10th batch of fermentation data is used to test the identification accuracy of the model. In this research, the soft sensor model’s training procedure was conducted on a laptop, with Intel Core i3-3110M CPU @2.40 GHz, 8 GB RAM. The software tools are Windows 10 pro, MATLAB R2018b, MathType, and Visio 2016. Necessary steps such as auxiliary variables selection, data preprocessing, hyper-parameter tuning, deciding kernel function, and establishment of the model, etc. have been implemented for the development of SPA-GWO-SVR soft sensor model.Data preprocessing performs a very significant role in various machine learning algorithms [21, 22]. In practice, several approaches work best after data normalization and whitening. Due to the yield environment’s effect, the collection of a dataset is often subject to a variety of on-site noise interference, such as human-made noise or machine operating noise. After deciding the auxiliary variables and target quality variables of the soft sensor model, sufficient data samples are collected for each system variable. Still, the collected data samples comprise several errors and need to process the data. In this paper, the preferred processing techniques are mainly data filtering and data normalization. The normalization method is shown as follows:(10)i′=imax−iimax−imin,where i′ is the normalized data, i is the original sample data, imax is the maximum value of the sample data, and imin is the minimum value of the sample data.


### 3.2. Selection of Auxiliary Variables

We know that the marine protease fermentation is a complex non-linear time-varying process. During the process of fermentation, there are various types of internal and external environmental variables such as temperaturet, tank pressure p, dissolved oxygen concentration DO, pH value, air flow l, motor speed r, volume v, acceleration rate of acid flow μ, alkali flow rate η, CO2 concentration c1, and O2 concentration c2 that directly reflects the fermentation quality. To eliminate the influence of unnecessary auxiliary variables on model prediction accuracy, reduce the complexity, and increase the soft sensor model’s calculation speed, this paper uses SPA and GRA algorithms to determine the input and output variables of the soft sensor model.Using SPA to calculate the correlation between each auxiliary and critical variable, the results are shown in Table1. The ones with the correlation degree exceeding 0.7 are selected as the auxiliary feature variables. To ensure the model’s performance, the range of the number of variables selected by SPA is set to be 3–10, and the optimal number of characteristic variables is determined according to the RMSE under different numbers of variables. Figure 4 is a trend diagram of the RMSE values of the three key variables changing with the number of selected variables. It can be found that, with the increase of the number of selected variables, the overall RMSE shows a downward trend. When the number of variables reaches 6, 5, and 6, the change trend of the RMSE value is gentle. Since the larger number of auxiliary variables will lead to the higher complexity of the model, the optimal number of variables is finally determined to be 6, 5, and 6. The feature auxiliary variables selected based on GRA and SPA are shown in Table 2.Table 1
Correlation between auxiliary variables and key biological variables.
Auxiliary variablesCorrelation degreeCell concentrationMatrix concentrationEnzyme activityTemperaturet0.24570.24690.4236Tank pressurep0.71640.70510.5862Dissolved oxygen concentration0.88530.84520.9645pH value0.87290.91240.8166Airflowl0.53210.47120.7033Motor speedr0.19830.22100.1875Tank volumev0.70880.68200.7040Acceleration rate of acid flowμ0.94410.98640.8769Alkali flow rateη0.90870.97530.8934CO2 concentration CO2.con0.88650.79220.7965O2 concentration O2.con0.72300.78940.7847Figure 4
The influence of the number of variables selected by SPA algorithm.Table 2
Selection of auxiliary variables based on GRA and SPA algorithm.
Key variablesVariable selection methodNumber of variablesAuxiliary variablesCell concentration (X)Full11t, p, DO, pH, l, r, v, μ, η, c1, c2GRA8p, DO, pH, v, μ, η, c1, c2SPA6DO, pH, v, μ, η, c1Matrix concentration (S)Full11t, p, DO, pH, l, r, v, μ, η, c1, c2GRA7p, DO, pH, μ, η, c1, c2SPA5DO, pH, μ, η, c1Enzyme activity (P)Full11t, p, DO, pH, l, r, v, μ, η, c1, c2GRA8DO, pH, l, v, μ, η, c1, c2SPA6DO, pH, l, μ, η, c1


### 3.3. Simulation Analysis

To establish a multi-input and multi-output soft sensor model, by analyzing the results of Table2, the p, DO, pH, v, μ, η, c1, c2 variables are used as an input for the GRA-SVR model, and DO, pH, μ, η, c1 are used as input variables for the SPA-SVR soft sensor model. The RMSE and coefficient determination R2 are taken as the evaluation criteria, comparing the SVR model established by the full auxiliary variable and analyzing the model’s performance based on GRA and SPA. It can be seen from Table 3 that, for each key variable, the prediction effect of the SPA variable selection method is significantly better than the model based on GRA and full auxiliary variables. It has a better variable selection effect, virtually eliminates redundant auxiliary variables, and reduces model complexity. But the prediction accuracy of the model still has room for improvement. Therefore, this paper employed the GWO algorithm to optimize the SVR model's critical parameters (σ, c, and ε). Set the grey wolf population size N = 50, the maximum number of iterations T = 100, and the optimal SVR parameter values σ = 81.31, c = 45.52, ε = 5.13 × 10−5, respectively. The optimized model results are shown in Table 4.Table 3
Comparison of different variable selection methods.
Key variablesVariable selection methodTraining setTest setR2RMSER2RMSEXFull0.96232.41200.96722.5362GRA0.97421.96650.97261.9965SPA0.98511.90570.98321.9430SFull0.96641.84020.96231.8635GRA0.96901.15210.96871.1854SPA0.97981.14220.97721.1693PFull0.96820.17010.96780.1726GRA0.97340.08520.97050.0921SPA0.98450.03890.98280.0401Table 4
Quality prediction results based on SPA-GWO-SVR soft sensor model.
Key variablesVariable selection methodTraining setTest setR2RMSER2RMSEXFull0.97831.81960.97631.8254GRA0.98701.06410.98411.0897SPA0.99451.03680.99331.0583SFull0.97071.00260.96981.0254GRA0.98110.63240.97860.6580SPA0.99520.50660.99400.5561PFull0.97940.08110.97810.0864GRA0.98100.03010.98120.0348SPA0.99820.01560.99710.0164It can be observed clearly from Tables3 and 4 that the proposed SPA-GWO-SVR soft senor model provides a smaller RMSE value and a larger R2 value than those of any individual SPA-SVR model which means the use of the above method can significantly improve the prediction results. The value of R2 increased by 1.01%, 1.68%, and 1.43%, respectively; RMSE value decreased by 0.8847, 0.6132, and 0.0237, respectively. The optimization of parameters has achieved very significant results. Also, from the results of the training set and the test set, it can be found that as the number of predicted samples increases, the RMSE value also increases and R2 decreases. Comparing the predicted result between the SPA-GWO-SVR soft sensor model and simple SPA-SVR is shown in Figures 5 and 6. We comprehensively show that the soft sensor model based on SPA-GWO-SVR has better prediction performance.Figure 5
Comparisons of the predicted result with the reference of actual value for the process of marine protease fermentation. (a) Prediction results of cell concentration. (b) Prediction results of matrix concentration. (c) Prediction results of enzyme activity.
(a)(b)(c)Figure 6
Comparisons of the predicted error curve. (a) Prediction error of cell concentration. (b) Prediction error of matrix concentration. (c) Prediction error of enzyme activity.
(a)(b)(c)


## 3.1. Fermentation Experiment

The experimental data have been collected from the fermentation control system platform, made by Jiangsu University, China. The fermentation tank was the RT_100L_Y model of Zhenjiang Ritai Biological equipment company. Marine protease fermentation is taken as an example for experimental verification, and the process of fermentation is conducted in the biological fermentation tank. The basic flow of the fermentation process is shown in Figure3. To make the experiment close to the actual production process, the experiment process was designed as follows.Figure 3
Technological process of marine protease fermentation process.In the process of marine protease fermentation, the temperature of the fermentation tank is controlled at 25°C∼28°C, the pressure of the fermentation tank is controlled at 0.03–0.05 Mpa, the dissolved oxygen is maintained at 35%∼75%, the airflow is owned at 1000 L/h, and the speed is held at 300–500 r/min. The experiment sampling period is 15 minutes, and 11 auxiliary variables are acquired through various sensors and transmitted to the computer by a distributed control system (DCS) form a database. Under normal fermentation conditions, take samples every hour to analyze the cell concentrationX, substrate concentration S, and enzyme activity P offline. X is determined by the mycelial dry weight method; S is determined by Fehling reagent method; P is determined by Folin-phenol reagent method. A total of 10 batches of fermentation data were obtained with 80 h span between every batch. The first 9 batches of fermentation data were used to train the soft sensor model for minimum error. And the 10th batch of fermentation data is used to test the identification accuracy of the model. In this research, the soft sensor model’s training procedure was conducted on a laptop, with Intel Core i3-3110M CPU @2.40 GHz, 8 GB RAM. The software tools are Windows 10 pro, MATLAB R2018b, MathType, and Visio 2016. Necessary steps such as auxiliary variables selection, data preprocessing, hyper-parameter tuning, deciding kernel function, and establishment of the model, etc. have been implemented for the development of SPA-GWO-SVR soft sensor model.Data preprocessing performs a very significant role in various machine learning algorithms [21, 22]. In practice, several approaches work best after data normalization and whitening. Due to the yield environment’s effect, the collection of a dataset is often subject to a variety of on-site noise interference, such as human-made noise or machine operating noise. After deciding the auxiliary variables and target quality variables of the soft sensor model, sufficient data samples are collected for each system variable. Still, the collected data samples comprise several errors and need to process the data. In this paper, the preferred processing techniques are mainly data filtering and data normalization. The normalization method is shown as follows:(10)i′=imax−iimax−imin,where i′ is the normalized data, i is the original sample data, imax is the maximum value of the sample data, and imin is the minimum value of the sample data.


## 3.2. Selection of Auxiliary Variables

We know that the marine protease fermentation is a complex non-linear time-varying process. During the process of fermentation, there are various types of internal and external environmental variables such as temperaturet, tank pressure p, dissolved oxygen concentration DO, pH value, air flow l, motor speed r, volume v, acceleration rate of acid flow μ, alkali flow rate η, CO2 concentration c1, and O2 concentration c2 that directly reflects the fermentation quality. To eliminate the influence of unnecessary auxiliary variables on model prediction accuracy, reduce the complexity, and increase the soft sensor model’s calculation speed, this paper uses SPA and GRA algorithms to determine the input and output variables of the soft sensor model.Using SPA to calculate the correlation between each auxiliary and critical variable, the results are shown in Table1. The ones with the correlation degree exceeding 0.7 are selected as the auxiliary feature variables. To ensure the model’s performance, the range of the number of variables selected by SPA is set to be 3–10, and the optimal number of characteristic variables is determined according to the RMSE under different numbers of variables. Figure 4 is a trend diagram of the RMSE values of the three key variables changing with the number of selected variables. It can be found that, with the increase of the number of selected variables, the overall RMSE shows a downward trend. When the number of variables reaches 6, 5, and 6, the change trend of the RMSE value is gentle. Since the larger number of auxiliary variables will lead to the higher complexity of the model, the optimal number of variables is finally determined to be 6, 5, and 6. The feature auxiliary variables selected based on GRA and SPA are shown in Table 2.Table 1
Correlation between auxiliary variables and key biological variables.
Auxiliary variablesCorrelation degreeCell concentrationMatrix concentrationEnzyme activityTemperaturet0.24570.24690.4236Tank pressurep0.71640.70510.5862Dissolved oxygen concentration0.88530.84520.9645pH value0.87290.91240.8166Airflowl0.53210.47120.7033Motor speedr0.19830.22100.1875Tank volumev0.70880.68200.7040Acceleration rate of acid flowμ0.94410.98640.8769Alkali flow rateη0.90870.97530.8934CO2 concentration CO2.con0.88650.79220.7965O2 concentration O2.con0.72300.78940.7847Figure 4
The influence of the number of variables selected by SPA algorithm.Table 2
Selection of auxiliary variables based on GRA and SPA algorithm.
Key variablesVariable selection methodNumber of variablesAuxiliary variablesCell concentration (X)Full11t, p, DO, pH, l, r, v, μ, η, c1, c2GRA8p, DO, pH, v, μ, η, c1, c2SPA6DO, pH, v, μ, η, c1Matrix concentration (S)Full11t, p, DO, pH, l, r, v, μ, η, c1, c2GRA7p, DO, pH, μ, η, c1, c2SPA5DO, pH, μ, η, c1Enzyme activity (P)Full11t, p, DO, pH, l, r, v, μ, η, c1, c2GRA8DO, pH, l, v, μ, η, c1, c2SPA6DO, pH, l, μ, η, c1


## 3.3. Simulation Analysis

To establish a multi-input and multi-output soft sensor model, by analyzing the results of Table2, the p, DO, pH, v, μ, η, c1, c2 variables are used as an input for the GRA-SVR model, and DO, pH, μ, η, c1 are used as input variables for the SPA-SVR soft sensor model. The RMSE and coefficient determination R2 are taken as the evaluation criteria, comparing the SVR model established by the full auxiliary variable and analyzing the model’s performance based on GRA and SPA. It can be seen from Table 3 that, for each key variable, the prediction effect of the SPA variable selection method is significantly better than the model based on GRA and full auxiliary variables. It has a better variable selection effect, virtually eliminates redundant auxiliary variables, and reduces model complexity. But the prediction accuracy of the model still has room for improvement. Therefore, this paper employed the GWO algorithm to optimize the SVR model's critical parameters (σ, c, and ε). Set the grey wolf population size N = 50, the maximum number of iterations T = 100, and the optimal SVR parameter values σ = 81.31, c = 45.52, ε = 5.13 × 10−5, respectively. The optimized model results are shown in Table 4.Table 3
Comparison of different variable selection methods.
Key variablesVariable selection methodTraining setTest setR2RMSER2RMSEXFull0.96232.41200.96722.5362GRA0.97421.96650.97261.9965SPA0.98511.90570.98321.9430SFull0.96641.84020.96231.8635GRA0.96901.15210.96871.1854SPA0.97981.14220.97721.1693PFull0.96820.17010.96780.1726GRA0.97340.08520.97050.0921SPA0.98450.03890.98280.0401Table 4
Quality prediction results based on SPA-GWO-SVR soft sensor model.
Key variablesVariable selection methodTraining setTest setR2RMSER2RMSEXFull0.97831.81960.97631.8254GRA0.98701.06410.98411.0897SPA0.99451.03680.99331.0583SFull0.97071.00260.96981.0254GRA0.98110.63240.97860.6580SPA0.99520.50660.99400.5561PFull0.97940.08110.97810.0864GRA0.98100.03010.98120.0348SPA0.99820.01560.99710.0164It can be observed clearly from Tables3 and 4 that the proposed SPA-GWO-SVR soft senor model provides a smaller RMSE value and a larger R2 value than those of any individual SPA-SVR model which means the use of the above method can significantly improve the prediction results. The value of R2 increased by 1.01%, 1.68%, and 1.43%, respectively; RMSE value decreased by 0.8847, 0.6132, and 0.0237, respectively. The optimization of parameters has achieved very significant results. Also, from the results of the training set and the test set, it can be found that as the number of predicted samples increases, the RMSE value also increases and R2 decreases. Comparing the predicted result between the SPA-GWO-SVR soft sensor model and simple SPA-SVR is shown in Figures 5 and 6. We comprehensively show that the soft sensor model based on SPA-GWO-SVR has better prediction performance.Figure 5
Comparisons of the predicted result with the reference of actual value for the process of marine protease fermentation. (a) Prediction results of cell concentration. (b) Prediction results of matrix concentration. (c) Prediction results of enzyme activity.
(a)(b)(c)Figure 6
Comparisons of the predicted error curve. (a) Prediction error of cell concentration. (b) Prediction error of matrix concentration. (c) Prediction error of enzyme activity.
(a)(b)(c)


## 4. Conclusion

Marine protease is a new type of enzyme preparation obtained from the fermentation of marine organisms. Because the ocean they live in has a particular environment, the enzymes they produce have more unique properties than those produced by other microorganisms, such as low-temperature resistance, alkali resistance, and pH. It has a wide range of action, making marine microorganisms have excellent development potential and application prospects in fermentation, such as food processing, enzyme industry, additives, and medicine. In marine microbial fermentation, to ensure the quality of fermentation products, it is necessary to detect a series of biological variables in real-time, especially the substrate concentration, cell concentration, and product concentration (enzyme activity). Currently, online measuring instruments can only detect certain physical and chemical variables in the fermentation process. There is no mature and practical instrument to measure these key biological variables. Therefore, in this paper, a soft sensor modeling method based on SPA-GWO-SVR was proposed. The auxiliary variables and target quality variables of the soft sensor model were determined based on SPA and GRA algorithm. The GWO algorithm is used to optimize the critical parameters (such as kernel function widthσ, penalty factor c, and insensitivity coefficient ε) of the SVR model. Finally, the proposed SPA-GWO-SVR method is applied to predict the marine protease fermentation process’s target quality variables. From the prediction results on the testing dataset, the SPA-GWO-SVR soft sensor model’s prediction performance is superior to GRA and SPA-SVR model.This article has achieved specific results in the research of soft sensor modeling in fermentation. However, due to resource and capacity constraints, some shortcomings need to be further studied and perfected. In the future, it can be carried out from the following aspects. Although the soft sensor method proposed in this article is not limited to marine protease’s fermentation process, it has an absolute versatility. The model parameters can also be modified and applied to other fermentation processes. Still, it needs further expansion and improvement to realize other biochemical processes’ simulation training and enhance its universality. The sample data information obtained during the fermentation of the marine alkaline protease studied in the article is obtained based on a laboratory platform. It cannot completely replace the actual industrial production process.



---

*Source: 6653503-2021-03-20.xml*