Implementing Embedded Speed Control for Brushless DC Motors: Part 6 -

Implementing Embedded Speed Control for Brushless DC Motors: Part 6

Another method worth considering in any discussion of motor control isvector control. The detailed formulation of this method to control thetorque and flux in PMSM was originally achieved by Jahns, Kliman, andNeumann [1] in the mid-1980s.

Additional work has been done by many authors, and you will findmore information and explanation in references [2,3,4] . Here we willsimply summarize the concept and compare it to the 180-degree V/fopen-loop and closed-loop scalar control methods previously discussed.

When we examine the torque equation for a brushless DC motor, werealize that the equation is really a vector formulation with thevector product of the current and magnetic fields shown on theright-hand side:

If we formulate a rotor frame that has a d-axis parallel to thenorth-south line and a q-axis perpendicular to the d-axis, asillustrated in Figure 47 below ,we can actually convert the stator currentsin the rotor frame.

Figure47. Stator frame to rotor frame transformation for vector control.

We then realize that the current along the d-axis creates pure flux,whereas the current along the q-axis creates pure torque. Denotingthese two currents as Id and Iq, we can say that our control algorithmmust control both these currents to maintain proper flux and propertorque in the system. We know that speed is directly related to torque,and torque is related to the q-axis current.

Therefore, we must create a reference q-axis current to maintain thespeed. Then we can control the q-axis current through transformation ofour axes. In this way we convert the single-variable speed control intocontrol with more variables – speed, d-axis current, and q-axiscurrent – and we use a vector formulation to compute the quantitiesthatwe need to control. Hence we call this method “vector control.”

Now let's take a look at the detailed steps necessary for vectorcontrol. As Figure 48 below shows, a profile module gives the speed commandto the control algorithm at some point in time.

On the right hand side, a control function outputs commands for theinverter, which is connected to the motor. This configuration has twocurrent sensors to measure the phase U and phase W currents. Thesensors are connected to the ADC on the MCU. The motor also has anencoder mounted on its rotor to give the quadrature pulses A, B andalso the zero synch pulse Z. All three signals are sent to theinput-capture and timer/counter peripheral for speed measurement.

Figure48. Vector control flow diagram.

At every carrier-frequency interrupt, three PWM signals aregenerated. While all three PWM signals are applied, the system measurestwo currents by triggering the ADC channels.

During the next interrupt execution, these currents are thentransformed from stator U, V, and W axes to d-q axes using matrixmultiplications that involve the rotor angle q at that time. The rotorangle is measured by reading the A,B pulses and converting this readinginto a proper angle. The control system's firmware is greatly helped ifthe MCU has a hardware timer with input capture and continuous countingof A,B pulses.

Based on the rotor position theta, stator currents are transformedind-q axes currents as we have noted. The speed measurement is fed intothe auto speed regulator (ASR), shown in Figure 48 above , which generates thereference q-axis current required to maintain the commanded speed.

This reference q-axis current and measured q-axis currents are fedinto the auto current regulator (ACR) to create q-axis voltage to beapplied to the next PWM. The reference current in the d-axis ismaintained at constant level to maintain proper flux in the stator.

This reference d-axis current and the measured d-axis currents arefed into a second ACR to create the d-axis voltage. Corrections aremade to the voltage calculations according to the number of pole pairsand the reference currents in the d and q axes.

When the final values Vd and Vq are computed, they are transformedfrom the rotor frame to the stator frame using inverse transformationand that rotor angle value. Three voltages in the stator frame – Vu, Vvand Vw – are converted into the PWM values that are to be output by thethree-phase timer unit.

Current measurements and auto current regulators are executed atevery carrier frequency. This process, which is known as “inner loop,”uses the fastest control algorithm. In contrast, encoder measurements,and especially speed measurements, are performed at a lower rate.Therefore, the auto speed regulator and related computations areperformed using a slower process called “outer loop.”

A typical carrier-frequency or inner loop rate is about 4kHz ormore, and the encoder-based speed computation or outer loop rate isabout 500Hz or so. Occasionally the outer loop rate can drop as low as50Hz.

