## 3 Proposed M\({}^{2}\)PC Based-ANN for the 2L-VSI
### Description of the Implemented ANN Network  
In this work, the implemented ANN network is the radial bias function, which has a structure of three layers as one input layer, one hidden layer, and one output layer. The RBF-ANN has simple design, immunity to input noise, and good generalization. These properties allow it to be used for designing flexible control systems.The RBF is utilized as an approximation function to define the active vectors' duty-cycle, and therefore the zero vector duty-cycle can be calculated as well. As shown in Figure 4, the input layer gets the cost function for both active vectors that make up the optimum sector, as well as the cost function for the zero vector. These input features are generated from the conventional algorithm of the modulated MPC at every sampling time. The input layer distributes the network inputs into the next hidden layer. The neurons in the hidden layer, that is, \(x_{i}\) are characterized by the Gaussian nonlinear function as in (24). \[b_{j}(x_{i})=exp\bigg{(}-\frac{\parallel x_{i}-\mu_{j}\parallel}{2\sigma_{j} ^{2}}\bigg{)}\;\;for\;\;j=1,2,\ldots,q \tag{24}\]  
where \(q\) is the number of neurons in the hidden layer, and \(\mu_{j}\), \(\sigma_{i}\), and \(b_{j}\) are the centroid, spread width, and the response of the \(j\)th hidden neuron, respectively. The output layer combines Gaussian functions, which are weighted by weighting factors for each activation function for neurons, as in (25). Figure 4: Proposed M\({}^{2}\)PC based on the ANN to estimate the duty-cycle of each vector in the next sampling period. Figure 3: General overview of the ANN structure comprising different layers. \[Y=\sum_{j=1}^{q}W_{j}b_{j}(x_{i}) \tag{25}\]  
where \(Y\) is the output of the RBF-ANN, \(b_{j}(x_{i})\) is the output of the \(j\)th neuron in the hidden layer, and \(W_{j}\) is the weight between the \(j\)th neuron in the hidden layer and the node in the output layer. The dataset for RBF-ANN is selected randomly from different simulation scenarios. Different uncertainties in the following parameters are considered to collect the dataset: filter inductance and capacitance, load impedance, reference output voltage, and sampling interval as listed in Table 1. The total number of raw datasets equals 5000 raws. To ensure that neuron bases may respond to overlapping regions in a search area, the design for each neuron's propagation (\(\sigma_{i}\)) should have a high value, keeping in mind that the threshold for neurons to react in an equal manner is not too high [30]. In the current case study, it is selected at 25, and the target goal of the RBF-ANN objective function has been achieved after 16 epochs, as shown in Figure 5.  
Following the well training phase of the RBF-ANN network, the testing phase will begin to assess the trained network's effectiveness on unknown data before merging it into the online Simulink model. The performance of the RBF-ANN network during testing with random (i.e., unseen) data is shown in Figure 6. The trained RBF-ANN will be incorporated into the FCS-MPC as shown in the flowchart in Figure 7. It is important to mention that when the sixth sector is being evaluated (i.e., \(i=6\)), the voltage of the second vector in this sector should be computed as the first vector (i.e., similar to lines 7-10 in Algorithm 1). In addition, it is worth noting that when the sector of the optimal two active vectors is odd (that is, 1, 3, or 5), the switching pattern in Figure 8a should be applied to keep the switching frequency constant for one sample period. When the selected sector is even (that is, 2, 4, or 6), the switching pattern in Figure 8b should be used to establish the switching frequency. In this way, the commutation of the 2L-VSI switches will be fixed within a single sampling interval, and thus the fixed-switching operation can be achieved. Additionally, the RBF-ANN network is updated at every sampling interval with the new cost function of the active vectors and zero vector. Based on these values, new duty-cycle values will be