# Prediction Model of Rotor Yarn Quality Based on CNN-LSTM

Authors: Zhenlong Hu
Journal: Journal of Sensors
 (2022)

---

## Abstract

In the whole textile industry chain, yarn production is one of the key links, which has a great impact on the quality of textile and clothing products. For a long time, the textile industry has been hoping for a yarn quality prediction technology, which can accurately predict the final yarn quality indicators according to the known conditions such as raw materials and production processes. CNN-LSTM yarn prediction model is a deep neural network model based on the assumption that the influence of textile processing time series on yarn quality is considered. CNN optimizes the input eigenvalues through one-dimensional convolution and pooling, and LSTM matches the optimized fiber performance indexes and process parameters in time series according to the processing sequence and excavates their laws, thus realizing the goal of predicting yarn quality indexes. The effects of input fiber performance index, process parameters, convolution kernel parameters, pool kernel parameters, LSTM unit number, LSTM layer number, and optimization algorithm on prediction accuracy were studied, and the parameters of CNN-LSTM model were determined. Experiments on the data set of spinning yarn show that the mean square error (MSE) of CNN-LSTM model in predicting yarn strength, Dan Qiang unevenness, evenness unevenness, and total neps is lower than that of linear regression model and BP neural network. At the same time, it is found that the prediction accuracy of CNN-LSTM model is greatly influenced by process parameters and optimization algorithm.


---

## Body

## 1. Introduction

The practical significance of this project is to solve the practical problems in the production of yarn factories. Yarn factories often encounter problems such as different batches of fiber raw materials and the need to renovate varieties. How to maintain the stability of yarn quality indicators is a problem that the quality managers of yarn production enterprises pay most attention to. In order to solve these problems, the usual practice of spinning enterprises is to feed the yarn for trial spinning, then test the yarn quality index through sampling inspection, and then adjust the process parameters before continuing the test until a better configuration and process are found. This method is not only easy to cause huge waste of raw materials, manpower, and material resources but also has long cycle and low efficiency. At present, spinning mills urgently need modern technology that can accurately predict various spinning quality indexes before spinning.A yarn quality prediction model is a model that reflects the relationship between yarn quality indicators and fiber performance indicators, spinning process parameters, and finished yarn specifications. The more accurately the prediction model expresses the essential relationships, then the higher the prediction accuracy of the model, which is the common goal pursued by researchers. Through the reading and analysis of Chinese and foreign literature, it can be summarized that yarn quality prediction models at home and abroad have gone through two development stages: the first one is the mathematical and statistical model stage, with regression models as representative; the second one is the shallow machine learning stage, with support vector machines and BP neural networks as representative. From an overall perspective, the development of yarn quality prediction methods is at the same time a process of increasing prediction accuracy. From another point of view, it is the process of expressing the relationship between fiber properties and process indicators and yarn quality indicators more and more precisely. In order to use yarn quality forecasting in real production, the forecasting accuracy needs to be further improved and the relationship between fiber properties, process timing and its parameters, and yarn quality needs to be more accurately expressed. To achieve these goals, a deeper and more accurate representation is needed through a time-series deep neural network, which can further improve the prediction accuracy. In such a context, this paper proposes to establish a temporal deep neural network CNN-LSTM yarn quality prediction model [1–6].


## 2. Related Works

Yarn quality prediction methods are mainly divided into mathematical statistics methods and machine learning methods. The specific research is as follows:CSIRO et al. [7] established team equation in wool spinning field by using linear regression method. Its prediction result is average, and the prediction accuracy is not high, and it is mainly for Australian wool. For wool from other places, the prediction result error is large. On the basis of team equation, CSIRO also developed yarnspec prediction system, which has three models: yarn strength, yarn evenness, and yarn breakage rate. The main problem is that the prediction accuracy is not high.Chen Dongsheng [8] used the grey system model to analyze the relationship between flax fiber indexes and flax yarn quality. The analysis results showed that flax fiber splitting index had the greatest impact on yarn quality, flax fiber length had the lowest impact, and the impact of flax fiber strength was between the two. The relationship model between flax yarn quality indexes (yarn breaking elongation and yarn size) and flax fiber performance indexes is established. Using this model to predict, the flax yarn quality prediction index is relatively ideal, the residual error between the measured value and the predicted value of the trial spun yarn size is 0.0629, and the residual error between the measured value and the predicted value of the trial spun yarn breaking length is 0.478.Song Chuping and Cai Binbin [9] proposed a yarn quality prediction method combining SVM and GA (genetic algorithm, GA). Taking 5 fiber indexes such as fiber length and 4 process parameters as input and yarn strength as output, the relative error is 2.2%. This method can be well applied to the prediction of multivariety, small batch, and personalized yarn production.Wang Kanfeng et al. [10] used a three-layer shallow artificial neural network to predict the quality of combed wool yarn. The input is 11 indicators such as fiber fineness and fineness unevenness, and the output is quality indicators such as yarn unevenness, coarse and fine knots, and breakage rate. Because the factors of the formation of the decapitation rate are complex, a combined neural network model is designed. The results show that the predicted values of six indicators are ideal, and the correlation coefficient with the measured values exceeds 0.9, indicating that artificial neural network has a wide application prospect in yarn prediction.Zhang Wei [11] designed a convolutional neural network according to the mobile net model, which can classify the principal components of cotton, Tencel, polyester, wool, and acrylic fabrics with an accuracy of 96.53%.To sum up, the method based on data statistics can clearly determine the relationship between the original eigenvalues of input fibers and processes and the final yarn quality, but the prediction accuracy is low. The prediction accuracy of machine learning based methods is much higher than that of data statistical methods, but most of them use traditional neural networks and other methods. Advanced deep learning methods are rarely used and do not pay attention to the impact of textile process timing on yarn quality. This paper is based on the deficiencies of the above research status.


## 3. Materials and Method

### 3.1. CNN-LSTM Neural Network Model Design Ideas

The CNN-LSTM neural network model is a model designed to fully consider the effect of yarn processing timing and parameters on yarn quality, as shown in Figure1.Figure 1
Thinking of CNN-LSTM model design.Figure1 illustrates that the original fiber feature values are first optimized and dimensional zed by convolution and pooling operations, and then these optimized feature values are fed into the LSTM temporal neural network, and finally the corresponding predicted values of yarn quality indicators are output. For the sake of simplicity, the CNN-LSTM neural network model is abbreviated as CNN-LSTM model in the following.As shown in Figure1, the model consists of 6 parts. In the first part, it inputs the original fiber attribute value. In the second part, these attribute values are normalized, convoluted, and pooled. In the third part, it further optimizes the output value of the previous part. In the fourth part, these optimized feature values and process parameters are fed into the LSTM temporal neural network. Finally, the corresponding predicted values of yarn quality indicators are output. The CNN-LSTM neural network model is abbreviated as CNN-LSTM model in the following.


