14
International Journal of Advanced Mechatronics and Robotics (IJAMR) Vol. 3, No. 1, January-June 2011; pp. 29-42; © International Science Press, ISSN: 0975-6108 A Robust Controller Design for a Brushless DC Drive System using Moving Average Speed Estimation on Cortex M3 ARM Microcontroller V. M. Takodia, J. J. Patel & M. A. Mulla Electrical Engineering Department, S. V. National Institute of Technology, Ichchhanath, SURAT - 395 007, Gujarat, India. E-mail: [email protected] ABSTRACT Brushless DC (BLDC) drive systems are continually gaining popularity in motion control applications. Motion control applications require very good stability limits, steady state and transient responses, hence brushless dc drive systems should respond to meet these requirements. Encoder feedback is normally used for designing robust controller for BLDC drive, in this paper, hall sensor based moving average speed estimation and variable K p -K i PI controller is presented. The digital controller is implemented using Cortex M3 ARM microcontroller (LM3S2616) with only hall-sensors feedback. The experimental setup is tested by loading BLDC motor from no load to full load as well as with continuous and impact load. Serially, motor parameters like speed, current are gathered on PC and analysed, which confirms the robustness of controller designed. Keyword: BLDC (Brushless dc) Motor Drive, Digital Control, Modelling and Analysis, Motion Control. 1. INTRODUCTION The brushless dc motor (BLDC) motor has been used in various industrial applications and has increased demand in diverse fields because of its high efficiency, simple control compared to ac motors, low EMI, and high reliability due to absence of brushes. Most three-phase motors, including BLDC motor need at least six PWM channels for inverter power devices such as IGBTs and MOSFETs. In order to meet these requirements, generally a special- purpose processor is necessary. Using special purpose processor or a device for BLDC motor drive presents several advantages such as small driver size and less development time. However, these processors are more expensive than the general purpose processors and eventually will increase the cost of BLDC motor drive system. Since the main flux of BLDC motor is produced by the permanent magnets, this motor has high power density and is capable of operating at high efficiencies while having similar torque control performance as a dc motor [1, 2]. Trapezoidal type BLDC motors are generally used for low-cost industrial applications. Therefore, low-cost application of BLDC motors is being considered for many products. In

A Robust Controller Design for a Brushless DC Drive …serialsjournals.com/serialjournalmanager/pdf/1329888978.pdfis capable of operating at high efficiencies while having similar

Embed Size (px)

Citation preview

International Journal of Advanced Mechatronics and Robotics (IJAMR)Vol. 3, No. 1, January-June 2011; pp. 29-42; © International Science Press, ISSN: 0975-6108

A Robust Controller Design for a Brushless DC DriveSystem using Moving Average Speed Estimation

on Cortex M3 ARM Microcontroller

V. M. Takodia, J. J. Patel & M. A. MullaElectrical Engineering Department, S. V. National Institute of Technology,

Ichchhanath, SURAT - 395 007, Gujarat, India.E-mail: [email protected]

ABSTRACT

Brushless DC (BLDC) drive systems are continually gaining popularity in motion control applications.Motion control applications require very good stability limits, steady state and transient responses,hence brushless dc drive systems should respond to meet these requirements. Encoder feedback isnormally used for designing robust controller for BLDC drive, in this paper, hall sensor basedmoving average speed estimation and variable K

p-K

i PI controller is presented. The digital controller

is implemented using Cortex M3 ARM microcontroller (LM3S2616) with only hall-sensors feedback.The experimental setup is tested by loading BLDC motor from no load to full load as well as withcontinuous and impact load. Serially, motor parameters like speed, current are gathered on PC andanalysed, which confirms the robustness of controller designed.

Keyword: BLDC (Brushless dc) Motor Drive, Digital Control, Modelling and Analysis, MotionControl.

1. INTRODUCTION

The brushless dc motor (BLDC) motor has been used in various industrial applications andhas increased demand in diverse fields because of its high efficiency, simple control comparedto ac motors, low EMI, and high reliability due to absence of brushes. Most three-phasemotors, including BLDC motor need at least six PWM channels for inverter power devicessuch as IGBTs and MOSFETs. In order to meet these requirements, generally a special-purpose processor is necessary. Using special purpose processor or a device for BLDCmotor drive presents several advantages such as small driver size and less developmenttime. However, these processors are more expensive than the general purpose processorsand eventually will increase the cost of BLDC motor drive system. Since the main flux ofBLDC motor is produced by the permanent magnets, this motor has high power density andis capable of operating at high efficiencies while having similar torque control performanceas a dc motor [1, 2].

