Design of a Digital Servo Control IC for Permanent
Magnet Synchronous Motors with
Linear Hall Sensors
Yen-Chuan Chang and Ying-Yu Tzou, Member, IEEE
Power Electronics Systems & Chips Lab. Advanced Power Electronics Center Department of Electrical and Control Engineering
National Chiao Tung University, Taiwan.
AbstractThis paper presents the design and architecture
implementation of a digital position control IC for permanent magnet synchronous motors (PMSMs) with sinusoidal flux distribution using linear Hall sensors for low-cost motion control applications. The absolute rotor position is calculated from the measured Hall sensor signals and a speed estimator is devised to generate speed feedback for the servo loop compensator. The developed digital servo control IC for PMSM motors with linear Hall sensors consists of three major control blocks: a servo loop controller, a position and speed estimator, and a field-oriented torque controller. The accuracy of positioning control resolution can be improved by a position error compensation table via external position calibration. All the control blocks are realized by using digital circuitry with configurable and reusable intellecture property (IP) blocks. Experiment results are presented to verify the performance and feasibility of the proposed IC.
Index Terms—digital ac servo IC, permanent magnet
synchronous motor, linear Hall sensor, position calculator, speed estimator, position calibration, digital torque control.
I. INTRODUCTION
Small motors (below 3 Watts) have been widely employed in today's consumer electronics for speed or position control applications, such as cooling fans, DVD spindle drives, digital cameras, image scanners, and electronics toys. Requirements in control and energy saving performances of small motors become more stringent in company with size reduction. A very tighten cost constraint imposes on the feasible solution for the control of small motors. Most conventional approaches in design control ICs for small motors are using analog technology with only limited functions. Advantages in adopting analog technology mainly resides on cost considerations, however, suffers with limited functions and applications. Owing to the rapid progress in motor control and microelectronics technologies, development in software servo and motor control IC will become a major trend [1]-[3]. Although most ac drives (ac servo drives or universal PWM inverters) in use today adopt microprocessor-based digital control strategy, the implementation of current control loop and PWM control
are still tied to analog control circuitry. This kind of control scheme possesses the advantage of fast dynamic response, but suffers the disadvantages of complex circuitry, limited functions, and difficulty in circuit modification.
The rapid development in high-performance, low-cost DSP/FPGA has encouraged research on low-cost digital servo control IC for small brushless dc motor for low- resolution position control. This digital control scheme has the advantages of simple circuitry, software control, and flexibility in adaptation to various applications [4]-[5]. However, generating PWM gating signals and current control loops require a high sampling rate to achieve a wide bandwidth performance [6]-[7]. Mixed-mode technology has been employed in design of today's motor control ICs. However, most of the commercial control ICs are still fixed in structure and unable to be programmed. Programmability becomes important in modern motor control ICs in many applications.
This paper presents the design of a programmable digital servo control IC for PMSMs with linear Hall sensors. Fig. 1 shows the block diagram of a PMSM servo control system using the proposed control IC. By using the hierarchical and modular realization strategy, every block in FPGA is designed toward a specific function of control law, and has its own registers which can be configured by users to build up a control system according to different applications. The proposed implementation architecture has been realized using a single-chip FPGA controller. Unlike traditional DSP or microcontrollers, users do not need to design software
dc V T5 T6 Digital Torque Controller Servo Loop Compensator Servo Command 3-Phase PWM Inverter PMSM Motor T1 T2 T3 T4 Gate Drive Circuit DPWM ~ Switching Power Supply Estimator T3 T4 T1 T2 T5 T6 Sampler and Filter
Fig. 1. Block diagram of a servo control system for PMSM.
This work was supported by the National Science Council, Taipei, Taiwan, R.O.C. Project no. NSC 95-2221-E-009-338-MY3.
programs to develop control algorithms. Therefore, it provides a simple low-cost and fast time-to-market solution for the servo control of permanent magnet brushless motors with linear Hall sensors.
II. SERVOCONTROL SYSTEM DESIGN
A. System Configuration
Fig. 2 shows the internal architecture of the proposed digital servo control IC for permanent magnet synchronous motor. The servo control IC consists of a three-phase PWM generator with a programmable deadtime generator, a field-oriented torque controller, a velocity loop controller, a position loop controller, a position estimator based on the feedback signals from linear Hall sensors, and speed estimator based on the estimated position. In most servo control systems, the position information is obtained from encoders or resolvers, which are costly and usually need a special installation of the sensing device for the machine. Linear Hall effect sensors conventional used for the commutation control and current reference for PMSM motor control and also be used to provide positioning and velocity feedback information via signal processing techniques.
Fig. 3 shows two control schemes for brushless dc motor with sinusoidal flux distribution. The first control method is based on encoder feedback which guarantees high performances and better position tracking capability. The second one is usually adopted in low cost drives, where a certain reduction in control accuracy can be tolerated [8]. In this IC, we employ the second method based on current multiplier control to decrease the price in building a servo control system.
The linear Hall effect sensors produce an output signal which is proportional to the intensity of the induced field by the permanent magnet. For a sinusoidal brushless ac motor, the Hall effect sensors, which are displaced 120 electrical degrees from each other, can generate three sinusoidal
signals that are exactly in phase with back-EMF. The signals are regarded as a unit amplitude reference for the corresponding phase current. The torque command generated from the speed controller is multiplied by the reference Hall sensor signals to produce phase current command. In this way, the field-oriented torque control is achieved by generating current references in the three-phase stationary frame without the stationary-to-rotating reference frame transformation and its inverse.
The control IC is synthesized using modular circuit design methodology. Every block is designed toward a specific function and there are a lot of control registers in the
SPWM Deadtime A/D Interface A/D IGBT PMSM Speed Controller Hall Sensor Signal Current Feedback AC power RS232
Interface Rotor PositionEstimator
Host Controller Host Controller Speed Estimator Field-oriented Torque Controller Position Controller Signal Conditioning Circuit Host register interface Configuration Registers Current Feedback Hall Signals Rotor Position Estimated Speed PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 TxD RxD VDD GND CLK CLK CS DIN DOUT
Fig. 2. The internal architecture of the digital servo control IC.
Inverter PMSM DC AC + _ Current Controller a i ib ic * a v * c v * b v PWM Signal Generator Encoder Sine Table a-b-c d-q d I Iq e T sinTecosTe + _ * d I * q I Current Controller a-b-c d-q sinTe cosTe * d V * q V sinTe cosTe Inverter PMSM DC AC + _ Current Controller a i ib ic * a v * c v * b v PWM Signal Generator Encoder Sine Table a-b-c d-q d I Iq e T sinTecosTe + _ * d I * q I Current Controller a-b-c d-q sinTe cosTe * d V * q V sinTe cosTe
(a)Encoder based field-orientation control.
Inverter PMSM Hall Sensor DC AC + _ Current Controller Ha Hb Hc a i b i ic * a i * I * a v * c v * b v PWM Signal
Generator Hall Sensor Signal
Conditioning Inverter PMSM Hall Sensor DC AC + _ Current Controller Ha Hb Hc a i b i ic * a i * I * a v * c v * b v PWM Signal
Generator Hall Sensor Signal
Conditioning
(b) Hall-sensor based current multiplier control.
Fig. 3. Control schemes for brushless dc motor with sinusoidal flux distribution.
different function blocks. System constructers can set the registers according to different applications. To simplify the interface circuit and increase the practicality of the IC, the registers in the control IC is configured by a Graphical User Interfaces (GUI) program in Matlab on PC. Therefore, it takes little effort building up a servo system, and provides a flexible and fast time-to-market solution for PMSM motor drives with linear Hall effect sensors.
B. Position and Speed Estimation with Linear Hall sensor Fig. 4 shows the ideal output waveforms of the linear Hall sensors and the sampling mechanism. A nonlinear compensator is used to rescale the measured rotor position signal and a weighted FIR filter is used to remove the measured noises from Hall sensors and signal conditioning circuit. The 360 electrical degrees is divided into six intervals and each of them is 60 electrical degrees. The rotor position is first distinguished into the six intervals by the
sign of three Hall sensor signals Ha, Hb and Hc. Second, a
fine discrimination is made by an arcsine table look-up from Ha, -Hc, Hb, -Ha, Hc and -Hb according to the six intervals.
Fig. 5 shows the position detection mechanism from a series of measured rotor positional signals.
Fig. 6 shows the block diagram of the speed estimator based on the increment feedback from the calculated rotor
position. Te(k) is the estimated rotor position, 'Te(k) is the incremental position value in one sampling period and Z is the estimated speed. To prevent the estimated error occurs when the rotor position changes from 0 to 360 electrical degrees or 360 to 0 electrical degrees, the incremental position is replaced by the value in the previous sampling period when the estimated incremental value is larger than the preset limit ǻșlimit.
III. DETAILED DESCRIPTION OF THE FUNCTIONAL BLOCKS
A. PWM Generator
A 12-bit digital three-phase complementary PWM generator with configurable PWM frequency and deadtime is implemented in the control IC. This realization scheme has the advantage of simple hardware design compared with the asymmetrical PWM scheme and the harmonic spectrum has little effect with a high switching frequency for small motor applications. The digital current loop sampling and modulation scheme can be doubled by using asymmetrical PWM scheme since the comparator updates twice in one switching period. Fig. 7 shows the timing diagram of the
PWM generator. Three compare registers Da, Db and Dc are
used to hold the modulating values, and they are constantly compared with the value of the timer counter TCNT. In this way, the output pulse is generated whose on (or off) duration is proportional to the value in the compare registers. The PWM frequency can be determined by the maximum value of TCNT counter and system clock frequency as:
Ha ЀЁЀЀЁЁЀЀЁЁЀЁ ЁЀЀЁЁЀ 0̓ 60̓ 120̓ 180̓ 240̓ 300̓ 360̓ H I II III IV V VI Hc Hb e T signs of Ha, Hb, Hc 12-bit A/D 12-bit
A/D ResetableFIR Filter
Fig. 4. Output waveforms of the linear Hall sensors and sampling mechanism. Table + H + 1 sin MUX Sign Detection Angle Interval Discrimination Ha Hc Hb sign(Ha) sign(Hb) sign(Hc) (I ~ VI) ( , , , , , )0q 60q 120q 180q 240q 300q ( , , , , , )0q 60q 120q 180q 240q 300q e T
Fig. 5. Position detection mechanism.
ABS High Low low-pass filter 1 P 't 1 z 1 1 z limit T ' Z ) (k e T 'Te(k) + _ 1 0 Mux Comparator ABS High Low low-pass filter 1 P 't 1 z 1 1 z limit T ' Z ) (k e T 'Te(k) + _ 1 0 Mux Comparator
Fig. 6. Block diagram of the speed estimator.
Da Upper PWM Lower PWM Deadtime PWM1 PWM2 PWM_period TCNT OFF ON Da Upper PWM Lower PWM Deadtime PWM1 PWM2 PWM_period TCNT OFF ON
Fig. 7. Timing diagram of the PWM generator.
register Less_Than clk Servo Da, Db, Dc 12 12
Mux Upper PWM output
PWM_period 12 bits Up-down Counter Mux 0 1 1 0 00 00 register Lower PWM output A B TCNT
Fig. 8. Hardware circuit of the PWM generator. PWM_in A B deadtime 7 7 7 7 7 7 7 00 00 PWMx D Q D Q Mux 1 0 Mux 1 0 Mux0 1 7-bit Counter clk register register Less_Than
2 u N f f clk PWM (1)
where fclk is the system clock and N is the maximum value of
the counter TCNT. Fig. 8 shows the hardware circuit of the digital PWM generator.
The semiconductors devices used as power switches are not ideal, so they react with a certain delay to the driving signals corresponding to turn-on and turn-off. To avoid short-circuit in any leg of the power inverter, the deadtime should be inserted when a switch is turning on. A 7-bit deadtime generator is implemented, and for a 40 MHz system clock, it can generate a time delay from 0 to 3.2 ȝs. Fig. 9 shows the hardware circuit of the deadtime generator. B. Servo Loop Controller
The servo loop consists of a speed controller and a position controller, and both of them are regulated by the digital PI control law, which is formulated as
] [ ] [ ] [k Pk Ik u (2)
where the proportional term is ) ( ]
[k K ek
P p (3)
and the integral term is
] 1 [ ) ( ] [k K ek Ik I i (4)
where the error term e[k] is the difference between the
command and feedback signals, and Kp, Ki are the
proportional and integral gain, respectively.
Fig. 10 shows the hardware structure of the PI controller. In order to reduce the whole chip size, a scheduling strategy for realizing the PI controller by using finite-state-machine is used. Only one multiplier and one adder are required to execute the PI control. The bit length of the PI controller is
16-bit, and Kp, Ki are in Q-10 format. There are two
saturation limiters in Fig. 10. The anti-windup limit at the output of the integrator is to prevent unwanted overshoot caused by the inertial property of the integrator. The output limit of the PI regulator limits the maximum output command.
C. Field-oriented Torque Controller
Fig. 11 shows the block diagram of field-oriented torque control loop with PI controller. The phase current should be aligned in phase with the back-EMF waveforms so as to
achieve high torque/current ratio. The current command I*
from speed controller is first multiplied by Ha and Hb, then
the PI controller is used to generate the duty Da, Db and Dc,
which will be sent to the PWM generator.
In order to reduce the whole chip size, a scheduling strategy for realizing the field-oriented torque control is i K p K command feedback X Limiter X Limiter + + + + + + + + + -+ -z-1 ] [k out ] [k e ] [k I ] [k P ) (k u
Fig. 10. Hardware structure of the PI controller.
a D b D c D a I b I + + -PI PI -X * I X a H b H
Fig. 11. Block diagram of the current control loop.
- X * I a I X + + Lim ) 1 ( k a ) (k a Lim a H X b I b H X -X X + Lim + Lim ) (k b ) 1 ( k b a D b D c D S0 S1 S2 S3 S4 S5 S6 S7 S8 Idle Idle i K p K i K p K Lim --1 X
Fig. 12. The computation steps of the current control loop.
angle interval discrimination 0̓ 60̓120̓180̓240̓300̓
3
adder
MUX MUXMUX
arcsin table
+ +
a
HHcHbHaHcHb
Mux MuxMUX
a H Hb Hc shift T T hall T
Fig. 13. Hardware structure of the position estimator.
Comparator + -] [k hall T T 'Tlimit ' limit MUX Mux hall Z ] [k hall T ' Reg ] 1 [ k hall T Reg ] 1 [ 'Thall k Multiplier 1nd FIR Filter Reg P T u ' u 1 2880 60
implemented by using finite-state-machine. Only one multiplier and one adder are required to execute the PI control law as shown in Fig. 12.
D. Position and Speed Estimator
Fig. 13 shows the hardware structure of the position estimator with linear Hall sensor signals. The Hall signals are converted from a 12-bit AD converter, and the least two significant bits are truncate to reduce the influence of noise, then the value of Hall signals are from -512 to 511. To estimate the rotor position, a coarse discrimination is made by the sign of the Hall signals, and then a fine discrimination in 0 to 60 electrical degrees is made by a look-up table to estimate the rotor position. A sine-table with 433 points is needed, which is obtained from
443 60 sin
512u q| . (5)
The rotor position in the look-up table is in Q-3 format. The speed is then estimated from
P T k k k hall hall hall 60 2880 ] 1 [ ] [ ] [ 1 u ' u T T Z (6)
where Ȧhall is the estimated speed in rpm, șhall is the
estimated position in Q-3 format, ǻT1 is the sampling time
of speed calculation and P is the number of pole pairs. In (6), the recognizable lowest speed is associated with the sampling time. For a motor with six pole pairs, the lowest calculated speed is 6.944 rpm with 2 kHz sampling time. Fig. 14 shows the hardware structure of the speed estimator.
(elec. degree) (elec. degree) (rpm) (a) (elec. degree) (elec. degree) (rpm) (b)
Fig. 16. Simulation result with non-ideal Hall sensor signals under 1000 rpm (a) with amplitude 102% on Ha, 98% on Hb, and (b) with offset 2% on
Ha, -2% on Hb. .
To verify the position and speed estimator design in VHDL, a co-simulation with Matlab, PSIM and Modelsim is applied. A motor drive system is constructed in Matlab by linking PSIM and Modelsim. Fig. 15(a) and (b) shows the simulation result under constant 1000 and 5000 rpm operation, and the sampling time of the position estimator and the speed calculation is 20 kHz and 2 kHz respectively. The position that the motor rotates during the sampling
period ǻT2 cause the maximum error in the estimated
position. The maximum error is formulated as 360 60 2u 'T P err Z T (7)
where ǻT2 is the sampling period of the position estimator.
The position error is about 1.8° and 9° from (7), as shown in
Fig. 15(a) and (b), and the speed error is 6.944 rpm, that is the lowest recognizable speed. In practical, the three Hall sensor signals are first amplified by analog circuit. Therefore, the amplitude and DC offset of them may be different or with noise. Fig. 16 and 17 shows the position and speed estimation result when the Hall sensor signals are non-ideal.
In Fig. 16(a), the amplitude of Ha and Hb are 102% and 98%
of the idea value; In Fig. 16(b), the offset of Ha and Hb are
2% and -2% of the idea value. Fig. 17 shows the simulation result when there is 5% noise on three Hall signals. Due to that the estimated speed is the differential of the position, the speed estimated error is more obvious than the position error, and thus a low-pass filter is needed to reduce the error. (elec. degree) (elec. degree) (rpm) (a) (elec. degree) (elec. degree) (rpm) (b)
Fig. 15. Simulation result with ideal Hall sensor signals under (a) 1000 rpm and (b) 5000 rpm operation.
(elec. degree)
(elec. degree)
(rpm)
Fig. 17. Simulation results with 5% noise on Hall sensor signals.
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 4900 5000 5100 Time(sec) 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 2900 3000 3100 S p e e d (rp m ) 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 900 1000 1100
Speed from Hall Average Speed from Statistics
Fig. 18. Steady-state speed responses.
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 2000 4000 6000 8000 S pee d(rpm ) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -2 -1 0 1 2 Time(sec) P has e C u rr ent( A )
Speed from Hall Speed Command
(a)
(b)
Fig. 19. Experimental results with Hall sensors under a ramping speed control. (a) ramping speed command and measured speed, (b) phase current responses.
IV. EXPERIMENTAL RESULTS
This PMSM servo control IC has been implemented employing the field programmable gate array (FPGA) technology by an Altera EP1C12F256C8, and the total logic cells are about 4237 of total 12060 (41%). The servo commands and the control parameters in this IC are configured via the serial communication port by a host PC. A program designed by GUI in Matlab is used for system constructers to setup the parameters in this IC.
To test the performance of the servo controller, a DVD spindle PMSM is used and the parameters are in Table I. In the experiment system, the PWM switching frequency is set at 20 kHz, and the sampling rate of the current loop and
servo loop are 20 kHz and 2 kHz respectively. Fig. 18 shows the steady state speed response under speed command 1000, 3000 and 5000 rpm. The estimated speed is compared with the statistics of the average speed calculated from the average frequency of linear Hall sensor in a random period of time. Because the frequency of linear Hall sensor signals is proportional to the motor speed and calculating the frequency is less sensitive to the influence of noise, the speed derived from it is more approximate to the real motor speed. In Fig. 18, the speed ripple is about 70 rpm at low and high speed and the estimated result in the IC is quite similar to the average speed from statistics. Fig. 19 shows the speed response of a ramping speed control from 200 to 7000 rpm with the acceleration rate of 40 rpm per millisecond. Fig. 20 shows the position response under a ramping position control with the acceleration rate of 2 mechanical degrees per millisecond in one revolution. The position control resolution is 0.17 mechanical degree and the following error is about 16 mechanical degree. From this figure, quick transient response and accurate steady-state response can be achieved by using the proposed servo control IC.
V. CONCLUSION
This paper presents the design and implementation of a digital servo control IC for PMSMs with linear Hall sensors. All the control functions are realized by using digital reusable circuitry with a single-chip FPGA device, the Altera EP1C12F256C8. The total logic cells for the designed digital servo IC are about 4237 of total 12060 (41%) and this makes it suitable for low-cost CMOS ASIC implementation. This digital position control IC is configurable with its modular blocks and is programmable with its control registers via a serial interface to fit various applications without complicated software programming as realized by using conventional DSP or microcontrollers. The constructed servo control IC can achieve a control resolution of 0.17 mechanical degree, it also provides a simple and systematic solution for high-performance AC drives for small PMSM motors with linear Hall sensors.
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 1000 2000 A ccu mu la te d R o to r P o s it ion ( elec . degr ee) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 -500 0 500 S peed( rpm ) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 -1 0 1 Time(sec) P h as e C u rr en t( A ) Speed Command Speed from Hall Position Command Position from Hall
1 revolution
(a)
(c) (b)
Fig. 20. Experimental results with Hall sensors under a ramping position control. (a) ramping position command and measured position, (b) speed command and estimated speed, and (c) phase current responses.
TABLEI
PARAMETERS OF THETESTED MOTOR
3-phase permanent magnet synchronous motor
Type Y-connection, 12 poles
Rated voltage 12 V
Stator resistance 0.5 :
Stator inductance 0.102 mH
Back-EMF constant 0.423 mV/rpm
Rotor inertia 1.056u10-6 kg
m2Mech. time constant 0.27 sec
REFERENCES
[1] T. M. Jahns, “Motion control with permanent-magnet AC machines,”
IEEE Proc., vol. 82, no. 8, pp. 1241-1252, Aug. 1994.
[2] Ying-Yu Tzou and Tien-Sung Kuo, “Design and implementation of an FPGA-based motor control IC for permanent magnet AC servo motors,” IEEE IECON Conf. Rec., vol. 2, pp. 943-947, Nov. 1997. [3] Kuang-Yao Cheng, Chen-Yu Wang, and Ying-Yu Tzou, “ASIC
implementation of a programmable servo control IC with digital phase-locked loop,” IEEE PESC Conf. Rec., vol. 2, pp. 558-563, June 2002.
[4] Zhaoyong Zhou, Tiecai Li, T. Takahashi, and E. Ho, “FPGA realization of a high-performance servo controller for PMSM,” IEEE
APEC, vol. 3, pp. 1604-1609, 2004.
[5] Naizheng Cui, Guijie Yang, Yajing Liu, and Pinzhi Zhao, “Development of an FPGA-based high-performance servo drive system for PMSM,” IEEE ISSCAA, pp. 881-886, Jan. 2006. [6] G. M. Raimondi, D. Howe, and P. H. Mellor, “Assessment of
alternative current control methods for brushless permanent magnet motors,” PCIM Proc., pp. 133-140, Nurnberg, Germany, June 1997. [7] H. W. Park, S. J. Park, J. W. Ahn, Y. B. Choo, M. H. Lee, and C. U.
Kim, “A novel optimal excitation scheme of brushless DC motor,”
IEEE ISIE Conf. Rec., pp. 656-660, 1999.
[8] F. Caricchi, F. Giulii Capponi, F. Crescimbini, and L. Solero, “Sinusoidal brushless drive with low-cost linear Hall effect position sensors,” in Proc. IEEE PESC Conf., vol. 2, pp. 799-804, June 2001.