### 3.2. CNN-LSTM Model Structure

The structure of CNN-LSTM model is shown in Figure2.Figure 2
Structure of CNN-LSTM model design.As shown in Figure2, firstly, various performance indexes of normalized fibers are input and arranged into n-dimensional feature vectors from top to bottom according to the sequence; Then, after one-dimensional convolution and one-dimensional pooling, the optimized eigenvalue is finally input into the first time-series node of LSTM neural network, then the normalized processing parameter 1 is input at the second time-series node, and so on until the process parameter N is input, each node in the middle can output the semi-finished yarn quality index, and the final node can output the finished yarn quality index.


### 3.3. Parameter Setting of CNN-LSTM Model

Parameter setting of CNN-LSTM model mainly includes input layer structure, convolution layer structure, activation function design, pool layer structure, LSTM layer structure, and output layer structure [12–15]. Because spinning methods, technological processes, and equipment are not static, it is necessary to combine specific conditions in specific operations. In this section, the parameter setting of CNN-LSTM model is illustrated by taking the cotton yarn produced by a spinning factory in Zhejiang as an example.The specific process flow of a factory in Zhejiang is FA009 reciprocating cotton picker →FA105A uniaxial cotton opener →FA029 multi-bin cotton mixer →FA231 carding machine →FA306 drawing frame →RS30 rotor spinning machine.


#### 3.3.1. Input Layer

Input layer inputsN-dimensional fiber performance index feature vector. Take rotor yarn quality prediction as an example, as shown in Figure 3.Figure 3
CNN-LSTM neural network input vector.As shown in Figure3, the input is a column vector. The meanings from X11 to X44 are shown in Table 1. After normalization, the performance index data of cotton fibers are arranged into longitudinal 13-dimensional vectors in the order shown in Figure 3, which are input into the model.Table 1
Description of symbols in Chinese and English.
NumberNameX11Cotton fiber body lengthX12Cotton fiber maturityX13Cotton fiber breaking strengthX14Cotton fiber uniformityX21Cotton fiber linter rateX22Upper half length of cotton fiberX23Specific strength of cotton fiberX24Total cotton fiber defectsX31Impurity content of cotton fiberX32Moisture regains of cotton fiberX33Yellow degree of cotton fiber +bX34Cotton fiber micronaire valueX41Cotton fiber reflectivityX42Rotating speed of cotton openerX43Rotating speed of carding rollerX44Rotating speed of rotor


#### 3.3.2. Convolution Layer

As shown in Figure4, the convolution layer is 1 layer. Because there are no fixed rules and formulas for the definition of convolution kernel, this paper converts all the combinations from part to whole into convolution kernels, that is, there are 13 one-dimensional convolution kernels with the length from 1 to 13.
(1)M=W−F+2P/S+1.Figure 4
Structure diagram of convolution module.As shown in Equation (1), M is the matrix after convolution, W is the input matrix, F is the convolution kernel size, P is the padding size, and S is the step size. In this example, p is 0, and S =1, then a 13-dimensional eigenvector, a 12-dimensional eigenvector, and so on can be obtained after the 13-dimensional input value passes through the convolution layer.


#### 3.3.3. Activate Function

The main function of activation function is to transform linear expression into nonlinear expression. Due to the long back propagation distance of CNN-LSTM model, in order to prevent the gradient from disappearing, the convolution layer adopts ReLU (Corrected Linear Units, abbreviated as RELU) activation function, and its expression is shown in Formula (2).
(2)ReLUx=max0,x.


#### 3.3.4. Pooling Layer Structure

As shown in Figure5, there is only one pool layer, and the pool cores are, respectively, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, and 2 in length. Max-pooling algorithm is adopted, that is, the largest and most significant eigenvalues are selected from the 12 eigenvectors output by convolution layer, and finally, 12 eigenvalues can be obtained and input to the next layer.Figure 5
Pool layer structure diagram.


#### 3.3.5. LSTM Neural Network Layer

LSTM neural network is a time-series network, and the process parameters should be input according to the sequence of yarn processing time after normalization.As shown in Figure6, I1T,I2T, …, I13T represent the input vectors, (O1,O2,O3,O4) represent the output vectors, and T,T+1,T+2,andT+3 represent the time series. The output vector from the pooling layer is I1T, I2T, …, I13T. This vector is then fed into the LSTM neural network at moment T. Because the LSTM neural network is actually a sequence of the same network at different times, the input dimension should be the same each time [16–19]. At the moment of T+1, the input has only 1 bit value, so it is necessary to use 0 to make up the 13 bits, i.e., I1T+1, 0, 0, 0, 0, 0, ……, 0), where I1T+1 is the speed of the cotton opener (r/min). Similarly, input I1T+2, 0, 0, 0, 0, 0, ……, 0) at the moment of I1T+2, where I1T+2, 0, 0, 0, 0, 0, ……, 0) is the speed of carding roller (r/min). Input I1T+3, 0, 0, 0, 0, 0, ……, 0) at the moment of T+3, where I1T+3 is the rotating speed of the rotating cup (r/min).Figure 6
LSTM network model structure diagram.


#### 3.3.6. Output Layer

The output layer is an index of yarn, which can be determined according to the actual situation; in this example, four indexes are determined, namely, yarn strength, yarn Dan Qiang unevenness, yarn evenness unevenness, and total yarn cotton impurities. There are 4 neurons in the output layer.


#### 3.3.7. Experimental Conditions and Main Parameters

The experiment is conducted on the cloud server, and the development language is python3. The data comes from 36.4tex rotor yarn in a cotton mill in Zhejiang. 200 sets of data were collected. Randomly disturb the data set order, and select 90%, i.e., 160 sets of data as training data, 20 sets of data as test data, and 20 sets of data as validation data. Important parameters of network structure are shown in Table2. It has a convolution layer with 13 convolution kernels and uses the ReLU activation function. It has a pool layer with 12 pool cores. It has a LSTM hidden layer, including 16 nodes. There are 4 nodes in the output layer. The loss function uses MSE. The initial learning rate is 0.01, 100 training times in total.Table 2
Main parameters of CNN-LSTM model.
Parameter nameSpecific parametersNumber of convolution layers1 layerNumber of convolution kernels13Activate functionReLUNumber of pooling layers1 layerNumber of pooled cores12LSTM neural network layer numberOneLSTM hidden layer node number16Output layer parametersFourLoss functionMean square error function (MSE)Initial value of learning rate0.01Training dataOne hundred and eightyTest data20Epoch100


## 3.1. CNN-LSTM Neural Network Model Design Ideas