Trapezoidal type BLDC motors are generally used for low-cost industrial applications.Therefore, low-cost application of BLDC motors is being considered for many products. In

30 International Journal of Advanced Mechatronics and Robotics

order to achieve low-cost BLDC motor drive, a general-purpose processor with hall sensorsis used instead of using position sensor encoder and a special purpose processor. In thispaper a 32-bit ARM microcontroller LM3S2616, which gives 75 MIPS performance withthe availability of 1 cycle flash from Texas Instruments (TI) (Formally Luminary Micro-system) is suggested for BLDC motor control. The digital controller is implemented withmoving average speed estimation using hall sensor feedback and variable K

p-K

i PI algorithm

in order to improve the system response. The simulated results are verified by the experimentalsetup by loading motor from no load to full load as well as with continuous and impact load.

2. BLDC MOTOR

Permanent magnet (PM) motors are synchronous motors with permanent magnets mountedon the rotor, and the armature windings located on the stator. PM motors are categorizedinto two types: The first type is referred to as PM synchronous motor (PMSM) which hassinusoidal back-EMF. The other type is referred as BLDC motor which has a trapezoidalback-EMF as shown in Fig.1. In the BLDC motor drives, the polarity reversal is performedby power transistors switching in synchronization with the rotor position. Therefore, theBLDC motor has to use either internal or external position sensor to detect the actual rotorposition. Also, the rotor position can be estimated without the need for position sensor.However, in proposed scheme, three hall sensors are used to determine the actual rotorposition.

Figure 1: Schematic of BLDC Motor

A Robust Controller Design for a Brushless DC Drive System using Moving Average… 31

Figure 2: Position Sensor Output and Ideal Current Waveforms

Figure 3: Voltage Source Inverter (VSI)

32 International Journal of Advanced Mechatronics and Robotics

Figure 4: The Back-EMF of BLDC Motors

In general, BLDC motor may use either 600 or 1200 conduction intervals. In this paper,the 1200 conduction interval is used. Figure 1 shows a schematic of BLDC motor withplacement of hall sensors. Figure 2 shows the position sensors outputs and ideal currentwaveforms with respect to position. Figure 3 shows a three phase voltage source inverter(VSI). The ideal phase current in each of the motor windings are shown with hall sensoroutput in Figure 2. Figure 4 shows the trapezoidal back emf of the BLDC motor. Accordingto Figure 2 from the first interval, phase A will conduct positive dc link current, while phaseB will conduct negative dc link current. Phase C will be left open. As a result, only phase Aand B are conducting and phase C is left silent, which means that only two switches (A_Hand B_L) are active, while the rest (A_L, B_H, C_H, and C_L) are inactive. During eachPWM cycle to achieve this switching scheme, the desired duty cycle is imposed by theupper switch (A_H) of the two involved switches (A_H and B_L) and the lower switch(B_L) is kept on (100% duty cycle). Therefore, there is no need for dead time to be consideredfor BLDC motor. Because, whenever the upper switch is turned on, the lower switch of thesame leg is already off and vice versa [3].

3. PROPOSED SETUP AND ALGORITHM

Proposed BLDC drive consist of four units: supply line interface, digital controller, motorand sensors, and power converter or drive unit. The overall system can be represented by

A Robust Controller Design for a Brushless DC Drive System using Moving Average… 33

a block diagram shown in Figure 5. Hall-sensors feedback is connected with microcontrollervia commutation circuit block, which is connected to PWM generator block. Hall-sensorsfeedback is used to calculate the actual speed of the motor. The required PWM duty-ratiois calculated in order to achieve reference speed. PWM generator will generate gate pulseswith required duty-ratio, which need to be synchronised with hall-sensors feedback forproper electronics commutation of the switches.

Figure 5: Schematic Diagram of BLDC Motor with Closed Loop Control

When speed responses are obtained with classical PI controllers, the Kp and K

