The electric machines have been applied to the industrial and commercial areas for several decades. The high performance of control and fast dynamic response of electric machines can be achieved via motor drive because of high development of semiconductors such as the microcontroller and power transistors. Brushless DC motor (BLDC) and permanent magnet AC synchronous motors drives have many advantages such as high efficiency, small size, less rotor losses, and fast torque response over the induction motor drives. Therefore, this chapter will focus on the design and implementation of a motor drive as well as its realization of control algorithm. At the beginning of chapter, the fundamental of energy conversion for electric machines is introduced. The dynamic model for brushless dc motor is derived and explained in detail in section two. The 120° conduction and 180° conduction of switching device for an inverter are also described and illustrated. The control design of a speed-controlled motor drive is described in section three. The hardware and software design of a motor drive based on a microcontroller is given in section four. The experimental results are also presented and discussed. Finally, a conclusion is made in section five.
- brushless DC motor
- motor drive
- 120° conduction
The electrical machine is the bridge of energy conversion between the electrical system and mechanical system, as shown in Figure 1. The electrical machine can be an electric motor. For an electric motor, the input is electrical energy represented by voltage and current, and the output is mechanical energy delivered to the mechanical load, which is represented by speed and torque. On the contrary, the mechanical energy can be converted to electric energy and transferred to electrical system by electrical machine, which is called as electric generator.
A simplified block diagram of an electrical drive is shown in Figure 2. It mainly consists of power source, converter, motor, load, sensing module, and control module. Power source can be supplied by AC line supply or DC battery. Load can be washing machine, range hood, pumps, air conditioners, fans, machine tools, or electric drills. The motor has the characteristics required by the load and the capability to transfer the energy from the source to the load. Most commonly used electrical motors are DC motors, brushless DC motors, induction motors, permanent magnet synchronous motors, stepper motors, and switched reluctance motors. The converter converts the electrical energy of the input source in the form suitable to the motor. Depending on the energy from required by the input power source and motors, AC to DC converters (rectifiers or controlled rectifiers), DC to DC converters (step-up converters or step-down converters), inverters, and cycloconverters are commonly used in the electrical drives design [1, 2]. Sensing module is employed to detect rotor position, rotor speed, motor current, or motor terminal voltages. It is required for the closed-loop control. The control module is the core controller of the overall electrical drive. Due to the high development of power semiconductors, the control module such as microcontrollers, DSPs, ARMs, or FPGA are widely adopted according to the complexity functions for the motor drive requirements.
1.1. Torque equation
A motor generally drives a load through some transmission systems as shown in Figure 3. The energy keeps balance, which performs the operation of transmission. Hence, torque developed by motor is counter balanced by a load torque TL and a dynamic torque. The energy transferred from the motor to load is maintained constant. It can be expressed by the following torque equation :
Te is instantaneous value of developed motor torque, N m. ωm is instantaneous angular velocity of motor shaft, rad/s. J is inertia of motor-load system, kg m2 and TL is the instantaneous value of load torque, N m.
1.2. The conduction of switching device
In recent decade, because of the high developments of power electronics and advanced semiconductor devices, the adjustable speed drive such as brushless DC motor (BLDC) drives, has been well developed and widely employed to the industrial and commercial applications. A typical motor drive consisting of an AC/DC converter, LC DC link, and an inverter is shown in Figure 4. The AC/DC conversion of electric power converts AC input power source to the DC link voltage. The DC to AC conversion is known as inverter, which converts the DC power to AC power required by motor and is normally accomplished by pulse width modulation technique . The inverter may receive DC power from a battery but in most applications it is fed by a rectifier. The switching devices (Q1–Q6) can be BJTs, MOSFETs, IGBTs, GTOs, or thyristors with external commutation circuits and accompanied with six diodes .
Assume the inverter feeds a balanced three-phase wye connected resistor load. Two modes of control signals can be applied to the switching transistors: 120° conduction mode and 180° conduction mode.
1.2.1. 120° conduction mode
Each switching device is turned on for one-third of a cycle, or 120°. Consequently, only two switching devices can conduct simultaneously at any instant. It is most suitable for a delta connected load because it has a six-step output voltage waveform across any of its phases. The gating signals of each switching device are shown in Figure 5(a) and the corresponding three-phase line voltages are shown in Figure 5(b). The output voltage waveforms of an ideal inverter should be sinusoidal. However, the output voltages are usually square waveform or quasi square waveform. This means that the output voltage inherently contains harmonic contents. The rms value of fundamental phase voltage is 0.39 VDC and can be found from the calculation of Fourier series for line voltages [5, 6].
1.2.2. 180° conduction mode
For 180° conduction mode, each switching device conducts is turned on and off at 180° interval. At any instant of time, three switching devices always remain turn-on state. The gating signals for each switching device are phase displacement of 120° as shown in Figure 6(a). Consequently, a three-phase output voltage can be obtained with respect to the corresponding switching sequence pattern, as shown in Figure 6(b). The rms value of fundamental phase voltage is 0.45 VDC. Compared to the 120° conduction mode, it has much higher output voltage under any operating condition. In other words, it has better voltage utilization of switching devices [5, 6, 7].
2. The dynamic model of a BLDC motor
The equivalent circuit of a BLDC motor is shown in Figure 7. The stator phase voltage equations (Van, Vbn, and Vcn) related to the stator phase currents (ia, ib, and ic) and back electromotive force (ea, eb, and ec) for a BLDC motor, are expressed by (1) [5, 6].
where Ra, Rb, and Rc, represent the phase resistance for each phase, Laa, Lbb, and Lcc represent the self-inductance for each phase, Lab, Lbc, and Lca represent the mutual inductance between either of two phases, and ea, eb, ec, represent the back EMF for each phase. If a three-phase balanced system is considered, that is, ia + ib + ic = 0, the stator voltages in (1) can be rearranged to matrix form as
In steady state, the air gap power in terms of the electromagnetic torque and speed is expressed by
The electromagnetic torque is then given by
Assume the flux linkage is continuous. The induced emfs are derivatives of the flux linkage. By proper control of the motor, the electromagnetic torque can be expressed by
The electromagnetic torque expressed in (6) indicates that it can be controlled by the stator current with the torque constant, Kt. This is very similar to the control of separately DC motor drive. The load model can be expressed in terms of the motor speed, ωm, a moment of inertia, J, in kg m2/s2 with a viscous friction B, in N m/rad/s. The electromagnetic torque, Te, in N m then drives the load torque, TL, in N m as represented in (1) and repeated here.
3. The design of a speed controller
For a speed-controlled motor drive, the time constants of the current loop are usually much smaller than that of the load and the speed controller. In such situation, the control system with simplified current loop for a motor drive is shown in Figure 8. If the 3-dB frequency of current control loop is properly selected, the current controller, Gi(s) can be approximated to .
Assume that Tc is very small in the operating frequency interval, Gi(s) is approximate to be unity. The PI control is usually employed to the speed controlled motor drive system and has proved to achieve good performance. The transfer function of speed controller, Gs(s), can then be expressed by .
where Kps is the proportional gain and Kis is the integrator gain. As we observe the speed control loop, the open-loop transfer function of the speed response has three poles, which can be obtained from the integrator time delay constant, current loop time delay, and the load time constant, respectively.
For a speed-controlled drive system, the 3-dB frequency generated from the current loop time delay is always designed to be higher than the rotor frequency. In addition, the 3-dB frequency is obtained from the integrator time delay of PI controller is usually chosen to be smaller than the rotor frequency. From the approximation of current loop crossover frequency and the corner frequency of PI controller, the complete speed-controlled drive system is redrawn in Figure 9. The system is inherently stable since the maximum phase angle of the complete control system is −90°. Adjusting the proportional gain of speed controller, Kps, can be applied to meet the requirements of the overshoot for the overall control system [8, 9].
4. The implementation of a BLDC motor drive
The system structure with control algorithm of motor drive based on a microcontroller is shown in Figure 10. It consists of a microcontroller, protection circuit, optical coupling isolation, inverter, current sensor, Hall effect sensor, and communication interface. For the design and implementation of an electric bicycle, the AC power source and rectifier are replaced by DC battery. The microcontroller dsPIC 30FXX series manufactured by Microchip technology incorporate is the core controller of the electric bicycle. It is a 16-bit CPU with the capability of digital signal processing. Moreover, it supports many powerful modules such as built-in PWM module, addressable encoder interface module, and input capture module; these make the design friendly and thus shorten the development schedule. The three-phase bridge inverter comprises six switching power MOSFETs. The photocoupler is used for electrical isolation between the microcontroller system and bus voltage. The motor currents from the DC bus are sensed through the current detection circuit. The magnet pole and rotor position are detected by the Hall effect sensor. The speed and rotor position can be calculated and precisely controlled, accordingly. The 120° conduction of pulse width modulation technique for MOSFETs switching, is employed to drive the thee-phase inverter.
Figure 11 is the main program of a motor drive for electric bicycle design. The initializations for I/O configuration, Timer 1, Timer 2, ADC, and PWM settings are firstly processed in the main program. Most of the functions for electric bicycle are programmed in the microcontroller firmware, which includes the circuit protection mechanism, PWM generation, motor currents calculation, rotor position and speed calculation, and rotor pole position [8, 10].
The speed and currents are usually implemented in the PWM interrupt routine, as shown in Figure 12. The sensing current is firstly calculated and fed to the current controller. Since PWM frequency is 20 kHz, the current controller is updated for every 50 μs. After the calculation of current controller, the speed calculation is then performed by speed controller. The speed is constrained by the limiter in the operating speed range .
In order to obtain the proper control of the BLDC motor, the timing between rotor position detected by Hall effect sensor and the corresponding back emf, must always be kept in a fixed sequence. Figure 13 shows the timing sequence between the rotor position (Ch1–Ch3) and the corresponding back emf (Ch4). The motor parameters for the experimental test are Kt = 0.0761021 N m/A, JL = 0.000245 kg m2, and BL = 0.00731 N m s/rad. The magnitude frequency response of Bode plot with different Kps is shown in Figure 14. Observing the Figure 14, it can be found that the 3-dB rotor frequency is around 800 rad/s. Figure 15 shows the step response of the speed from zero to 200 rpm under the load of 10 kg cm. It can be observed that the motor drive can reach the command speed within the 1.5 s. The phase currents under the load of 10 kg cm is shown in Figure 16, where Ch1, Ch2, and math represent phase currents A, B, and C, respectively.
In summary, the speed control of motor drive for an electric bicycle is described in this chapter. The hardware structure including a microcontroller, protection circuit, optical coupling isolation, three-phase inverter, current sensor, and communication interface is well designed. Further, the system software and firmware of microcontroller are programmed and described in detail.
Based on the proposed simple method to find the rotor corner frequency, the range of proportional gain of speed controller can be determined so as to avoid the system oscillation. This result can not only speed up the design and implementation of speed controlled motor drive, but also reduce the development time. Further, the contents presented in this chapter about basic knowledge and fundamentals of a motor drive system are suitable for college graduate students. Moreover, I hope it can help engineers and researchers when design and implement a motor drive.