The CNN-LSTM neural network model is a model designed to fully consider the effect of yarn processing timing and parameters on yarn quality, as shown in Figure1.Figure 1
Thinking of CNN-LSTM model design.Figure1 illustrates that the original fiber feature values are first optimized and dimensional zed by convolution and pooling operations, and then these optimized feature values are fed into the LSTM temporal neural network, and finally the corresponding predicted values of yarn quality indicators are output. For the sake of simplicity, the CNN-LSTM neural network model is abbreviated as CNN-LSTM model in the following.As shown in Figure1, the model consists of 6 parts. In the first part, it inputs the original fiber attribute value. In the second part, these attribute values are normalized, convoluted, and pooled. In the third part, it further optimizes the output value of the previous part. In the fourth part, these optimized feature values and process parameters are fed into the LSTM temporal neural network. Finally, the corresponding predicted values of yarn quality indicators are output. The CNN-LSTM neural network model is abbreviated as CNN-LSTM model in the following.


## 3.2. CNN-LSTM Model Structure

The structure of CNN-LSTM model is shown in Figure2.Figure 2
Structure of CNN-LSTM model design.As shown in Figure2, firstly, various performance indexes of normalized fibers are input and arranged into n-dimensional feature vectors from top to bottom according to the sequence; Then, after one-dimensional convolution and one-dimensional pooling, the optimized eigenvalue is finally input into the first time-series node of LSTM neural network, then the normalized processing parameter 1 is input at the second time-series node, and so on until the process parameter N is input, each node in the middle can output the semi-finished yarn quality index, and the final node can output the finished yarn quality index.


## 3.3. Parameter Setting of CNN-LSTM Model

Parameter setting of CNN-LSTM model mainly includes input layer structure, convolution layer structure, activation function design, pool layer structure, LSTM layer structure, and output layer structure [12–15]. Because spinning methods, technological processes, and equipment are not static, it is necessary to combine specific conditions in specific operations. In this section, the parameter setting of CNN-LSTM model is illustrated by taking the cotton yarn produced by a spinning factory in Zhejiang as an example.The specific process flow of a factory in Zhejiang is FA009 reciprocating cotton picker →FA105A uniaxial cotton opener →FA029 multi-bin cotton mixer →FA231 carding machine →FA306 drawing frame →RS30 rotor spinning machine.


### 3.3.1. Input Layer

Input layer inputsN-dimensional fiber performance index feature vector. Take rotor yarn quality prediction as an example, as shown in Figure 3.Figure 3
CNN-LSTM neural network input vector.As shown in Figure3, the input is a column vector. The meanings from X11 to X44 are shown in Table 1. After normalization, the performance index data of cotton fibers are arranged into longitudinal 13-dimensional vectors in the order shown in Figure 3, which are input into the model.Table 1
Description of symbols in Chinese and English.
NumberNameX11Cotton fiber body lengthX12Cotton fiber maturityX13Cotton fiber breaking strengthX14Cotton fiber uniformityX21Cotton fiber linter rateX22Upper half length of cotton fiberX23Specific strength of cotton fiberX24Total cotton fiber defectsX31Impurity content of cotton fiberX32Moisture regains of cotton fiberX33Yellow degree of cotton fiber +bX34Cotton fiber micronaire valueX41Cotton fiber reflectivityX42Rotating speed of cotton openerX43Rotating speed of carding rollerX44Rotating speed of rotor


### 3.3.2. Convolution Layer

As shown in Figure4, the convolution layer is 1 layer. Because there are no fixed rules and formulas for the definition of convolution kernel, this paper converts all the combinations from part to whole into convolution kernels, that is, there are 13 one-dimensional convolution kernels with the length from 1 to 13.
(1)M=W−F+2P/S+1.Figure 4
Structure diagram of convolution module.As shown in Equation (1), M is the matrix after convolution, W is the input matrix, F is the convolution kernel size, P is the padding size, and S is the step size. In this example, p is 0, and S =1, then a 13-dimensional eigenvector, a 12-dimensional eigenvector, and so on can be obtained after the 13-dimensional input value passes through the convolution layer.


### 3.3.3. Activate Function

The main function of activation function is to transform linear expression into nonlinear expression. Due to the long back propagation distance of CNN-LSTM model, in order to prevent the gradient from disappearing, the convolution layer adopts ReLU (Corrected Linear Units, abbreviated as RELU) activation function, and its expression is shown in Formula (2).
(2)ReLUx=max0,x.


### 3.3.4. Pooling Layer Structure

As shown in Figure5, there is only one pool layer, and the pool cores are, respectively, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, and 2 in length. Max-pooling algorithm is adopted, that is, the largest and most significant eigenvalues are selected from the 12 eigenvectors output by convolution layer, and finally, 12 eigenvalues can be obtained and input to the next layer.Figure 5
Pool layer structure diagram.


### 3.3.5. LSTM Neural Network Layer

LSTM neural network is a time-series network, and the process parameters should be input according to the sequence of yarn processing time after normalization.As shown in Figure6, I1T,I2T, …, I13T represent the input vectors, (O1,O2,O3,O4) represent the output vectors, and T,T+1,T+2,andT+3 represent the time series. The output vector from the pooling layer is I1T, I2T, …, I13T. This vector is then fed into the LSTM neural network at moment T. Because the LSTM neural network is actually a sequence of the same network at different times, the input dimension should be the same each time [16–19]. At the moment of T+1, the input has only 1 bit value, so it is necessary to use 0 to make up the 13 bits, i.e., I1T+1, 0, 0, 0, 0, 0, ……, 0), where I1T+1 is the speed of the cotton opener (r/min). Similarly, input I1T+2, 0, 0, 0, 0, 0, ……, 0) at the moment of I1T+2, where I1T+2, 0, 0, 0, 0, 0, ……, 0) is the speed of carding roller (r/min). Input I1T+3, 0, 0, 0, 0, 0, ……, 0) at the moment of T+3, where I1T+3 is the rotating speed of the rotating cup (r/min).Figure 6
LSTM network model structure diagram.


### 3.3.6. Output Layer

The output layer is an index of yarn, which can be determined according to the actual situation; in this example, four indexes are determined, namely, yarn strength, yarn Dan Qiang unevenness, yarn evenness unevenness, and total yarn cotton impurities. There are 4 neurons in the output layer.


### 3.3.7. Experimental Conditions and Main Parameters

The experiment is conducted on the cloud server, and the development language is python3. The data comes from 36.4tex rotor yarn in a cotton mill in Zhejiang. 200 sets of data were collected. Randomly disturb the data set order, and select 90%, i.e., 160 sets of data as training data, 20 sets of data as test data, and 20 sets of data as validation data. Important parameters of network structure are shown in Table2. It has a convolution layer with 13 convolution kernels and uses the ReLU activation function. It has a pool layer with 12 pool cores. It has a LSTM hidden layer, including 16 nodes. There are 4 nodes in the output layer. The loss function uses MSE. The initial learning rate is 0.01, 100 training times in total.Table 2
Main parameters of CNN-LSTM model.
Parameter nameSpecific parametersNumber of convolution layers1 layerNumber of convolution kernels13Activate functionReLUNumber of pooling layers1 layerNumber of pooled cores12LSTM neural network layer numberOneLSTM hidden layer node number16Output layer parametersFourLoss functionMean square error function (MSE)Initial value of learning rate0.01Training dataOne hundred and eightyTest data20Epoch100