Experts agree that vector control method controls the torque andflux very well, and it maintains the desired speed accurately. Vectorcontrol requires one position sensor and two current sensors to performthe necessary tasks. It also requires an MCU with high computing powerso that the inner-loop and outer-loop processes can be executedproperly. Additionally, the MCU must be capable of measuring twocurrents simultaneously, so it must have two sample-and-hold circuitsin its ADC peripheral.

The vector-control method provides dynamic torque control based onexact speed measurements and current measurements. Consider an examplein which the load changes during rotation. Since speed is measuredseveral times (typically at a 500Hz rate), any load changes thataffects the speed will be detected and for the next rotation, theq-axis current will be adjusted properly to maintain the same speed.

If higher current is required, it will be provided. Control andsystem experts generally regard vector control as the reference againstwhich the performance of other methods are compared and evaluated.

The vector-control method does have some drawbacks. It requiressensors and thus adds cost to the final implementation. Also, itmandates an MCU with high computing power, which may add cost.

In Table 6, below , we see acomparison of the features, accuracy,and required MCU resources for the three control methods we havecovered thus far: V/f open-loop, scalar, and vector control.

Table6. Comparison of V/f open loop, scalar and vector control.

Sensorless control
Since the vector control method we have just examined requires oneposition sensor and two current sensors, the final system configurationmay be costly.

Consumer applications, especially white goods, are verycost-sensitive and thus cannot afford this type of implementation. Atthe same time, these applications do not require the same performanceaccuracy for speed, as do industrial applications.

Therefore, two other control techniques have been developed thatprovide adequate performance for the system, yet keep cost down. Thesetechniques are called sensorless because they do not require anyposition sensors. Both methods use the same 180-degree modulation andvector control algorithm.

The first of these methods eliminates the position sensor but keepsthe two current sensors. It is known as “DCCT-based sensorless vectorcontrol” and is shown in Figure 49,below . Because this method uses noposition sensor, angle and speed are estimated using the currentmeasurements and voltages applied the previous PWM cycle.

Figure49. Position sensorless control with 2 DCCT current sensors.

The method employs a Kalman-filter approach based on principles ofmodern control theory, an observer-based model, and a state transitionmatrix. Estimated angle and speed are used together in the same vectorcontrol algorithm to control the current in the q-axis.

Such an implementation requires many matrix calculations, and thusan MCU with high computing capability is a requirement. In fact, theCPU bandwidth needed is nearly double that of vector control method.Gain adjustment in the auto speed regulator and auto current regulatoris very difficult. Exact motor parameters must be known, particularlythe q-axis and d-axis inductance parameters, which are difficult tomeasure. Despite the challenges, such control is a reality and has beenimplemented in several applications.

In a second method, the position sensor and two DCCT sensors areeliminated. Currents are measured using the shunt resistance installedon the low side of the inverter, as shown in Figure 50, below . This shuntresistance is a precision resistor capable of measuring the fullcurrent range of the motor. Using one shunt, we measure two currents;thus this method is known as “one shunt current detection vectorcontrol” or simply “OSCD vector control.”

Figure50. One shunt current detection method that eliminates DCCT andposition sensor.

The implementation shown in Figure51, below ,  is similar to that of the DCCTmethod, but it adds one more computing block, Current Meas . Tounderstand why this addition is necessary, we'll look at how thecurrent is measured.

Figure51. OCSD implementation flow with current measurement module.

First, remember that our setup has only one shunt resistor. Tomeasure individual phase currents, we must be careful. Figure 52 showsus how the three PWM outputs are applied. In this figure, the W phasehas largest PWM time, V has next smaller, and U has the smallest.

If we measure the shunt current between the rising edge of W and therising edge of V, we know that only the W phase (that is, only the Wp-upper W phase IGBT) is on at that time. So, we measure W phasecurrent. Next, if we measure the current between the rising edge of Vand the rising edge of U, then we are measuring the W and V phasecurrent together.

Figure52. One shunt current measurement technique using a additional timersto trigger ADC.

