# Model Predictive Control Algorithm for Converter Based on a Convolutional Neural Network
## 4 Simulation Experiment and Analysis  
### Comparative Analysis of Load-Type Identification  
In order to analyze the performance of CNN load-type identification, this article conducts comparative experiments on load-type identification among the CNN, BP, and long short-term memory neural network (LSTM). BP adopts a three-layer fully connected structure comprising an input layer with four neurons, a single hidden layer with six neurons, and the ReLU function as the output layer activation function, with Softmax normalization applied. The model is configured with an initial learning rate of 0.001 and uses the cross-entropy loss function. LSTM consists of six layers: an input layer (four features), an LSTM layer, a ReLU activation layer, a fully connected layer, a classification layer, and an output layer, configured with an initial learning rate of 0.01. All models are trained under identical experimental conditions using the same 600,000 data split in a 4:1 ratio between the training and test sets. The confusion matrix results of BP and LSTM are shown in Figure 9. In Figure 9a, BP achieves identification accuracy exceeding 99% for both HPFRIL and LPFRIL. However, it exhibits significant confusion rates (26.2%) for NL and NLL. The primary cause may be BP's fully connected structure, which induces parameter redundancy and lacks local feature extraction capability, resulting in inefficient modeling of high-dimensional  
Figure 8: Confusion matrix of test data.  
Figure 7: The curves of accuracy and loss function changes during the training process.  
temporal data. These result in 78.7% identification accuracy for NL, only 56.8% for NLL, and an overall identification accuracy of 83.8%.  
Compared to BP, LSTM's gate control mechanism enhances performance by modeling long-term dependencies through selective memory and forgetting, demonstrating faster convergence during training and better generalization capability. In Figure 9b, it achieves improvements of 14.7% for NL identification accuracy, 17.6% for NLL identification accuracy, and overall identification accuracy of 91.9%. However, LSTM's higher computational complexity results in a long training duration, eventually constraining its performance improvement.  
A comparative result of identification accuracy across the three models for different load types is presented in Table 3. The CNN shows significant improvements in accuracy for all load types. The accuracy and loss function variation curves during the training process for the three models are illustrated in Figure 10a,b. BP shows significantly slower convergence speed with obvious loss function oscillations, while LSTM shows smoother curves, smaller fluctuations, but slow convergence and limitations in the computational efficiency. In contrast, the CNN achieves faster convergence, overall smoother curves, and a stable training process with higher accuracy, and stays ahead in the subsequent training process. A comparison of the results of the comprehensive performance indicators is shown in Table 4. Compared to BP, the CNN achieves enhancements of 12.64% in accuracy, 13.16% in precision, 12.61% in recall, and 13.24% in F1-score. Compared to LSTM, the CNN achieves enhancements of 4.49% in accuracy, 4.01% in precision, 4.52% in recall, 4.63% in F1-score, and reduces computation time by 3.686 milliseconds. These experimental results confirm that the CNN combines high accuracy and low latency, with generalization capabilities significantly better than the compared models.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **NL** & **HPRFIL** & **LPFRIL** & **NLL** \\ \hline BP & 78.7\% & 99.9\% & 100\% & 56.8\% \\ LSTM & 93.4\% & 99.9\% & 100\% & 74.4\% \\ CNN & 95.5\% & 100\% & 100\% & 90.3\% \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of identification accuracy of different models.  
Figure 9: Confusion matrices for the classification of contrasting methods. (**a**) BP-based classification method. (**b**) LSTM-based classification method.