## 3.3.1. Input Layer

Input layer inputsN-dimensional fiber performance index feature vector. Take rotor yarn quality prediction as an example, as shown in Figure 3.Figure 3
CNN-LSTM neural network input vector.As shown in Figure3, the input is a column vector. The meanings from X11 to X44 are shown in Table 1. After normalization, the performance index data of cotton fibers are arranged into longitudinal 13-dimensional vectors in the order shown in Figure 3, which are input into the model.Table 1
Description of symbols in Chinese and English.
NumberNameX11Cotton fiber body lengthX12Cotton fiber maturityX13Cotton fiber breaking strengthX14Cotton fiber uniformityX21Cotton fiber linter rateX22Upper half length of cotton fiberX23Specific strength of cotton fiberX24Total cotton fiber defectsX31Impurity content of cotton fiberX32Moisture regains of cotton fiberX33Yellow degree of cotton fiber +bX34Cotton fiber micronaire valueX41Cotton fiber reflectivityX42Rotating speed of cotton openerX43Rotating speed of carding rollerX44Rotating speed of rotor


## 3.3.2. Convolution Layer

As shown in Figure4, the convolution layer is 1 layer. Because there are no fixed rules and formulas for the definition of convolution kernel, this paper converts all the combinations from part to whole into convolution kernels, that is, there are 13 one-dimensional convolution kernels with the length from 1 to 13.
(1)M=W−F+2P/S+1.Figure 4
Structure diagram of convolution module.As shown in Equation (1), M is the matrix after convolution, W is the input matrix, F is the convolution kernel size, P is the padding size, and S is the step size. In this example, p is 0, and S =1, then a 13-dimensional eigenvector, a 12-dimensional eigenvector, and so on can be obtained after the 13-dimensional input value passes through the convolution layer.


## 3.3.3. Activate Function

The main function of activation function is to transform linear expression into nonlinear expression. Due to the long back propagation distance of CNN-LSTM model, in order to prevent the gradient from disappearing, the convolution layer adopts ReLU (Corrected Linear Units, abbreviated as RELU) activation function, and its expression is shown in Formula (2).
(2)ReLUx=max0,x.


## 3.3.4. Pooling Layer Structure

As shown in Figure5, there is only one pool layer, and the pool cores are, respectively, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, and 2 in length. Max-pooling algorithm is adopted, that is, the largest and most significant eigenvalues are selected from the 12 eigenvectors output by convolution layer, and finally, 12 eigenvalues can be obtained and input to the next layer.Figure 5
Pool layer structure diagram.


## 3.3.5. LSTM Neural Network Layer

LSTM neural network is a time-series network, and the process parameters should be input according to the sequence of yarn processing time after normalization.As shown in Figure6, I1T,I2T, …, I13T represent the input vectors, (O1,O2,O3,O4) represent the output vectors, and T,T+1,T+2,andT+3 represent the time series. The output vector from the pooling layer is I1T, I2T, …, I13T. This vector is then fed into the LSTM neural network at moment T. Because the LSTM neural network is actually a sequence of the same network at different times, the input dimension should be the same each time [16–19]. At the moment of T+1, the input has only 1 bit value, so it is necessary to use 0 to make up the 13 bits, i.e., I1T+1, 0, 0, 0, 0, 0, ……, 0), where I1T+1 is the speed of the cotton opener (r/min). Similarly, input I1T+2, 0, 0, 0, 0, 0, ……, 0) at the moment of I1T+2, where I1T+2, 0, 0, 0, 0, 0, ……, 0) is the speed of carding roller (r/min). Input I1T+3, 0, 0, 0, 0, 0, ……, 0) at the moment of T+3, where I1T+3 is the rotating speed of the rotating cup (r/min).Figure 6
LSTM network model structure diagram.


## 3.3.6. Output Layer

The output layer is an index of yarn, which can be determined according to the actual situation; in this example, four indexes are determined, namely, yarn strength, yarn Dan Qiang unevenness, yarn evenness unevenness, and total yarn cotton impurities. There are 4 neurons in the output layer.


## 3.3.7. Experimental Conditions and Main Parameters

The experiment is conducted on the cloud server, and the development language is python3. The data comes from 36.4tex rotor yarn in a cotton mill in Zhejiang. 200 sets of data were collected. Randomly disturb the data set order, and select 90%, i.e., 160 sets of data as training data, 20 sets of data as test data, and 20 sets of data as validation data. Important parameters of network structure are shown in Table2. It has a convolution layer with 13 convolution kernels and uses the ReLU activation function. It has a pool layer with 12 pool cores. It has a LSTM hidden layer, including 16 nodes. There are 4 nodes in the output layer. The loss function uses MSE. The initial learning rate is 0.01, 100 training times in total.Table 2
Main parameters of CNN-LSTM model.
Parameter nameSpecific parametersNumber of convolution layers1 layerNumber of convolution kernels13Activate functionReLUNumber of pooling layers1 layerNumber of pooled cores12LSTM neural network layer numberOneLSTM hidden layer node number16Output layer parametersFourLoss functionMean square error function (MSE)Initial value of learning rate0.01Training dataOne hundred and eightyTest data20Epoch100


## 4. Results and Discussion

### 4.1. Analysis of Prediction Results