i are kept

constant. General approach of tuning is initially have no integral gain, increase Kp until

satisfactory response is obtained and then add in integral until the steady state error isremoved in satisfactory time (may need to reduce K

p if the combination becomes oscillatory).

Here, Kp is responsible for process stability and K

i is responsible for driving error to zero.

Too low value of Kp can cause drift, and too high value will cause oscillations. Very high

value of Ki will also invoke oscillations or instability [4]. When the command changes, the

system needs a large control input for fast response. To produce a large control input, the PIcontroller should have a large K

pand small K

i. When the motor reaches the command value,

it needs a small Kp to avoid overshoot and large K

i to reduce steady state error. Thus, the

modified PI controller parameters as a function of the position or speed error is expressedby equation (1) and (2).

,max ,min,min

max

p pp p

K KK K e

e

−= + × (1)

34 International Journal of Advanced Mechatronics and Robotics

,max ,min,max

max

i ii i

K KK K e

e

−= − × (2)

The gain constants vary as an instantaneous function of error within specified limits.Thus, K

p and K

i are variables instead of constants. Digital variable K

p-K

i control algorithm

is implemented to improve the system response.

The theory and modeling of BLDC motors have been developed with an assumptionthat hall sensors are placed exactly 1200 apart. Practically it is difficult to achieve this withhigh accuracy, this result in imbalance among the phases and leads to increase in torquepulsation, vibrations, acoustic noise, and deterioration in mechanical performance. In orderto overcome this misalignment of hall sensors a moving average speed estimation algorithmis developed. This algorithm will move the twelve count reading of timer on every hallsensor output state change and provides speed value in intermediate hall sensor transitionstages also. Moving average is done on arrival of new hall sensor count; this improves thespeed measurement ability and makes it equivalent to speed measurement using incrementalencoder.

4. SIMULATION RESULTS

The simulation of proposed BLDC drive is done using the software package MATLAB/SIMULINK, schematic of arrangement is as shown in Fig 6 [5, 6]. The motor’s closed loopcontrol models were constructed with required control circuit. After running the simulations,the speed, torque, current waveforms were recorded and analysed.

Figure 6: Simulation of Proposed BLDC Drive

A Robust Controller Design for a Brushless DC Drive System using Moving Average… 35

(a) Stator currents, back EMF, hall signals, speed, and torque (from top to bottom)

(b) Speed (in RPM) for constant value of Kpand K

i

36 International Journal of Advanced Mechatronics and Robotics

(c) Speed (in RPM) for varying values of Kp and K

i

Figure 7: Simulated Results of the Proposed BLDC Drive

The parameters of the BLDC drive system for dynamic simulations are obtained andcompare with fixed K

p-K

i performance, the obtained reading are as tabulated in Table 1. It

is seen from the results that peak overshoot and settling time of the system reduce with thisvariable K

p-K

iPI algorithm. The simulated current, torque, hall signals and speed responses

are shown in Fig 7. The effectiveness of variable Kp-K

iPI algorithm is illustrated in Table 1.

Given a range of Kp between 0.01 to 01 and K

i between 0.2. to 0.3, the PI controller tuned

itself and reduces the peak overshoot from 1.5% to 1% and also reduces the reduces thesettling time from 17.1ms to 15.4ms. These results are compared with performance ofmotor with constant K

p = 0.05 and K

i= 0.25; for which the system is tuned.

Table 1Comparison of Motor Parameters with Constant and Varying K

p-K

iAlgorithm

Time domain Kp = 0.05 and K

i= 0.25 K

p, min= 0.01, K

p,max = 0.1 and

specifications (Constant Kp-K

i) K

i,min= 0.2, K

i,max= 0.3

(Variable Kp-K

i)

Peak overshoot 1.5 % 1%

Settling time for 2% 17.1 ms 15.4 mstolerance in speed

5. EXPERIMENTAL SETUP

A 24 V, DC supply is generated using a step down transformer and a rectifier unit orstandard 24 V SMPS can be used alternatively. A 32-bit ARM microcontroller LM3S2616is used for the BLDC motor control. A 4000 RPM BLDC motor DPM 57BLS94 with only

A Robust Controller Design for a Brushless DC Drive System using Moving Average… 37

