# Virtual Flux Control Methods for Grid-Forming Converters: A Four-Method Comparison
## 3 Control Schemes
### Direct Control  
During the design of the original control scheme [57], the direct relationship between the converter's internal voltage and its virtual flux was established as  
\[\vec{e}=j\omega\vec{\psi}_{v} \tag{21}\]  
This relationship allows active and reactive power regulation through virtual flux control. Leveraging this direct relationship, a direct control approach can be implemented for the main control loops, theoretically improving system dynamics under fast transients. The proposed direct control scheme is illustrated in Figure 4, where two hysteresis controllers and a control logic unit replace the PI regulators from the VFOC scheme. This control method determines the optimal switching pattern for the IGBTs and the duration for which each switching state should be applied, ensuring that the virtual flux follows its reference values as closely as possible.  
The outputs of the two hysteresis regulators are denoted as \(x_{d}\) and \(x_{q}\), where their values depend on the number of levels in the respective hysteresis controllers. For the \(d\)-component of the flux, a two-level regulator is selected, meaning that \(x_{d}\) can take values of either \(1\) or \(-1\). In contrast, the \(q\)-component is regulated using a three-level hysteresis controller, allowing \(x_{q}\) to take values of \(1\), \(0\), or \(-1\). A three-level regulator is chosen for the \(q\)-component because precise control of this variable is essential for ensuring proper synchronization between the converter and the grid. The values of \(x_{d}\) and \(x_{q}\) depend on the measured error in each flux component, \(\Delta\psi_{dv}\) and \(\Delta\psi_{qv}\), the hysteresis bandwidth, and the position within the hysteresis cycle. In the experimental tests conducted in this study, the bandwidth for both hysteresis controllers was set to \(0.01\) p.u.  
Figure 4: Direct control scheme.  
Figure 3: Flatness-based control scheme.  
To determine the switching pattern applied to the converter, a control logic based on twelve sectors and eight possible switching vectors has been implemented, as shown in Figure 5. These eight switching vectors are numbered 0 to 7 and are depicted in blue in Figure 5. Each vector has associated with it a possible combination for the IGBTSs defined as \(\vec{V}_{x}=(S_{a},S_{b},S_{c})\) with \(S_{a}\), \(S_{b}\), \(S_{c}\) being the state of the converter's upper IGBTs corresponding to phase \(a,b,c\), respectively. For the lower switches of each phase, the negated state of the upper switch is used \(\overline{S}_{a}\), \(\overline{S}_{b}\), \(\overline{S}_{c}\). Finally, the vectors \(\vec{V}_{0}\) and \(\vec{V}_{7}\) are known as null vectors, and the choice of using one or the other is made on the basis of the one that requires the minimum switching state variations to reduce the number of commutations and average switching frequency.  
An example of direct control operation is illustrated in Figure 5, where the virtual flux vector \(\vec{\psi}_{v}\) reaches a new value \(\vec{\psi}_{v}\), \({}^{\prime}\) after applying a voltage vector \(\vec{V}_{2}\) for a duration \(\Delta t\).  
Furthermore, to select the appropriate voltage vector to be applied, a decision must be made regarding whether to prioritize the error in \(\Delta\psi_{dv}\) or \(\Delta\psi_{qv}\). In the developed control algorithm, the component with the larger error is given higher priority. Based on these conditions, the switching logic for direct control is summarized in Table 2.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Output**} & \multicolumn{10}{c}{**Sector**} \\ \hline \(\mathbf{x_{d}}\) & \(\mathbf{x_{q}}\) & **Error** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** & **10** & **11** & **12** \\ \hline \multirow{3}{*}{1} & \multirow{3}{*}{1} & \multirow{3}{*}{0} & \(\Delta\psi_{q}>\Delta\psi_{q}\) & \(\vec{V}_{2}\) & \(\vec{V}_{3}\) & \(\vec{V}_{3}\) & \(\vec{V}_{4}\) & \(\vec{V}_{4}\) & \(\vec{V}_{5}\) & \(\vec{V}_{5}\) & \(\vec{V}_{6}\) & \(\vec{V