In order to compare the prediction results of yarn quality by CNN-LSTM with the traditional model, the traditional linear regression model and BP neural network are also used for prediction. BP neural network adopts three-layer structure, with 16 neurons as input, 30 neurons as hidden layer, and 4 neurons as output. 20 groups of test data were compared, and MSE was used as evaluation index. The comparison results of the three algorithms are shown in Tables3 and 4 and Figures 7–9.Table 3
Comparison table of predicted values of rotor yarn strength by three algorithms. Unit: cN/tex.
Serial numberActual valueCNN-LSTMBPRegression algorithm116.416.416.017.0216.116.115.916.0315.415.515.016.1414.914.914.015.5514.814.714.615.1614.814.914.815.5715.615.415.015.0815.215.214.914.5914.714.814.314.01014.514.614.215.01114.814.714.215.21214.814.714.014.01315.215.214.814.51414.814.715.115.31514.915.015.315.41615.415.215.816.01715.715.816.016.21815.715.716.016.2Mean absolute difference0.0800.4000.556Average relative error0.0080.0260.037Mean square error (MSE)0.0100.2030.336Root-mean-square error0.1100.4510.579R square0.9900.8700.560Table 4
Comparison of predicted values of two models for single intensity unevenness. Unit: %.
Serial numberActual valueCNN-LSTMBPRegression algorithm19.29.21010.1213.513.51312.539.59.4108410.910.811.210511.311.11110.5612.112.112.411.578.98.99.11089.99.810.21199.29.29101013.513.41415119.59.510.5111210.910.811.211.81311.311.211.51181412.112.112.512.9158.98.99.29.5169.99.910.210.61711.411.411.711.91811.511.311.811.9Mean absolute difference0.0550.4500.566Average relative error0.0050.0360.047Mean square error (MSE)0.0090.2230.436Root-mean-square error0.0980.4610.589R square0.9900.8800.550Figure 7
MSE of predicted value of Tiao Gan unevenness of rotor yarn by three models.Figure 8
MSE of the predicted value of the total number of cotton impurities in rotor yarn by three models.Figure 9
MSE of predicted value of Dan Qiang unevenness of rotor yarn by three models.As shown in Table3, the mean absolute error of CNN-LSTM prediction results was 0.080, the mean relative error was 0.008, the mean squared error (MSE) was 0.010, the root-mean squared error (RMSE) was 0.110, and the correlation coefficient squared (R2) was 0.990 when predicting the strength of rotating cup yarn; the MSE of linear regression model and BP neural network was 0.2 or more; relative to linear regression model and BP neural network, the MSE of CNN-LSTM model has a significant decrease. From Figures 7–9, it can be analyzed that the MSE of CNN-LSTM model is significantly reduced in predicting yarn single-strength unevenness, yarn stem unevenness, and total number of cottons compared to linear regression model and BP neural network. In summary, the CNN-LSTM has higher prediction accuracy than the linear regression model and BP neural network on the rotor yarn dataset with dynamic process data.


### 4.2. Analysis of Factors Affecting Prediction Accuracy of CNN-LSTM Model

#### 4.2.1. Parameter Setting of CNN-LSTM Model

According to the previous research, the parameters of CNN-LSTM model are set as shown in Table5, and the following analyses are discussed based on the parameters set in the table.Table 5
CNN-LSTM model parameter setting table.
Parameter nameSpecific parametersNumber of convolution layers1 layerNumber of convolution kernels13Activate functionReLUNumber of pooling layers1 layerNumber of pooled cores12LSTM neural network layer numberOneLSTM hidden layer node number16Output layer parametersFourLoss functionMean square error function (MSE)Initial value of learning rate0.01Training dataOne hundred and eightyTest data20Epoch100


#### 4.2.2. The Influence of the Order of Input Matrix Eigenvalues on the Model

This section mainly studies the influence of input sequence of eigenvalues on CNN-LSTM model. See Table6 for the test scheme. The mean square error (MSE) value between the predicted value and the measured value of yarn strength index is used as the evaluation index.Table 6
Input feature arrangement scheme.
Plan NO.Enter the data sort orderH-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44H-2X44X12X13X14X21X22X23X24X31X32X33X34X41X42X43X11H-3X11X43X13X14X21X22X23X24X31X32X33X34X41X42X12X44H-4X11X12X42X14X21X22X23X24X31X32X33X34X41X13X43X44H-5X11X12X13X41X21X22X23X24X31X32X33X34X14X42X43X44H-6X11X12X13X14X34X22X23X24X31X32X33X21X41X42X43X44H-7X11X12X13X14X21X33X23X24X31X32X22X34X41X42X43X44H-8X11X12X13X14X21X22X32X24X31X23X33X34X41X42X43X44H-9X11X12X13X14X21X22X23X31X24X32X33X34X41X42X43X44As shown in Figure10, different input sequences of eigenvalues have no obvious influence on MSE values. That is, the input sequence has no obvious influence on the prediction accuracy of the model. The main reason is that the deep neural network has automatic adjustment and adaptability to the input value sequence.Figure 10
MSE value of cotton yarn strength of nine input schemes.


#### 4.2.3. The Influence of Cotton Fiber Performance Index on the Model

This section mainly studies the influence of fiber performance index on the prediction accuracy of the model, and look at Table7 for specific schemes. The mean square error (MSE) value between the predicted value and the measured value of the yarn strength index is used as the evaluation index, and the experimental results are shown in Figure 11.Table 7
Selection and input scheme of cotton fiber performance index.
Scheme NO.Enter the data sort orderJ-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44J-20X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44J-3X11X120X14X21X22X23X24X31X32X33X34X41X42X43X44J-4X11X12X130X21X22X23X24X31X32X33X34X41X42X43X44J-5X11X12X13X14X21X22X23X24X310X33X34X41X42X43X44Figure 11
MSE values of six input cotton fiber performance index schemes.As shown in Figure11, when X11, X13, and X14 were input to the model with 0 instead, there was a large increase in the MSE value of the model, indicating that these feature values had a large impact on the model prediction accuracy. When X32 is not input to the model, although the MSE value also increases, the increase is small, indicating that the impact on the model prediction accuracy is not significant. X11,X13, and X14 correspond to the main body length of cotton fiber, the breaking strength of cotton fiber, and the uniformity of cotton fiber fineness, indicating that these feature values have a great impact on the model performance. X32 corresponds to the rewetting rate of cotton fiber, indicating that the impact of this feature value on the model performance is not obvious [16–19].The above results show that different fiber performance indicators have an impact on the prediction accuracy of yarn quality indicators, so when selecting input parameters, it is necessary to combine relevant practical experience with the actual situation, that is, different raw material attributes.


#### 4.2.4. Influence of Rotor Spinning Process Parameters on the Model

This section mainly studies the influence of process parameters on the model. According to the idea of zeroing one process parameter at a time, see Table8 for the specific scheme.Table 8
Input scheme table for process parameter selection.
Scheme NO.Enter the data sort orderK-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44K-2X11X12X13X14X21X22X23X24X31X32X33X34X410X43X44K-3X11X12X13X14X21X22X23X24X31X32X33X34X41X420X44K-4X11X12X13X14X21X22X23X24X31X32X33X34X41X42X430Figure12 shows that the process parameters have a significant impact on the prediction accuracy of the CNN-LSTM model, with X_44 (rotating cup speed) having the most pronounced effect. This indicates that the process parameters, especially some critical ones, have a large impact on the yarn quality.Figure 12
MSE values of four input process parameter index schemes.


#### 4.2.5. Selection of LSTM Hidden Layer Node Number

The number of LSTM hidden layer nodes cannot be less than the eigenvalue of the input LSTM layer, that is, 16 nodes. Add one hidden layer node at a time until the end of 19 nodes. Four experimental schemes are designed, as shown in Table9.Table 9
:Four LSTM hidden layer node schemes.
Scheme numberLSTM hidden layer node numberO-116O-217O-318O-419As shown in Figure13, 16 nodes, 17 nodes, 18 nodes, and 19 nodes are set for LSTM according to experience. When set to 19 nodes, the MSE value decreases slightly. Considering that 19 nodes are larger than 16 nodes in calculation amount and time, 16 nodes are selected in this neural network model.Figure 13
MSE diagram of four LSTM hidden layer node schemes.


