Industrial processes require precise regulation of the speed of the drive motors. To achieve this objective, a control based on electronic semiconductor variators was used for the DC motors. This technique consisted of varying the speed in proportion to the voltage. Due to the complexity of maintaining DC motors, recent applications rarely use this system. Thanks to advances in electronics, the development of brushless motors is booming in many fields of application and for powers up to a few tens of kilowatts. These permanent magnet synchronous type motors eliminate the drawbacks associated with the collector of direct current motors, and their performance surpasses that of asynchronous motors .
In many industrial applications of BLDCs, it is essential to know certain physical parameters (speed, torque, position, current, etc.) for proper speed regulation. For this, it is therefore necessary to have recourse to a PID type control, fuzzy, variable speed drive... Through the existing research work in the literature, the PID control is probably the most widely used in industrial control direct current motors . At the same time, the fuzzy logic control is a non-linear control having robustness properties. It is very interesting to explore its potential for controlling the brushless DC machine . The main objective of this work is to compare the PID control to the fuzzy control for driving the brushless DC machine and thus determine the most robust control. The work presented in this article is structured as follows: the first part presents the operating principle of the BLDC, the second part presents the modelling of the machine and the last part presents the results obtained after a simulation on MATLAB Simulink and the discussions.
2. Principle of Operation of Brushless Motors
The brushless motor works from three variable voltage sources, supplied by an inverter, and allowing to generate a rotating magnetic field. The rotor, generally equipped with a permanent magnet, tends to follow the rotating magnetic field. Figure 1 shows the architecture of the motor and its inverter.
In the simple case of the BLDC motor, at each switching, two phases are respectively connected to the supply voltage and to the ground, and one phase is not connected. Let us take the example of Figure 2, phase A is not connected, phase B is connected to the supply voltage and phase C is connected to ground.
Figure 1. Operation of the inverter and brushless motor.
Figure 2. Example of switching situation.
A current flows through the coils from B to C and generates a stator magnetic fiel in the next steered motor . The rotor supports a magnet whose magnetic moment , oriented from south to north, tends to align with the stator magnetic field by rotating counter clockwise.
As soon as the rotor approaches , the commutation will be modified to make the current flow from B to A, the stator magnetic field rotates by π/6, so as to attract the rotor and continue the rotation in the counter clockwise direction. The angle between and leads to a magnetic torque .
The modeling of a BLDC motor can be developed in the same way as a three-phase synchronous machine. As its rotor is mounted with a permanent magnet, these dynamic characteristics remain different. The flux due to its rotor depends on the magnet, which is why the saturation of the magnetic flux is typical for these motors. A BLDC motor is powered by a three-phase voltage source, as shown in Figure 1. The source does not need to be sinusoidal. A square wave or other waveform can be applied as long as the peak voltage is less than the maximum voltage of the motor. Likewise, the armature winding scheme of the BLDC motor is represented in Figure 3  .
3.1. Electrical Equations
3.1.1. Expressions of the Voltages
By applying the mesh law to the BLDC, we obtain the following system 
Figure 3. BLDC’s motor supplied by a three-phase voltage source.
With R, L and ( and ) are respectively: the resistor, inductance and currents of stator’s phase.
, the electromotive force of phase A (4)
, the electromotive force of phase B (5)
, the electromotive force of phase C (6)
Ke: is the coefficient of force electromotive; , and : are the functions whom depend only on the position of the rotor; : is the rotation speed : is the electrical angle which is calculated as follows with p the number of pole.
The Writing voltage’s matrix is written:
By applying the transform of Laplace we get:
The Equations (1)-(3) allow determining the voltage’s expressions between phases:
(6) and (7) give: (11)
3.1.2. Expressions of the Currents
We get the expression of the currents below from Equations (9)-(11)
3.1.3. The Electromagnetic Torque
The electric torque generated by the BLDC is given like this:
By replacing the Equations (4)-(6) within (15) we have:
3.2. Mechanical Equation
The dynamics of the rotor is defined as see:
3.3. Model of Hall Effect Sensors
When the rotor poles pass next to the hall effect sensors, the latter give 1 or 0
Table 1. Hall effect sensor model.
only to indicate that the north or south pole is seen by the sensors. Based on this switching logic of the hall effect sensors, we have the switching sequence of the transistors according to Table 1 .
3.4. The Inverter Model
The inverter is a static converter able to transform the electrical energy from a DC voltage source into AC, the use of inverters is very wide in industry, such as variable speed drives for three-phase motors, emergency power supplies, etc.
By the technological development of semiconductors, and the appearance of new control techniques, inverters have become more efficient. On the other hand, the output voltage form of an inverter must be closer to a sinusoid for which the harmonic rate is as low as possible, the latter largely depends on the control technique used . We can see in Figure 4 the three-phase inverter model.
The switches Q1 and Q2, Q3 and Q4, Q5 and Q6 must be complementary whatever the control law that is adopted. And whatever the currents, the switches give the voltages between the output terminals A, B, C and the (fictitious) midpoint “O” of the voltage source .
The equilibrium of the system entails:
Figure 4. Inverter.
According to the circuit in the figure below, the three-phase voltages can be calculated using the following formulas
3.5. BLDC Transfer Function
Considering a motor winding seen in Figure 5, we can write the following relations
The transfer function is finally written:
The following constants are acquired:
· Electric constant
· Mechanical constant
In the BLDC motor, it has 3 phases, i.e. the mechanical and electrical constants are written like this: and
Therefore, the transfer function of the BLDC motor can right now be obtained as the following equations:
With the engine parameters we have
Figure 5. Model of phase.
4. Comparative Study and Simulation
4.1. Simulation with the PID Regulator
Figure 6 shows the model of the closed loop PID regulator from this model the equation below is drawn
Figure 6. Closed loop PID controller.
Figure 7. Rate of speed.
Figure 8. Rate of electromagnetic torque.
controller. When starting, the speed reaches the imposed value with a response time Trep = 0.029 seconds and an overshoot of 5.85%, at the moment 0.06 seconds, the speed decreases towards the set point (2000 rpm) that it attends to the after 0.351 seconds then it perfectly follows the imposed instruction.
The application of a torque of 1 Nm implies a disturbance of 15% at the instant 2 seconds which corresponds to a speed of 1699 rpm; then returns to the set point after 2.43 seconds.
4.2. Simulation with Fuzzy Logic
Fuzzy logic is widely used in machines for control purposes. The term fuzzy designates the logic which deals with the concept which expresses that the value is true or false. Fuzzy logic has many advantages as it gives a solution to a problem in such a way that a human operator can easily understand it and can use it to design a better controller. The design of such a controller makes the process faster and it has become easy to implement it in the system   .
The internal structure of this fuzzy regulator is shown in the following functional diagram of Figure 9.
The rules used are:
1) IF E is GN and de is GN THEN control is GN
2) IF E is MN and de is MN THEN control is GN
The fuzzy rules are built manually in Table 2.
Figure 9. Synoptic overview of a fuzzy system.
Table 2. Table of fuzzy rules.
Z: zero, MP: positive mean and GP: large positive.
The diagram below (Figure 10) shows the Simulink model of BLDC motor control with fuzzy logic.
Figure 11 and Figure 12 show the results of simulation obtained with the fuzzy logic. When starting, the speed reaches the imposed value with a response time Trep = 0.0051 seconds and an overshoot of 0%, and it perfectly follows the imposed set point (2000 rpm). The application of a torque of 1 Nm implies a disturbance of 15% at the instant 2 seconds which corresponds to a speed of 2020 R/s; then returns to the set point after 2.4 seconds.
Comparison of the two commands
Below (Figure 13) are the speed curves for the two types of control. By observing the results of these curves, we see that the behavior of the two regulators is identical during permanent modes, but the Flou regulator has a clear advantage:
Figure 10. BLDC model with the BLUR command.
Figure 11. Pace of speed.
Figure 12. Pace of torque.
Figure 13. Speed response.
-Better climb time.
-A quick response without overspending.
-The disturbance peaks are much less important with the Flou regulator.
In this study, the PID regulation method and the Fuzzy logic regulation method were applied to a brushless DC motor. This is in order to compare the robustness of these two types of control. After study and simulation on Matlab/Simulink, we obtained very satisfactory results. These show that the fuzzy regulator gives better responses compared to the PID regulator, namely a shorter rise time, no overshoot. Despite its performance, the fuzzy regulator is still little used in industry compared to the PID regulator; this is due to the problems associated with its implementation.
However, it is worth highlighting the perspectives that remain open by studying the system, namely, pushing further reflection on the implementation of these two regulators on the same microcontroller or an Arduino Board.
 Laroussi, K. and Zelmat, M. (2009) Implementation of a Fuzzy Logic System to Tune a PI Controller Applied to an Induction Motor. Advances in Electrical and Computer Engineering, 9, 107-113.
 Eltoum, M.A.M., Hussein, A. and Abido, M.A. (2021) Hybrid Fuzzy Fractional-Order PID-Based Speed Control for Brushless DC Motor. Arabian Journal for Science and Engineering, 46, 9423-9435.
 Cheng, G.Q. (2012) Brushless DC Motor Speed Control System Based on Fuzzy PID Controller. 2nd International Conference on Network Computing and Information Security (NCIS 2012), Shanghai, 7-9 December 2012, 287-294.
 Obulesh, Y., Ch, S.B. and Rao, A. (2012) Mathematical Modeling of BLDC Motor with Closed Loop Speed Control Using PID Controller under Various Loading Conditions. Journal of Engineering and Applied Sciences, 7, 1321-1328.
 Jing, J.L., Wang, Y.C. and Huang, Y.H. (2016) The Fuzzy-PID Control of Brushless DC Motor. 2016 IEEE International Conference on Mechatronics and Automation, Harbin, 1 August 2016, 1440-1444.
 Huang, J.G., Jie, W. and Hui, F. (2017) An Anti-Windup Self-Tuning Fuzzy PID Controller For Speed Control of Brushless DC Motor. Automatika, 58, 321-335.