# Model Predictive Control Algorithm for Converter Based on a Convolutional Neural Network
## 2 Neural Network Controller for Converters and Model Switching Strategy  
### Neural Network Controller for Converters  
To solve the conflict between the algorithm design and the computational burden in the converter in FCSMPC, this article employs a BP neural network to approximate the control characteristics of FCSMPC algorithms, thereby establishing a neural network-based converter FCSMPC algorithm. The proposed neural network controller architecture, as shown in Figure 1, includes two stages: offline training and online control. During the offline training phase, for the designed FCSMPC algorithms, the sample data are obtained through simulation, including the converter system-state variables and control variables output by the algorithms. This dataset is used to train a BP neural network, resulting in a neural network controller that characterizes the control behavior of the algorithms through offline training. During the online control phase, the trained BP neural network calculates the required control variables through the sampled values of system states to achieve online control of the converter. The neural network structures in both the offline training and online control phases remain identical, while the model parameters can be updated according to the training results. This article takes the two-level three-phase voltage source inverter (2L-VSI) with LC filters shown in Figure 2 as an example to construct a neural network controller for converters based on the FCSMPC algorithm[38]. This three-phase inverter is mainly used in UPS power supplies or train auxiliary power supplies. In Figure 2, the 2L-VSI system-state variables include the load current \(i_{o}\), output voltage \(v_{o}\), inductor current \(i_{s}\), and output voltage control error \(dv_{o}\). The acquired three-phase state signals undergo coordinate transformation to obtain vectors in the \(a\)-\(\beta\) coordinate system. The specific transformation process is as follows:  
\[x=x_{r}+jx_{i}=\frac{2}{3} \begin{bmatrix}1&\alpha&\alpha^{2}\end{bmatrix} \cdot \begin{bmatrix}x_{A}\\ x_{B}\\ x_{C}\end{bmatrix}  \tag{1}\]  
Figure 1: Neural network controller architecture for converters. where \(x_{r}\) and \(x_{i}\) are the real and imaginary parts of the state variable \(x\) after coordinate transformation, and \(x_{A}\), \(x_{B}\), and \(x_{C}\) are the A-B-C three phase components of the state variable \(x\). The operator \(\alpha=\exp(j\cdot 2\pi/3)\). For the 2L-VSI, the system-state variables at moment \(t_{k}\) obtained through sampling and coordinate transformation are the real and imaginary components of the load current, \(i_{or}(k)\) and \(i_{oi}(k)\); real and imaginary components of the output voltage, \(v_{or}(k)\) and \(v_{oi}(k)\); real and imaginary components of the inductor current, \(i_{sr}(k)\) and \(i_{si}(k)\); and real and imaginary components of the output voltage control error, \(dv_{or}(k)\) and \(dv_{oi}(k)\). Aimed at the output voltage tracking control problem of the inverter, the tracking control error of the system is designed as  
\[f=(v_{refr}-v_{or})^{2}+(v_{refi}-v_{oi})^{2} \tag{2}\]  
where \(v_{ref}=v_{refi}+jv_{refi}\) is the reference value of the output voltage. In the neural network controller for converters based on the FCSMPC algorithm, the control performance of the system depends on the adopted neural network controller. When the load type of the converter changes, the currently active neural network controller becomes unsuitable, leading to control performance degradation or even dispersion. As shown in Figure 3, the neural network controller trained under no-load mode is first used to control the 2L-VSI. When a load is connected to the system at \(t=1\) s, the tracking control error value calculated by Equation (2) exhibits significant growth with oscillations, indicating that the control of the inverter output voltage has diverged. This demonstrates that the neural network trained under no-load mode is not applicable to the operating conditions with load.