#### 4.2.6. Influence of LSTM Layer Number on Model

The design idea of LSTM layers is to increase the number of LSTM layers under the condition of 16 nodes in each layer and observe the influence on the model accuracy. A total of three schemes are designed as shown in Table10.Table 10
Three LSTM layer design schemes.
Scheme NO.LSTM layersP-11 layerP-22 layerP-3Layer 3As shown in Figure14, when predicting yarn strength, one layer of LSTM, two layers of LSTM, and three layers of LSTM were used, and the MSE value decreased only slightly. From the point of view of reducing computation, computing time, and saving resources, this model chooses one-layer LSTM [20–22].Figure 14
Relationship between LSTM layer number and MSE diagram.


#### 4.2.7. Influence of Optimization Algorithm on Model

CNN-LSTM model is special, and the gradient descent optimization algorithm with fixed learning rate is not ideal, and it needs Adam algorithm, that is, adaptive learning rate to optimize. The following four optimization algorithms are selected for comparative study, which are SGD, Adagrad, Momentum, and Adam optimization algorithms. These four optimal algorithms have their own characteristics, SGD (Stochastic Gradient Descent) trains for large samples; Adagrad (Adaptive Gradient Algorithm) is an improvement of SGD to improve its robustness; Momentum is also an improvement on SGD, which can accelerate the convergence of SGD and has a strong inhibition on convergence oscillation; Adam (Adaptive Moment Estimation) only needs to give an initial learning rate, and can adapt the learning rate according to the situation in the training process [23, 24].As shown in Figure15, four optimization algorithms are used for experiments; when Adam optimization algorithm is used, the MSE value of yarn strength reaches the lowest, that is, the prediction accuracy reaches the highest. The reason is that CNN-LSTM model cannot be trained with a fixed learning rate, and it needs to adjust the learning rate according to the training situation; Adam just meets this requirement and can automatically adjust the learning rate. To sum up, Adam optimization algorithm is the best optimization algorithm for CNN-LSTM model.Figure 15
Relationship between optimization algorithm and MSE.


## 4.1. Analysis of Prediction Results

In order to compare the prediction results of yarn quality by CNN-LSTM with the traditional model, the traditional linear regression model and BP neural network are also used for prediction. BP neural network adopts three-layer structure, with 16 neurons as input, 30 neurons as hidden layer, and 4 neurons as output. 20 groups of test data were compared, and MSE was used as evaluation index. The comparison results of the three algorithms are shown in Tables3 and 4 and Figures 7–9.Table 3
Comparison table of predicted values of rotor yarn strength by three algorithms. Unit: cN/tex.
Serial numberActual valueCNN-LSTMBPRegression algorithm116.416.416.017.0216.116.115.916.0315.415.515.016.1414.914.914.015.5514.814.714.615.1614.814.914.815.5715.615.415.015.0815.215.214.914.5914.714.814.314.01014.514.614.215.01114.814.714.215.21214.814.714.014.01315.215.214.814.51414.814.715.115.31514.915.015.315.41615.415.215.816.01715.715.816.016.21815.715.716.016.2Mean absolute difference0.0800.4000.556Average relative error0.0080.0260.037Mean square error (MSE)0.0100.2030.336Root-mean-square error0.1100.4510.579R square0.9900.8700.560Table 4
Comparison of predicted values of two models for single intensity unevenness. Unit: %.
Serial numberActual valueCNN-LSTMBPRegression algorithm19.29.21010.1213.513.51312.539.59.4108410.910.811.210511.311.11110.5612.112.112.411.578.98.99.11089.99.810.21199.29.29101013.513.41415119.59.510.5111210.910.811.211.81311.311.211.51181412.112.112.512.9158.98.99.29.5169.99.910.210.61711.411.411.711.91811.511.311.811.9Mean absolute difference0.0550.4500.566Average relative error0.0050.0360.047Mean square error (MSE)0.0090.2230.436Root-mean-square error0.0980.4610.589R square0.9900.8800.550Figure 7
MSE of predicted value of Tiao Gan unevenness of rotor yarn by three models.Figure 8
MSE of the predicted value of the total number of cotton impurities in rotor yarn by three models.Figure 9
MSE of predicted value of Dan Qiang unevenness of rotor yarn by three models.As shown in Table3, the mean absolute error of CNN-LSTM prediction results was 0.080, the mean relative error was 0.008, the mean squared error (MSE) was 0.010, the root-mean squared error (RMSE) was 0.110, and the correlation coefficient squared (R2) was 0.990 when predicting the strength of rotating cup yarn; the MSE of linear regression model and BP neural network was 0.2 or more; relative to linear regression model and BP neural network, the MSE of CNN-LSTM model has a significant decrease. From Figures 7–9, it can be analyzed that the MSE of CNN-LSTM model is significantly reduced in predicting yarn single-strength unevenness, yarn stem unevenness, and total number of cottons compared to linear regression model and BP neural network. In summary, the CNN-LSTM has higher prediction accuracy than the linear regression model and BP neural network on the rotor yarn dataset with dynamic process data.


## 4.2. Analysis of Factors Affecting Prediction Accuracy of CNN-LSTM Model

### 4.2.1. Parameter Setting of CNN-LSTM Model

According to the previous research, the parameters of CNN-LSTM model are set as shown in Table5, and the following analyses are discussed based on the parameters set in the table.Table 5
CNN-LSTM model parameter setting table.
Parameter nameSpecific parametersNumber of convolution layers1 layerNumber of convolution kernels13Activate functionReLUNumber of pooling layers1 layerNumber of pooled cores12LSTM neural network layer numberOneLSTM hidden layer node number16Output layer parametersFourLoss functionMean square error function (MSE)Initial value of learning rate0.01Training dataOne hundred and eightyTest data20Epoch100


### 4.2.2. The Influence of the Order of Input Matrix Eigenvalues on the Model

This section mainly studies the influence of input sequence of eigenvalues on CNN-LSTM model. See Table6 for the test scheme. The mean square error (MSE) value between the predicted value and the measured value of yarn strength index is used as the evaluation index.Table 6
Input feature arrangement scheme.
Plan NO.Enter the data sort orderH-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44H-2X44X12X13X14X21X22X23X24X31X32X33X34X41X42X43X11H-3X11X43X13X14X21X22X23X24X31X32X33X34X41X42X12X44H-4X11X12X42X14X21X22X23X24X31X32X33X34X41X13X43X44H-5X11X12X13X41X21X22X23X24X31X32X33X34X14X42X43X44H-6X11X12X13X14X34X22X23X24X31X32X33X21X41X42X43X44H-7X11X12X13X14X21X33X23X24X31X32X22X34X41X42X43X44H-8X11X12X13X14X21X22X32X24X31X23X33X34X41X42X43X44H-9X11X12X13X14X21X22X23X31X24X32X33X34X41X42X43X44As shown in Figure10, different input sequences of eigenvalues have no obvious influence on MSE values. That is, the input sequence has no obvious influence on the prediction accuracy of the model. The main reason is that the deep neural network has automatic adjustment and adaptability to the input value sequence.Figure 10
MSE value of cotton yarn strength of nine input schemes.