hall sensor output is used in the test setup. MOSFET based three phase power converter isused as a driving unit. The digital control design strategy was validated with an experimentalsetup constructed in order to implement and further validate the simulation results.

A. Digital Controller

To achieve proper control of BLDC motor, the required digital controller should have minimumfollowing capabilities [7, 8]:

1. Minimum 3 number of interrupts for hall sensor base rotor position sensing interface.This interrupt can be configurable for its both; positive going edge and negativegoing edge.

2. Minimum 6 independent PWM generation units, (with a 16 or 32 bit timer) withdedicated output pins. PWM should be configurable for edge aligned or centre alignedPWM.

3. Minimum 2 channels for quadrature encoder interfacing. This will be useful forspeed measurement, position tracking and direction of rotation.

4. Processor should have single cycle multiplication instruction and division instructionsfor fast computations.

5. On chip multi-channel 500 ksps to 1 msps ADC to sense currents and/or back emfsignals.

After searching in the category of 32-bit controllers, following controllers were considered:

• TMS 320F2812 BY TI

• ARM CORTEX M-3 (STM32) BY ST

• ARM7 TDMI BY NXP

• ARM CORTEX M-3 BY LUMINARY MICRO

Last option of a 32 bit controller by TI (Formally luminary micro systems) with around75MIPS performance, KEIL IDE for software development and availability of 1 cycle flashis selected. From the family of 32-bit Cortex M3 ARM processor LM3S2616 microcontrolleris selected. The overall proposed scheme for BLDC drive is depicted as shown in Fig.8.

An LM3S2616, ARM micro controller was chosen for the task of performing the logicoperations required to commutate and control the motor. A micro controller was chosenover a digital signal processor (DSP) to reduce cost and lower the complexity of theassociated hardware. Also, development tools and support were readily available for theARM. They allow user control of certain motor controller functions such as direction, mode,and start/stop. Crystal used is of 25MHz, capacitors are provided for crystal stabilizing, apull-up resistor is used for the micro controller resets pin, the micro controller ADC reference

38 International Journal of Advanced Mechatronics and Robotics

used is +2.5 V reference and PORTA and PORTB is configured as Pulse width modulation(PWM) output port.

B. Three Phase Inverter and Gate Driver

A standard three-phase dc to ac inverter was used. The switches were conservativelychosen; MOSFETs (STP80NF55-06) rated for 55 V, 80 A and RDS(on)=0.005 ohm, is wellover the power ratings of the BLDC motor. To drive the switches, a high-speed powerMOSFET and insulated gate bipolar transistor driver IC was used (IR2130). Therecommended connections given by the IC’s data sheet were used to interface the inverterwith the driver [9]. Full bridge topology is implemented for higher torque output as comparedto half bridge. The gate driver circuit (IR 2130) forms the interface between the microcontroller and the power MOSFETs. The gate driver circuit has two purposes: Firstly, itbuffers the gate signals generated by the micro controller. The second purpose of the gatedrive circuit is to generate the gate voltages required to activate the topside transistor.

Figure 8: Overall BLDC Drive Scheme

A Robust Controller Design for a Brushless DC Drive System using Moving Average… 39

Figure 9: Hall Effect Sensor Interface

Figure 10: Current Sensing Unit

C. Current Control and Sensing Hardware

Most BLDC motors have several hall-effect sensors, incorporated in the stator. Thesesensors provide rotor position information to the motor controller. A current sensing amplifieris required to provide motor current information to the micro controller. Current was sensedin both directions. Under normal operation, the current flows from the +V motor rail, through

40 International Journal of Advanced Mechatronics and Robotics

the motor and to ground through the current sensing resistor. When braking is applied to themotor; current flows from ground, through the motor and the +V motor rail. The currentneeds to be limited to 10 amps in both directions to prevent damage to the motor’s statorwinding. A single supply, rail-to-rail opamp, the LMV324 was chosen. The opamp is suppliedfrom the +5 V rail, ensuring that the microcontroller’s ADC does not see more than 5 V onits inputs. The current signal is amplified differentially to avoid any DC offset due to opampbias currents.

D. BLDC Motor with Mechanical Load and Overall Setup

