# DDC Control Techniques for Three-Phase BLDC Motor Position Control
## 2 System Modelling and Preliminaries
### General Theory of BLDC Motor
For Area 1:  
\[PWM_{B}=round\left(\frac{\tan(\theta_{e})PWM_{A}}{\sin\left(\frac{2}{3} \pi\right)-\cos\left(\frac{2}{3}\pi\right)tan(\theta_{e})}\right)0\leq\theta_ {e}\leq 60. \tag{2}\]  
For Area 2:  
\[PWM_{A}=round\Bigg{(}-\frac{\tan(\theta_{e})\cos\left(\frac{2}{3}\pi\right)PWM _{B}-\sin\left(\frac{2}{3}\pi\right)PWM_{B}}{\tan(\theta_{e})}\Bigg{)}60\leq \theta_{e}\leq 120. \tag{3}\]  
For Area 3:  
\[PWM_{C}=round\Bigg{(}\frac{\tan(\theta_{e})\cos\left(\frac{2}{3}\pi\right)PWM _{B}-\sin\left(\frac{2}{3}\pi\right)PWM_{B}}{\sin\left(\frac{4}{3}\pi\right) -\cos\left(\frac{4}{3}\pi\right)tan(\theta_{e})}\Bigg{)}120\leq\theta_{e}\leq 180. \tag{4}\]  
For Area 4:  
\[PWM_{B}=round\ \left(\frac{\tan(\theta_{e})\cos\left(\frac{4}{3}\pi\right)PWM _{C}-\sin\left(\frac{4}{3}\pi\right)PWM_{C}}{\sin\left(\frac{2}{3}\pi\right)- \cos\left(\frac{2}{3}\pi\right)tan(\theta_{e})}\right)180\leq\theta_{e}\leq 240. \tag{5}\]  
For Area 5:  
\[PWM_{A}=round\Bigg{(}\frac{\sin\left(\frac{4}{3}\pi\right)PWM_{C}-\tan( \theta_{e})\cos\left(\frac{4}{3}\pi\right)PWM_{C}}{\tan(\theta_{e})}\Bigg{)}2 40\leq\theta_{e}\leq 300. \tag{6}\]  
For Area 6:  
\[\theta_{\text{m},r}=\frac{2}{number\ of\ poles}\times\theta_{e,r} \tag{1}\]0 \begin{table}
\begin{tabular}{l c c c} \hline \hline  & \multicolumn{1}{c}{\(\mathbf{PWM_{A}}\) (PWM Value)} & \multicolumn{1}{c}{\(\mathbf{PWM_{B}}\) (PWM Value)} & \multicolumn{1}{c}{\(\mathbf{PWM_{C}}\) (PWM Value)} \\ \hline Area 1 & 255 & X & 0 \\ Area 2 & X & 255 & 0 \\ Area 3 & 0 & 255 & X \\ Area 4 & 0 & X & 255 \\ Area 5 & X & 0 & 255 \\ Area 6 & 255 & 0 & X \\ \hline \hline \end{tabular}
\end{table} 
Table 1: PWM values to determine the area of the vector in above Figure 3.  
Figure 3: Schematic of a brushless DC motor. In Equations (2)-(7), the electrical angle \(\theta_{e}\) can easily be replaced by the mechanical angle \(\theta_{m}\) by using formula \(\theta_{e}=\frac{\theta_{m}number\,of\,poles}{2}\). The description of the general theory of a brushless DC motor is now covered and can be used to model the actuator. Moreover, the equations will be used for the mathematical modeling process and position control of the brushless DC motor. The PWM converter is implemented using Equations (2)-(7) in a MATLAB function. The right equation is selected by using if else statements in MATLAB Programming, and the corresponding PWM values are determined. The input of the function is the controlled angle of the BLDC Motor, and the output is a vector containing the PWM values and the phase corresponding to these values. In Figure 4, the PWM converter subsystem is shown. The model of the DC motor is a bit more complicated, as can be seen in Figure 5. The PWM converter generates PWM signals for the motor to control the voltage provided to the BLDC motor. The PWM-based control of the voltage is done using the Controlled Voltage Source block in Simulink, with source type DC and initial amplitude zero volts. The input is the PWM value of the PWM converter, the minus side is connected to the ground, and the plus side is the output voltage, which is connected to the DC motor. In this research work, a Permanent Magnet Synchronous Machine (PMSM) is used as DC motor in Simulink. The configuration of the PMSM is standard with three phases, a trapezoidal back Electromotive Force (EMF) waveform, and speed as mechanical input. Since no parameters of the DC motor are known, the parameters of the PMSM are also standard and thus remain unchanged. In Figure 5, N and S shows the North (N) and South (S) pole respectively. Figure 4: The PWM converter subsystem in the Simulink model. Figure 5: The DC motor subsystem in the Simulink model.