This also means that we are measuring the U phase current, becausethe sum of all currents in a star-winding motor is zero. Thus, we mustmake 2 current measurements at precise time during our interruptprocessing. We need two other timer channels that can help us triggerthe ADC at a precise time.

An example is the Renesas M16C 3-phase timer unit. This unit has alink with timer channels TB0 and TB1, such that it will trigger the ADCchannels AN0 and AN1 at a precise time. All we have to do is load theappropriate register values.

As part of this process, we must compare the PWM values of all threephases and determine exactly how much time we need to load channels TB0and TB1. It is important to note that the three PWM values continue tochange constantly, so that W is not the largest.

Thus, we need to test the largest value every time and set theproper flags for the current we are measuring. All the comparisons,settings, and identifications required by this method make for complexprocessing task, one that requires significantly more code and more CPUtime. The requirements for CPU bandwidth are generally more than doublethose of other vector-control schemes. The more complex software andhigher computing power requirements keep many designers from using thismethod.

Performance by both sensorless methods is adequate and useful forapplications that don't have tight accuracy requirements for speed.Cost is less than full vector methods and response is good -definitelybetter than that provided by scalar control.

Figure53. Comparison of CPU bandwidth and code for six speed controlalgorithms

All six control algorithms we have examined, from 120-degreemodulation through OSCD control, have been implemented in the RenesasM16C/28 series MCU with a prototype motor control platform.Measuredperformance, CPU bandwidth and code size are shown in Figure 53, above.

As we see, vector control with position and current sensors requiresabout 40% of the CPU bandwidth, while DCCT sensorless control requiresabout 74% or nearly double the bandwidth. Moreover, OSCD vector controlwithout position and current sensors requires nearly 90% of CPUbandwidth, which is more than double the bandwidth used by vectorcontrol with sensors.

Yashvant Jani is director ofapplication engineering for the system LSIbusiness unit at Renesas TechnologyAmerica.

To read Part 5, go to V/fopen-loop control in DC brushless DC motors.
To read Part 4: go to 180 degree modulation for brushless motorcontrol.
To read Part 3, go to Prosand cons of sensor vs sensorless motorcontrol
To read Part 2, go to Brushlessmotor control using Hall sensors
To read Part 1, go to The basics of brushless motor control.

1. Interior Permanent-MagnetSynchronous Motors for Adjustable Speed Drives, by T. M. Jahns, G. B.Kliman and T. W. Neumann, IEEE transactions on Industry Applications,Vol. IA-22, No. 4, pp. 738747, July/August 1986.
2. Dynamic Model of PMSynchronous Motors, by Dal Y. Ohm, Drivetech Inc. Blacksburg, VA
3. Modeling and ParameterCharacterization of Permanent Magnet Synchronous Motors, by D. Y. Ohm,J. W. Brown and V. B. Chava, Proceedings of the 24th Annual Symposiumof Incremental Motion Control Systems and Devices, San Jose, pp 81-86,June 1995.
4. Power Electronics and ACDrives, by B. K. Bose, Prentice-Hall 1986.
5. PowerElectronics and Variable Frequency Drives Technology and Applications,Edited by Bimal K. Bose, IEEE Press, ISBN 0-7803-1084-5, 1997
6. MotorControl Electronics Handbook, By Richard Valentine, McGraw-Hill,ISBN 0-07-066810-8, 1998
7. F IRSTCourse On Power Electronics and Drives, By Ned Mohan, MNPERE, ISBN0-9715292-2-1, 2003
8. Electric Drives, By NedMohan, MNPERE, ISBN 0-9715292-5-6, 2003
9 . AdvancedElectric Drives, Analysis, Control and Modeling using Simulink, ByNed Mohan, MNPERE, ISBN 0-9715292-0-5, 2001
10 . DC Motors Speed ControlsServo Systems including Optical Encoders, The Electro-craft EngineeringHandbook by Reliance Motion Control, Inc.
11. ModernControl System Theory and Application, By Stanley M. Shinners,Addison-Wesley, ISBN 0-201-07494-X, 1978
12. The IndustrialElectronics Handbook, Editor-in-Chief J. David Irwin, CRC Press andIEEE Press, ISBN 0-8493-8343-9, 1997

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.