The BLDC motor used for the experimental testing was DPM 57BLS94 which is a 4000 RPMand 36 V. A pulley is mounted on the shaft of the motor and the arrangement is fixed on thetable for mechanical loading on the motor. The ratings and all other motor information weretaken from the manufacturer’s data sheet.

6. EXPERIMENTAL RESULTS

The moving average speed estimation and varying Kp-K

i PI digital control working with

hall-sensors feedback has been validated with an experimental setup. The speed readingsof the motor are collected every 200 ms and downloaded into Excel sheet for further analysisthrough serial transmission. The graphs are plotted for speed in RPM versus time in seconds.The experimental results are matched with the simulated results of the proposed BLDCdrive system.

Figure 11: Experimental Setup of Overall BLDC Drive

A Robust Controller Design for a Brushless DC Drive System using Moving Average… 41

(a)

(b)

Figure 12: Experimental Results of Proposed Closed Loop BLDC Drive: (a) Speed Performance for StepChange in Set Points, and (b) Speed Performance While Tracking Trapezoidal Reference Set Points

Fig. 12(a) shows the performance of motor while set point of the motor is changed insteps and impact loading on the motor is applied and removed. It has been observed fromthis graph that the performance of motor is very good and matches exactly to set point. Fig.12(b) shows the performance of motor with continuous varying set point. Artificially the setpoint of the motor is changed in accelerating ramp and decelerating ramp fashion on loaded

42 International Journal of Advanced Mechatronics and Robotics

motor. It has been observed that the performance of motor is very good and matchedsexactly to set point.

7. CONCLUSIONS

A new concept for digital control of BLDC motor with only hall-sensor feedback withmoving average speed estimation and variable K

p-K

i PI controller has been introduced. The

idea behind the new concept is to achieve robust control at low cost; conventionally encoderis must for getting such level performance. The moving average speed estimation improvesthe speed measurement ability and makes it equivalent to speed measurement usingincremental encoder. The closed loop speed control has been simulated in Matlab/Simulinkwith constant K

p- K

i and variable K

p- K

i PI control. It has been noted that variable PI

controller gives good response, from the view point of settling time and peak overshoot.Closed loop speed control has been physically implemented with fast running 32-bitmicrocontroller with sampling rate as small as 4 ms. The drive’s speed responses have beenexperimented and are found reasonably good.

ACKNOWLEDGMENT

The authors are grateful to Dr. R. Chudamani for her valuable discussions and her help inproof reading of this paper.

REFERENCES[1] F. Rodriguez, P. Desai, and A. Emadi, “A Novel Digital Control Technique for Trapezoidal Brush-less DC

Motor Drives”, in Proc. Power Electron. Technol. Conf., Chicago, IL, Nov. 2004.

[2] F. Rodriguez and A. Emadi, “A Novel Digital Control Technique for Brushless DC Motor Drives:Conduction-angle Control”, In Proc. IEEE Int. Elect. Mach. Drives Conf., May 2005, San Antonio, Texas,pp. 308-314.

[3] R. Krishnan, “Switched Reluctance Motor Drives: Modeling, Simulation, Analysis, Design andApplications”, Industrial Electronic Series, CRC Press; 1 Edition (June 28, 2001).

[4] M. A. El-Sharkawi, “Fundamentals of Electric Drives”, Pacific Grove, CA: Brooks/Cole, 2000, pp. 5-10.

[5] The Student Edition of MATLAB User’s Guide, The MathWorks, Inc., Prentice Hall, 1997.[6] MATLAB Primer (2nd Edition), Kermit Sigmon, Department of Mathematics, University of Florida,

Gainesville, FL 32611.

[7] H. C. Chen, M. S. Huang, C. M. Liaw, Y. C. Chang, P. Y. Yu, and J. M. Huang, “Robust Current Controlfor Brushless DC Motors”, Proc. Inst. Electr. Eng.—Electric Power Applications, 147, No. 6, pp.503-512, Nov. 2000.

[8] Yashwant Jani, “Implementing Embedded Speed Control for Brushless DC Motors: Part 1-6”, RenesasTechnology America, Inc., Dec 2006.

[9] International Rectifier, IR2130/IR2132(J)(S) & (PbF) 3-phase Bridge Driver. Data Sheet No. PD60019Rev.P.