### 4.2.3. The Influence of Cotton Fiber Performance Index on the Model

This section mainly studies the influence of fiber performance index on the prediction accuracy of the model, and look at Table7 for specific schemes. The mean square error (MSE) value between the predicted value and the measured value of the yarn strength index is used as the evaluation index, and the experimental results are shown in Figure 11.Table 7
Selection and input scheme of cotton fiber performance index.
Scheme NO.Enter the data sort orderJ-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44J-20X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44J-3X11X120X14X21X22X23X24X31X32X33X34X41X42X43X44J-4X11X12X130X21X22X23X24X31X32X33X34X41X42X43X44J-5X11X12X13X14X21X22X23X24X310X33X34X41X42X43X44Figure 11
MSE values of six input cotton fiber performance index schemes.As shown in Figure11, when X11, X13, and X14 were input to the model with 0 instead, there was a large increase in the MSE value of the model, indicating that these feature values had a large impact on the model prediction accuracy. When X32 is not input to the model, although the MSE value also increases, the increase is small, indicating that the impact on the model prediction accuracy is not significant. X11,X13, and X14 correspond to the main body length of cotton fiber, the breaking strength of cotton fiber, and the uniformity of cotton fiber fineness, indicating that these feature values have a great impact on the model performance. X32 corresponds to the rewetting rate of cotton fiber, indicating that the impact of this feature value on the model performance is not obvious [16–19].The above results show that different fiber performance indicators have an impact on the prediction accuracy of yarn quality indicators, so when selecting input parameters, it is necessary to combine relevant practical experience with the actual situation, that is, different raw material attributes.


### 4.2.4. Influence of Rotor Spinning Process Parameters on the Model

This section mainly studies the influence of process parameters on the model. According to the idea of zeroing one process parameter at a time, see Table8 for the specific scheme.Table 8
Input scheme table for process parameter selection.
Scheme NO.Enter the data sort orderK-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44K-2X11X12X13X14X21X22X23X24X31X32X33X34X410X43X44K-3X11X12X13X14X21X22X23X24X31X32X33X34X41X420X44K-4X11X12X13X14X21X22X23X24X31X32X33X34X41X42X430Figure12 shows that the process parameters have a significant impact on the prediction accuracy of the CNN-LSTM model, with X_44 (rotating cup speed) having the most pronounced effect. This indicates that the process parameters, especially some critical ones, have a large impact on the yarn quality.Figure 12
MSE values of four input process parameter index schemes.


### 4.2.5. Selection of LSTM Hidden Layer Node Number

The number of LSTM hidden layer nodes cannot be less than the eigenvalue of the input LSTM layer, that is, 16 nodes. Add one hidden layer node at a time until the end of 19 nodes. Four experimental schemes are designed, as shown in Table9.Table 9
:Four LSTM hidden layer node schemes.
Scheme numberLSTM hidden layer node numberO-116O-217O-318O-419As shown in Figure13, 16 nodes, 17 nodes, 18 nodes, and 19 nodes are set for LSTM according to experience. When set to 19 nodes, the MSE value decreases slightly. Considering that 19 nodes are larger than 16 nodes in calculation amount and time, 16 nodes are selected in this neural network model.Figure 13
MSE diagram of four LSTM hidden layer node schemes.


### 4.2.6. Influence of LSTM Layer Number on Model

The design idea of LSTM layers is to increase the number of LSTM layers under the condition of 16 nodes in each layer and observe the influence on the model accuracy. A total of three schemes are designed as shown in Table10.Table 10
Three LSTM layer design schemes.
Scheme NO.LSTM layersP-11 layerP-22 layerP-3Layer 3As shown in Figure14, when predicting yarn strength, one layer of LSTM, two layers of LSTM, and three layers of LSTM were used, and the MSE value decreased only slightly. From the point of view of reducing computation, computing time, and saving resources, this model chooses one-layer LSTM [20–22].Figure 14
Relationship between LSTM layer number and MSE diagram.


### 4.2.7. Influence of Optimization Algorithm on Model

CNN-LSTM model is special, and the gradient descent optimization algorithm with fixed learning rate is not ideal, and it needs Adam algorithm, that is, adaptive learning rate to optimize. The following four optimization algorithms are selected for comparative study, which are SGD, Adagrad, Momentum, and Adam optimization algorithms. These four optimal algorithms have their own characteristics, SGD (Stochastic Gradient Descent) trains for large samples; Adagrad (Adaptive Gradient Algorithm) is an improvement of SGD to improve its robustness; Momentum is also an improvement on SGD, which can accelerate the convergence of SGD and has a strong inhibition on convergence oscillation; Adam (Adaptive Moment Estimation) only needs to give an initial learning rate, and can adapt the learning rate according to the situation in the training process [23, 24].As shown in Figure15, four optimization algorithms are used for experiments; when Adam optimization algorithm is used, the MSE value of yarn strength reaches the lowest, that is, the prediction accuracy reaches the highest. The reason is that CNN-LSTM model cannot be trained with a fixed learning rate, and it needs to adjust the learning rate according to the training situation; Adam just meets this requirement and can automatically adjust the learning rate. To sum up, Adam optimization algorithm is the best optimization algorithm for CNN-LSTM model.Figure 15
Relationship between optimization algorithm and MSE.


## 4.2.1. Parameter Setting of CNN-LSTM Model

According to the previous research, the parameters of CNN-LSTM model are set as shown in Table5, and the following analyses are discussed based on the parameters set in the table.Table 5
CNN-LSTM model parameter setting table.
Parameter nameSpecific parametersNumber of convolution layers1 layerNumber of convolution kernels13Activate functionReLUNumber of pooling layers1 layerNumber of pooled cores12LSTM neural network layer numberOneLSTM hidden layer node number16Output layer parametersFourLoss functionMean square error function (MSE)Initial value of learning rate0.01Training dataOne hundred and eightyTest data20Epoch100


## 4.2.2. The Influence of the Order of Input Matrix Eigenvalues on the Model

