# Modeling and Multi-Objective Optimization Design of High-Speed on/off Valve System
## 3 Construction of the BPNN Model  
BPNN is a multilayer feedforward neural network model known for its robust non-linear mapping and adaptive capabilities [28]. Its simple principles and structure make it particularly suitable for small datasets, minimizing the risk of overfitting. Accordingly, in this study, BPNN is employed to effectively capture the non-linear relationship between the structural parameters and performance of HSV. The BPNN structure consists of an input layer, hidden layers, and an output layer, as illustrated in Figure 8. The input layer is composed of six neurons, corresponding to the six input structural parameters. In the output layer, there are two neurons representing the system's output flow and the current in the winding. The hidden layers are positioned between the input and output layers. To strike a balance between training accuracy and avoiding overfitting, two hidden layers are employed. The determination of the number of neurons in the hidden layers does not have a precise formula and is often achieved using the empirical Formula (10). In the formula, \(H\) denotes the number of neurons in the hidden layers, \(I\) signifies the number of neurons in the input layer, \(O\) represents the number of neurons in the output layer, and \(\alpha\) is a constant between 1 and 10. Activation functions are utilized to establish connections between layers, which introduce non-linear factors and augment the expressive capability of the neural network. \[H=\sqrt{I+O}+\alpha \tag{10}\]  
Figure 8: Schematic diagram of BPNN structure. Figure 7: Experimented coil current for validation of the valve model. The main characteristic of BPNN is its ability to propagate signals in a forward direction and errors in a backward direction. It is a supervised learning method that relies on a training sample set with known target outputs. In the training process, the network's weights and thresholds are initially set to random values. The signal first enters the input layer, followed by the hidden layer, and finally reaches the output layer. If the predicted values from the output layer do not match the expected outputs, error propagation occurs. The weights and thresholds of the neural network are adjusted layer by layer using the gradient descent method. As depicted in Figure 9, this adjustment process is iterative, continuing until the network's predicted values approximate the target values and the error no longer decreases, signifying the completion of network training. Mean square error (MSE) is the most commonly used error in regression loss functions. It is the sum of the squares of the difference between the predicted value and the target value, and its formula is as follows:  
\[MSE=\frac{\sum\limits_{i=1}^{n}\left(y_{i}-y_{i}^{p}\right)^{2}}{n} \tag{11}\]  
After a comprehensive evaluation of training time and prediction accuracy through trial and error, the neural network structure is determined to be 6-12-10-2. The tansig activation function is selected for the input layer, hidden layers, and between hidden layers, while the purelin activation function is chosen between the hidden layer and the output layer. The BPNN is trained using the Levenberg-Marquardt (L-M) method, known for its fast convergence speed and low mean square error, making it suitable for training small- to medium-sized neural networks. The specific training parameters are set as follows: the learning rate is 0.0001, the maximum number of iterations is 2000, and the minimum error target for training is 0.001. The model's accuracy is measured by the root mean square error (RMSE) and the coefficient of determination (\(R^{2}\)), calculated using Equations (12) and (13), respectively. In these equations, \(y_{i}\) and \(\hat{y}_{i}\) represent the target and predicted values of the \(i\)-th testing sample, and \(\overline{y}_{i}\) is the mean target value of the testing samples. Data normalization is performed prior to each training and testing phase, and denormalization  
Figure 9: Training error of the network.