Design of PM Motor Drive Course and DSP Based Robot Traction System Laboratory
Design of PM Motor Drive Course and DSP Based Robot Traction System Laboratory
Design of PM Motor Drive Course and DSP Based Robot Traction System Laboratory
JPE 10-6-10
Abstract
This paper presents a part of North Africa/Europe collaboration results in education to develop project-oriented courses in
power electronics and motor drive field. The course aims to teach Permanent Magnet motor drives close to a real world project
of significant size and depth so as to be motivational, namely mobile robot project. Particular skills, student will acquire, are
those relative to the detailed design and implementation of PM motor controllers in DSP based rapid prototyping environment.
Simulation work is completed using graphical modeling tools in Simulink/Plecs, while real-time implementation is achieved
by means of eZdspF2812 board and Simulink/TI C2000 Embedded Target tools. This flexible development environment fit the
robot traction system very well and provides exactly the functionality necessary for an efficient PM motor drives teaching as
demonstrated by a set of simulation and experiments.
Key Words: PM motor drives, course, laboratory, project, simulation/implementation, rapid prototyping, TI C2000, sensorless
control.
had to increase or decrease the motor speed in leaps, and course proceeds. In these sessions, students design controllers
open-loop, using four duty cycle levels only. Unfortunately, and investigate the drive responses in different situations, in
the control circuit limitation and the conventional organization regard to some specifications.
of motor drive courses have opposed the curriculum evolution. Moreover, control system design using, Simulink / TI C2000
This paper describes the process and advantage of replacing DSP Embedded Target / Code Composer Studio Link devel-
ST7 system by eZdspF2812 board associated with a rapid pro- opment environment, is also covered.
totyping system for all laboratories coupled with the PM motor The rest of the semester, seven weeks, is devoted to
drive subject. It presents also a summary of the redesigned the implementation of PM motor control techniques using
course. Simulink/TI C2000 and eZdspF2812 prototyping system.
PM motors drives i.e. PM DC, Brushless DC (BLDC) and
Permanent Magnet Synchronous Motor (PMSM) drives share A. Laboratory Design
several points; particularly models and controller designs.
Arranged together in one course, they form very smooth, To ensure the laboratory component is as effective as
progressive and time-saving teaching of motor drives. possible, considerable thoughts were given to their design and
In the previous version of the robot, students developed the implementation.
control algorithm and simulated it in Matlab/Simulink. When Long laboratories around the mobile robot are adopted
the functionality of the algorithm was proven, the algorithm to address many of the problems mentioned in the previ-
was manually implemented in Assembly or C to target the ous section i.e. the laboratory should be motivating and the
specific processor. For each modification the code had to be learning should occur during several unstressed sessions, with
updated and debugged which was very time-consuming. opportunities for reflection and allowing deeper learning. In
At present, Computer Aided Control System Design addition, assessing a significant amount of work, rather than
(CACSD) tools are used to generate real-time code automati- a superficial examination of a small task each session, allows
cally. The general idea is to simplify the programming process a more accurate final picture of student success.
by making it more graphical and thus more intuitive with Three two-week laboratories were planned (TABLE I),
CACSD environment. Consequently, any student familiar with and each consists of four two–hour sessions. Students work
building models in Simulink may test and upload easily real- in groups of two. The lecturer and tutor should minimize
time programs. their interference in the laboratory progress and questions are
answered only if asked.
Recently, more and more companies begin to provide rapid
The three laboratories were based on the power electronics
prototyping system based on CACSD software and commer-
and motor drives involved in the robot. They are supported
cially available hardware.
by two tutorials dealing with rapid prototyping system intro-
To our knowledge, TI C2000 Embedded Target, working in
duction and sensors for motor drives. Each tutorial lasts tow
Simulink environment with eZdspF2812 development board,
session of two-hours. The content of these parts is as follows:
is the best for real-time control of energy conversion systems.
Tutorial l: Introduction to the rapid prototyping system
Until now, several papers using similar rapid prototyping
solutions have been published. But in general, these papers - Steps from the model to the implementation: Simulink, Real
describe specific and small size applications such as: active Time Workshop, Embedded Target for TI C2000 DSP and
power filter [15], Power Factor Boost Rectifier [16], battery Code composer Studio.
charging system [17], DC motor control [18] and DC/DC buck - Design, simulation, implementation and verification of con-
chopper [19]. trol systems on eZdspF2812 target.
This paper presents a set of laboratories for the first semester Tutorial 2: Sensors for motor drives
based on eZdspF2812 rapid prototyping system which is also - Current sensing and signal conditioning to fit the ADC
used for the robot project in the second semester. In all exper- voltage range of eZdsp.
iments, controllers are designed and tested in Simulink/Plecs - Incremental encoder and use of QEP inputs to measure the
environment prior to their implementation using TI C2000 motor speed.
library. This saves tremendous amount of time and helps to - Hall effect sensors and use of CAP inputs to detect Hall
speed up the learning and the implementation of real-time signal edges.
applications, besides reducing the hardware cost. Lab. 1: PM DC motor control
- DC motor parameters identification.
II. G ENERAL L AYOUT OF THE C OURSE - DC-DC Converter control implementation and open-loop
The course is conducted in 15 weeks of the first semester operation of the motor.
with four hours of faculty/student contact per week. Since - Motor speed control based on speed step response identifi-
it is part of project-oriented course, the former eight weeks cation.
are devoted to regular classes, in which the motor drive - Cascade current/speed control.
fundamentals and simulations, in addition to DSP software Lab. 2: BLDC motor control
development, are presented. - Brushless motor parameters identification.
During lectures the motor and drive fundamentals are cov- - Speed estimation using the motor Hall effect sensors.
ered. Several simulation sessions are planned for each drive as - Control logic implementation.
Design of PM Motor Drive Course and DSP Based Robot Traction System Laboratory 649
TABLE I
C HRONOLOGICAL OUTLINE OF THE COURSE / LABORATORY III. L ECTURES O UTLINE AND M ATERIAL
For stimulating interest in the topic, PM motor drives
Weeks Topics
W 1-2 Lecture and Simulation: PM DC motor control involvement in industrial applications is exposed [2]. Then,
W 3-4 Lecture and Simulation: BLDC motor control details of PM motor modeling and drive structures are pre-
W 5-7 Lecture and Simulation: PMSM control sented. Fig. 1 illustrates general drive structure.
W8 Tutorial 1: Rapid prototyping system introduction
The key idea through this course is to demonstrate that the
W9 Tutorial 2: Sensors for motor drives
W 10-11 Lab. 1: PM DC motor control control of Brushless motors can be reduced to a DC motor
W 12-13 Lab. 2: BLDC motor control control subject.
W 14-15 Lab. 3: Sensorless PMSM Field Oriented Control Essentially, the problematic is associated with the torque
quality, the speed control accuracy and the drive efficiency.
- Power electronics commutator implementation and open- Thus, the material presented in the lectures focuses on:
loop operation of the motor.
- Cascade current/speed control.
A. PM DC Motor Drive
Lab. 3: PMSM Field Oriented Control
The advantages associated with the inherently stable and
- Current Vector Control implementation for RL load.
relatively simple to control DC machine are indisputable.
- Position estimation using the motor Hall effect sensors.
Closed-loop speed control of PM DC motor:
- Sensorless Field Oriented Control of PMSM.
The controller design is very simple. However, the current
The laboratory tasks are increasingly complex, and match is not controlled.
the progression of material presented in the lectures. Cascade current/speed control of PM DC motor:
Chronological outline of the course/laboratory is presented As shown in Fig. 2, two control loops are used i.e. the
in TABLE I. current (or torque) and the speed loops. The controllers are
During the next semester, students work on the project that designed using linear control theory. This diagram forms the
is the complete design of robots with PM motorization using basis of all PM Motor control schemes of this course.
one of the three presented PM motor drives to deal with
competition rules and constraints.
Besides power electronics and motor drives, there are also B. BLDC Motor Drive and Trapezoidal Commutation
other aspects addressed in this project i.e. optical and mag- BLDC motors can be controlled exactly in the same way as
netic sensors, instrumentation and robot motion control. The a DC motor without presenting brushes drawback.
description of this project is outside the scope of the paper. Current commutation in BLDC motor:
As the back-emf of the motor is trapezoidal, the fed current
B. Sensorless Motor Drive Introduction should be also trapezoidal.
Hall effect sensors are required for the current commutation.
Over the past several years, various advanced sensorless They define 6 sectors for phases feeding.
controls of Permanent Magnet Synchronous Motors have been From the relationship between the phase current and the
developed for industrial drives due to their high power density back-emf shapes, the control logic linking the power switch
and high performance. It is highly desirable to eliminate me- states to Hall effect signals can be elaborated.
chanical sensors in order to reduce costs, save mounting space, Control of BLDC motor:
and improve mechanical robustness and system reliability, At any time there are only two power switches conducting
which is crucial for many applications. current and connecting the source to phases.
Recently, PMSM sensorless drives have been increasingly The model of the BLDC motor is a simple duplicate of the
applied into home appliances [20], automotive [21], aerospace DC motor model of Fig. 2. Consequently, the controller design
actuators [22], medical robotics [23] and many other field. procedure is exactly the same.
Introduction of sensorless control of electric machines in
education has then become a real necessity. However, when
reviewing papers published on this field it is evident that there C. PMSM Drive and Sinusoidal Commutation
has not been so many published, especially for undergraduate In this part, it’s pedagogically very effective to point out
level. This is most likely due to that sensorless techniques that the PMSM can be seen as a BLDC motor with extremely
are mainly investigated as research topic and not so much in precise control of the rotor angle. Sinusoidal commutation is
education. used in this case and higher resolution position sensor such as
The present laboratory suggests investigating a simple speed optical encoder is necessary.
and position estimation method based on Hall effect sensors. PMSM Control in a-b-c reference:
Similar methods are, already, applied to sensorless control To produce smooth torque; the fed current waveform should
of in-wheel motors for Electric Vehicle traction or to other match the sinusoidal back-emf shape of the machine. This is
applications [25],[26]. easier to demonstrate in a-b-c reference.
To derive the mechanical measurement, this technique Two particular control strategies are then considered:
makes use of Hall effect signals and mathematical prerequisite Strategy 1: Maximum torque at given current magnitude.
only. It could be easily implemented using the rapid prototyp- The stator current is in phase with the back-emf. The motiva-
ing environment. tion is to reduce Ri2 losses in the motor.
650 Journal of Power Electronics, Vol. 10, No. 6, November 2010
Fig. 2. Block diagram of the DC motor model with current and speed
Loops. circuit is built by using Simulink blocks. Especially, ‘Repeat-
ing Sequence’ block is used to generate carrier based PWM
Strategy 2: Unit power factor. The stator current and for voltage modulation.
voltage are in phase. The motivation is to minimize the power This laboratory starts by a preliminary simulation of an
electronics converter design. open-loop motor operation. In this experience, the points to
PMSM Field Oriented Control in d-q reference: highlight, particularly, are the disadvantages of this operation
d-q reference control is introduced using Park transforma- mode:
tion. Attention is focused on the strategy 1. To force the - Free speed response that depends on motor and mechanical
strategy goals, two PI controllers are used: the first control d- system parameters.
current to be zero and the second control q-current to produce - Speed variation with voltage and load disturbances.
the required torque. A speed controller is inserted in the q-axis. - Staring and transient destructive peak current.
Adequate compensation and decoupling results in a model Closed-loop speed control of PM DC motor:
identical to a DC motor. The control system here consists of only one PI speed
The following sections give details on the simulation and feedback. A properly designed feedback controller makes
implementation of PM motor drives. the system faster and insensitive to the parameter and load
changes. However, the peak current arising at the startup
IV. S IMULATION MODELS AND RESULTS is still dangerous and this problem cannot be avoided here
appropriately. This scheme simulation is not presented here.
The programs used to complete the simulations are Simlink Cascade speed/current control of PM DC motor:
and Plecs, sub programs of Matlab. Simulink is adopted for To resolve the three defects of an open-loop operation at
simulation since it’s a control systems oriented environment the same time, it’s necessary to incorporate the speed and the
[4] and it supports the used Texas Instrument kit. current control as shown in Fig. 4. The drive performance
Plecs is a toolbox for simulation of power electronics and becomes very satisfactory (Fig. 5). Note that current limitation
machine systems within Simulink environment. This software can be used here to stop the motor drawing more than its rated
is preferred for this course because it provides a compre- current.
hensive block library and allows very simple and realistic
simulations of electrical circuits.
B. BLDC Motor Drive Simulation
During the next section, simulation models, power circuits
as well as some relevant results will be presented. The Plecs circuit includes a bipolar BLDC Motor supplied
The objective of the control schemes will be to get zero by three-phase Full Bridge inverter. After building the power
steady-state error and good closed-loop dynamic. circuit, students have to accomplish the following tasks:
The PM motors used in this paper have the parameters 1) Reconstitution of Hall effect signals using the available
given in TABLE II. The BLDC motor parameters are used rotor angle (Hall signals Generator).
to simulate both Brushless DC motor and PMSM. 2) Composition of control logic block including PWM.
The complete Simulink model is presented in Fig. 6.
Open-loop operation of BLDC motor:
A. PM DC Motor Drive Simulation
In a first basic simulation, the motor speed is changed using
The Plecs circuit includes a PM DC Motor supplied by the DC link voltage without any modulation. This experience
MOSFET Full-Bridge DC/DC Converter (Fig. 3). The control reveals the perfect similarity between DC and BLDC Motors.
Design of PM Motor Drive Course and DSP Based Robot Traction System Laboratory 651
TABLE II
PARAMETERS OF THE M OTORS
(a) (b)
Fig. 10. (a) DC motor and BLDC motor based robot (right and left respectively).
The first platform is connected to the eZdspF2812 board via an optocoupler/conditioning board.
(b) Full-Bridge DC/DC converter and 3-phase Full-Bridge inverter (right and left respectively).
Fig. 11. Speed and its associated fit following an open-loop voltage step Fig. 12. Block diagram of the Hall Effect sensor based estimator.
change.
The encoders are usually mounted on the end of a gearbox. The electric angular position can be obtained by numerical
However, in the used BLDC motors only Hall sensors are integration of (5), under the constraint that the resulting angle
provided. In consequence, sensorless speed estimation method value has to be within the sector k limits.
is necessary to complete the outer loop. The angular position is, thus, calculated as
Without encoder, the speed can be measured using Hall
signal interrupt [24]. The angle between two consecutive Hall θ (t) = θk + Ωk (t − tk ), θk ≤ θ (t) ≤ θk + π 3. (6)
signal edges is 60 degrees by construction. Using a Timer Ωk is here the angular speed when the magnetic axis
peripheral, the time Thall between two consecutive Hall edges enters sector k ; it’s obtained from the speed estimator block
are measured and speed can be computed as: presented in the previous section.
π The Fig. 12 shows the block diagram of the position and
Ω = 3 rad.s−1 . (4) speed estimation technique and Fig. 13 illustrates the 0th order
Thall (stairs line) and the 1st order (straight line) position estimates
This algorithm is implemented within the ‘Speed estimator’ which are synchronous to Hall signal Ha edge.
block of the Fig. 17 model, adding an LP-filter. The overall sensorless Field Oriented Control scheme, with
In addition to the speed estimator and controller, the control speed and position estimator, is shown in Fig. 18.
system of the BLDC motor involves a current controller and By driving the motor with sinusoidal current commutation,
commutation logic that use Hall sensor feedback (Fig. 17). less frequency harmonics are presents in the current waveform
The measured current in this experiment is the DC link one. as shown is Fig. 24; thus an immediate reduction in power
The results presented in Fig. 22 depict respectively: DC losses occurs. As a result, larger torque is produced for
link and phase currents in the motor open-loop operation. the same RMS current. Sinusoidally driven motors also gain
The measure window shows a duty cycle transition from 1, reduced torque ripple.
which means no PWM is applied, to 0.5 with reduced voltage. Moreover, these experimental results testify that the first
The particular six-step phase current and trapezoidal voltage strategy objectives with the Field Oriented Control are reached.
waveform, characteristic for BLDC motor commutation, are Notice the d-current, which is kept null in order to make good
clearly shown in this figure. use of the current in producing torque.
Other experimental results related to speed acceleration The last Fig. 25 confirms the ability of the Hall effect
from 2000 rpm to 4000 rpm are presented in Fig. 23. The based estimator to replace encoder in sensorless control during
speed reference tracking is perfect without any overshoot. dynamic operation of the drive. The motor operates correctly
As the motor is geared, the actuator inertia is weak and and the actual speed flows accurately the simulated speed.
the motor drive doesn’t draw large current during transient
operations. Consequently no current limitation is necessary in VI. S TUDENTS F EEDBACK
this case.
During the last year, we have used this course and rapid
prototyping tool to teach a group of 22 undergraduates PM
E. Sensorless PMSM Field Oriented Control Motor drives and their real-time DSP implementation concept.
As can be seen in Fig. 18, Field Oriented Control consists of We noticed that three groups from 11 were able, within the
two nested loops. The first loop controls the stator currents in given time, to complete the laboratory tasks and to explore
the d-q reference frame and thus the torque, while the second more challenging topics like those linked to regenerative
loop controls the motor speed. control of PM DC motor or PMSM Field-Weakening control.
For this control scheme, the measured input signals are the Though framed, these long laboratories can generate favorable
rotor position and two of the stator phase currents. environment for initiative and creativity.
Typical examples of position sensors that can be used are The students start the second semester project, after the
resolvers, incremental encoders or absolute encoders. completion of the presented course, when they have gained ad-
In the absence of optical encoder, suitable strategies must equate theoretical knowledge from lectures and experimental
be developed to determine the rotor position. Here again, skills from the laboratories designed around the robot platform.
digital signal processing of Hall sensor outputs is an alternative Some students affirm that, in the early stages of this course,
solution to estimate the rotor position [24]. The Hall Effect they had already felt involved in the robot project.
sensors detect when the rotor magnetic axis enters a new 60◦ From the students response also, they can easily handle the
sector. rapid prototyping system for the construction of different drive
The electric angular position is generally given by: structures, data acquisition and scaling as well as for controller
Z t implementation.
θ (t) = Ω(t) dt + θk (5) Furthermore, they can actually connect real platform to the
tk
eZdspF2812 board and see how the drives behave in real-time.
tk is the instant when the magnetic axis enters sector k (k=1, The introduction, of Hall effect based sensorless technique
2,. . . , 6). has upgraded the laboratory to a new motor drive technology.
θk is the initial angle of sector k. It is equivalent to a zeroth- Nevertheless, the technique could be quickly implemented so
order position estimation obtained by taking into account only that students are kept focusing on the main topic i.e. motor
the 0th order term of an approximated Taylor series expansion. drives.
656 Journal of Power Electronics, Vol. 10, No. 6, November 2010
Fig. 19. Experimental speed step response of speed controlled DC motor. Fig. 20. Experimental speed step response of cascade speed/ current
controlled DC motor without current limitation.
Fig. 22. Duty cycle transition from 1 to 0.5 in open-loop control of BLDC
motor.
Fig. 25. Test of the dynamic performance of the estimation method and
the sensorless PMSM drive.
658 Journal of Power Electronics, Vol. 10, No. 6, November 2010
Bruno Dehez received the degree in electromechanical Eric Richard , received his engineer Diploma from
engineering and the Ph.D. degree from the Universit ‘Ecole Nationale Supérieure des Télécommunications’,
catholique de Louvain (UCL), Louvain-la-Neuve, Bel- France, in 1978. Since 2002, he has been a Research
gium, in 1998 and 2004, respectively. Since 2006, he Engineer at the Institut Supérieur de l’Electronique et
is associate professor in the Centre for Research in du Numérique (ISEN)-Toulon, in charge of electronics
Mechatronics at UCL. His research interests include service. He is also a research member of Circuits De-
the design and the optimization of dedicated electrical sign Team at the Institut Matériaux Microélectronique
actuators. Nanosciences de Provence ‘IM2NP’. His research fo-
cuses on the microelectronics and electronics applica-
tions to analog and digital signal processing.