This section mainly studies the influence of input sequence of eigenvalues on CNN-LSTM model. See Table6 for the test scheme. The mean square error (MSE) value between the predicted value and the measured value of yarn strength index is used as the evaluation index.Table 6
Input feature arrangement scheme.
Plan NO.Enter the data sort orderH-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44H-2X44X12X13X14X21X22X23X24X31X32X33X34X41X42X43X11H-3X11X43X13X14X21X22X23X24X31X32X33X34X41X42X12X44H-4X11X12X42X14X21X22X23X24X31X32X33X34X41X13X43X44H-5X11X12X13X41X21X22X23X24X31X32X33X34X14X42X43X44H-6X11X12X13X14X34X22X23X24X31X32X33X21X41X42X43X44H-7X11X12X13X14X21X33X23X24X31X32X22X34X41X42X43X44H-8X11X12X13X14X21X22X32X24X31X23X33X34X41X42X43X44H-9X11X12X13X14X21X22X23X31X24X32X33X34X41X42X43X44As shown in Figure10, different input sequences of eigenvalues have no obvious influence on MSE values. That is, the input sequence has no obvious influence on the prediction accuracy of the model. The main reason is that the deep neural network has automatic adjustment and adaptability to the input value sequence.Figure 10
MSE value of cotton yarn strength of nine input schemes.


## 4.2.3. The Influence of Cotton Fiber Performance Index on the Model

This section mainly studies the influence of fiber performance index on the prediction accuracy of the model, and look at Table7 for specific schemes. The mean square error (MSE) value between the predicted value and the measured value of the yarn strength index is used as the evaluation index, and the experimental results are shown in Figure 11.Table 7
Selection and input scheme of cotton fiber performance index.
Scheme NO.Enter the data sort orderJ-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44J-20X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44J-3X11X120X14X21X22X23X24X31X32X33X34X41X42X43X44J-4X11X12X130X21X22X23X24X31X32X33X34X41X42X43X44J-5X11X12X13X14X21X22X23X24X310X33X34X41X42X43X44Figure 11
MSE values of six input cotton fiber performance index schemes.As shown in Figure11, when X11, X13, and X14 were input to the model with 0 instead, there was a large increase in the MSE value of the model, indicating that these feature values had a large impact on the model prediction accuracy. When X32 is not input to the model, although the MSE value also increases, the increase is small, indicating that the impact on the model prediction accuracy is not significant. X11,X13, and X14 correspond to the main body length of cotton fiber, the breaking strength of cotton fiber, and the uniformity of cotton fiber fineness, indicating that these feature values have a great impact on the model performance. X32 corresponds to the rewetting rate of cotton fiber, indicating that the impact of this feature value on the model performance is not obvious [16–19].The above results show that different fiber performance indicators have an impact on the prediction accuracy of yarn quality indicators, so when selecting input parameters, it is necessary to combine relevant practical experience with the actual situation, that is, different raw material attributes.


## 4.2.4. Influence of Rotor Spinning Process Parameters on the Model

This section mainly studies the influence of process parameters on the model. According to the idea of zeroing one process parameter at a time, see Table8 for the specific scheme.Table 8
Input scheme table for process parameter selection.
Scheme NO.Enter the data sort orderK-1X11X12X13X14X21X22X23X24X31X32X33X34X41X42X43X44K-2X11X12X13X14X21X22X23X24X31X32X33X34X410X43X44K-3X11X12X13X14X21X22X23X24X31X32X33X34X41X420X44K-4X11X12X13X14X21X22X23X24X31X32X33X34X41X42X430Figure12 shows that the process parameters have a significant impact on the prediction accuracy of the CNN-LSTM model, with X_44 (rotating cup speed) having the most pronounced effect. This indicates that the process parameters, especially some critical ones, have a large impact on the yarn quality.Figure 12
MSE values of four input process parameter index schemes.


## 4.2.5. Selection of LSTM Hidden Layer Node Number

The number of LSTM hidden layer nodes cannot be less than the eigenvalue of the input LSTM layer, that is, 16 nodes. Add one hidden layer node at a time until the end of 19 nodes. Four experimental schemes are designed, as shown in Table9.Table 9
:Four LSTM hidden layer node schemes.
Scheme numberLSTM hidden layer node numberO-116O-217O-318O-419As shown in Figure13, 16 nodes, 17 nodes, 18 nodes, and 19 nodes are set for LSTM according to experience. When set to 19 nodes, the MSE value decreases slightly. Considering that 19 nodes are larger than 16 nodes in calculation amount and time, 16 nodes are selected in this neural network model.Figure 13
MSE diagram of four LSTM hidden layer node schemes.


## 4.2.6. Influence of LSTM Layer Number on Model

The design idea of LSTM layers is to increase the number of LSTM layers under the condition of 16 nodes in each layer and observe the influence on the model accuracy. A total of three schemes are designed as shown in Table10.Table 10
Three LSTM layer design schemes.
Scheme NO.LSTM layersP-11 layerP-22 layerP-3Layer 3As shown in Figure14, when predicting yarn strength, one layer of LSTM, two layers of LSTM, and three layers of LSTM were used, and the MSE value decreased only slightly. From the point of view of reducing computation, computing time, and saving resources, this model chooses one-layer LSTM [20–22].Figure 14
Relationship between LSTM layer number and MSE diagram.


## 4.2.7. Influence of Optimization Algorithm on Model

CNN-LSTM model is special, and the gradient descent optimization algorithm with fixed learning rate is not ideal, and it needs Adam algorithm, that is, adaptive learning rate to optimize. The following four optimization algorithms are selected for comparative study, which are SGD, Adagrad, Momentum, and Adam optimization algorithms. These four optimal algorithms have their own characteristics, SGD (Stochastic Gradient Descent) trains for large samples; Adagrad (Adaptive Gradient Algorithm) is an improvement of SGD to improve its robustness; Momentum is also an improvement on SGD, which can accelerate the convergence of SGD and has a strong inhibition on convergence oscillation; Adam (Adaptive Moment Estimation) only needs to give an initial learning rate, and can adapt the learning rate according to the situation in the training process [23, 24].As shown in Figure15, four optimization algorithms are used for experiments; when Adam optimization algorithm is used, the MSE value of yarn strength reaches the lowest, that is, the prediction accuracy reaches the highest. The reason is that CNN-LSTM model cannot be trained with a fixed learning rate, and it needs to adjust the learning rate according to the training situation; Adam just meets this requirement and can automatically adjust the learning rate. To sum up, Adam optimization algorithm is the best optimization algorithm for CNN-LSTM model.Figure 15
Relationship between optimization algorithm and MSE.


## 5. Conclusions

The method mentioned in the literature can clearly determine the relationship between the input fiber, the original eigenvalue of the process, and the final yarn quality, but the prediction accuracy is low. Because spinning is a complex process, it is difficult to express the relationship between the original characteristic value of fiber and process and the final yarn quality with a definite formula according to human thinking habits.This paper aims to improve the accuracy of yarn quality prediction. From the perspective of processing time sequence, CNN-LSTM deep neural network model based on time sequence is designed. The following conclusions can be drawn through experiments:(1)
Compared with the traditional yarn prediction method, CNN-LSTM has higher prediction correctness(2)
The production process and its parameters have a great influence on the prediction correctness(3)
Different optimization algorithms have great influence on the model



---

*Source: 3955047-2022-08-08.xml*