# Fractional Order PI-Based Control Applied to the Traction System of an Electric Vehicle (EV)
## 3 Direct Torque Control (DTC)
### Sector Location  
The torque reference regulating the magnitude and rotation of the stator flux is used to adjust the motor torque. Depending on the position of the stator flux space vector, the DTC defines six operating sectors. Once the angle and magnitude of the stator flux space vector are known, the DTC method needs to know the sector where the flux vector is located, which corresponds to one of the six sectors into which the stationary plane \(d_{q}\) is divided. Any of these six control areas has a width of \(\frac{\pi}{3}\), these are given by (15).  
\[\frac{(2n-3)\pi}{6}\leq sector(n)\leq\frac{(2n-1)\pi}{6}, \tag{15}\]  
where \(n\) is the number of sector, ranging from 1 to 6.  
Once \(\Delta\Psi_{s}\) is known the sector can be calculated by using Figure 4. The sector provides information about the location of the voltage space vector of the inverter to place the voltage space vector of the inverter to control the flux and torque.  
The error \(\Delta\Psi_{s}\) is processed by a two levels block of hysteresis, with a lower boundary defined by \(\text{HV}_{s}-\) and an upper boundary defined by \(\text{HV}_{s}+\). The band of the hysteresis controller is limited by two levels as shown in Figure 5, \(H\Psi_{s}=(\Psi_{s}+)+(\Psi_{s}-)\). The stator flux is maintained within the hysteresis limits, these limits define the hysteresis band. The narrowness of this band determines how close the stator flux will be to the reference.  
Figure 4: Voltage vectors and sectors definition.  
Figure 5: Two-level hysteresis controller.  
The error \(\Delta T_{e}\), resulting of subtracting the estimated from the reference torque, is managed by a hysteresis block of three-level, with the following error limits: \(HT_{e}-\) and \(HT_{e}+\). The loop of hysteresis \(HT_{e}=(HT_{e}+)+(HT_{e}-)\) is shown in Figure 6. The purpose of the table for optimal switching is to deliver eight voltage vectors that regulate the amplitude and frequency of the inverter voltages supplying the motor (see Table 1).  
By adjusting the amplitude and frequency, the torque and flux in the motor are controlled. Taking the state of flux and torque as a basis, Table 2 shows the voltage vectors for each sector.  
\begin{table}
\begin{tabular}{c c c c} \hline
**VSI State** & \(S_{a}\) & \(S_{b}\) & \(S_{c}\) \\ \hline V1 & 1 & 0 & 0 \\ V2 & 1 & 1 & 0 \\ V3 & 0 & 1 & 0 \\ V4 & 0 & 1 & 1 \\ V5 & 0 & 0 & 1 \\ V6 & 1 & 0 & 1 \\ V7 & 1 & 1 & 1 \\ V8 & 0 & 0 & 0 \\ \hline \end{tabular}
\end{table}
Table 1: Possible states of the inverter.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**CV\({}_{s}\)**CTE\({}_{s}\)**AT\({}_{s}\)** & \(\Delta\)**Y\({}_{s}\)** & \(\Delta\)**Y\({}_{s}\)** & \(\Delta\)**Y\({}_{s}\)** & \(\Delta\)**Y\({}_{s}\)** & \(\Delta\)**Y\({}_{s}\)** & \(\Delta\)**Y\({}_{s}\)** \\  & & **(1)** & **(2)** & **(3)** & **(4)** & **(5)** & **(6)** \\ \hline \multirow{3}{*}{\(\text{CV}_{s}=1\)} & CTE = 1 & V2 & V3 & V4 & V5 & V6 & V1 \\  & CTE = 0 & V7 & V8 & V7 & V8 & V7 & V8 \\  & CTE = \(-1\) & V6 & V1 & V2 & V3 & V4 & V5 \\ \hline \multirow{3}{*}{\(\text{CV}_{s}=0\)} & CTE = 1 & V3 & V4 & V5 & V6 & V1 & V2 \\  & CTE = \(-1\) & V5 & V6 & V1 & V2 & V3 & V4 \\ \hline \end{tabular}
\end{table}
Table 2: DTC logic switching table.  
Figure 6: Three-level hysteresis controller.  
To control the switching state of the inverter, the DTC uses the eight voltage vectors defined in Table 1.  
The rapid response of the DCT generates high currents that may activate the inverter protections. To cope with this inconvenience the stator currents are monitored to generate a closed-loop which handles the switching table sending a vector 0 whenever the current vector is over the allowed limit.