In the driving principle of the DC motor test bench, in order to make the motor operate, the position of the motor rotor must first be detected through the Hall sensor. Then, according to the direction of the stator winding, the power transistors (AH, BH, CH) and AL, BL, CL (i.e. lower arm power transistors) in the converter are determined, so that the current flows through the motor coil in sequence, in a forward (or reverse) direction, and interacts with the magnet of the rotor to achieve forward/reverse rotation of the motor. When the motor rotor rotates to the Hall sensor and detects another set of signals, the controller will turn on the next set of power transistors. This way, the cycling motor can rotate in the same direction until the controller determines that the motor rotor has stopped, and the power transistors (or only the power transistors in the lower branch) will be turned on. If the motor rotor reverses, the order of turning on the power transistors will be reversed.
Basically, the switching methods of power transistors can be: AH, BL, AH, CL, BH, AL, BH, AL, CH, AL, CH, AL, CH, BL, BH, BL, etc. However, they cannot be switched to AH, AL, BH, BL, CH, CL. In addition, since electronic components always have a switch response time, the response time of the components must be taken into account during the disconnection and disconnection process. Otherwise, when the upper arm (or lower arm) is not fully closed, the lower arm (or upper arm) will short circuit and burn out the power transistor.
When the motor starts to rotate, the controller will compare the speed and acceleration/deceleration rate instructions (instructions) set by the drive device with the speed changed by the Hall sensor signal (or through software operation), and then determine the next group (AH, BL or AH, CL or BH, CL, or...) and the length of the on-time. If the speed is insufficient, it will become longer, and if it exceeds its speed, it will become shorter, which is left to PWM. PWM is the main factor determining the speed of an electric motor, and how to achieve PWM is the key to achieving more accurate speed control.
The high-speed control must consider whether the CLOCK resolution of the system is sufficient to grasp the processing time of software instructions. In addition, the data access method for hall sensor signal changes also affects processor performance, judgment accuracy, and real-time performance. As for low-speed speed control, especially low-speed starting, the changes in the hall sensor signal returned become slower. It is very important to extract the signal, process it at the right time, and configure the control parameter values appropriately according to the characteristics of the motor. Alternatively, the speed feedback can be adjusted based on the encoder changes to increase the signal resolution for better control.
The DC motor test bench can operate smoothly and respond well, and the appropriateness of P.I.D. control cannot be ignored. As mentioned earlier, the brushless DC motor is a closed-loop control, so the feedback signal is equivalent to telling the control department how much the motor speed is still different from the target speed, which is the error. Knowing the error naturally requires compensation, which can be achieved through traditional engineering controls such as P.I.D. control. However, the state and environment of control are actually complex and ever-changing. To achieve robust and durable control, factors that need to be considered may not be fully mastered by traditional engineering control. Therefore, fuzzy control, expert systems, and neural networks will also be included as important theories for intelligent P.I.D. control.

