You are on page 1of 6

16th International Middle- East Power Systems Conference -MEPCON'2014

Ain Shams University, Cairo, Egypt, December 23 - 25, 2014

Cost Effective Real Time Embedded Control System for


Interior Permanent Magnet Synchronous Motors
Ahmed M. Omara1, Mohamed K. El-Nemr2, and Essam M. Rashad3
Department of Electrical Power and Machines Engineering
University of Tanta
Tanta, Gharbia 31111, EGYPT
1
Omara.ahmed@yahoo.com, 2nemr_it@yahoo.com, 3emrashad@ieee.org
Abstract - In this paper, a low cost experimental
implementation of a real time speed control system for interior
permanent magnet synchronous motor (IPMSM) is presented.
Such control system requires fast response and suitable digital
features of microcontroller unit (MCU). Moreover, it necessitates
the intrinsic computationally powerful abilities of a digital signal
processor (DSP). Therefore a creative solution is needed in order
to minimize cost. Accordingly, a proper digital signal controller
(DSC) has been selected. It is a microcontroller with DSP engine
that enhances computational abilities. The firmware is developed
in C programming language integrated with assembly
mnemonics. It is optimized to have a good utilization of the DSC
resources with reasonable CPU load. Due to its digital nature,
space vector pulse width modulation (SVPWM) technique has
been adopted and implemented to get variable voltage and
frequency according to scalar control (constant V/f) algorithm.
Motor parameters are experimentally determined for modeling
and performance analysis. The experimental results show that
the proposed drive system has a worthy dynamic response and
well tracking of the speed trajectory in a wide speed range and
in both directions of rotation.
Index Terms - IPMSM, Space Vector Modulation, Constant
V/f Control, Digital Signal Controller, Embedded Systems.

I. INTRODUCTION
Typically, line start permanent magnet (PM) synchronous
motors are designed for constant speed applications to
improve efficiency and power factor compared with using
induction motors or wound rotor synchronous motors [1].
Such a motor has a squirrel cage winding to provide starting
torque to enable direct online starting. This type of PM motor
has different rotor configurations among which, the one shown
in Fig. 1 [2]. The same cage windings also serve to damp rotor
oscillations. Once the motor pulls into synchronism, the cage
windings do not contribute to electrical torque. Detailed
investigation for stability limits of interior permanent magnet
synchronous motor (IPMSM) in the absence of cage windings
has also been performed [3-4].
The speed of this machine is determined by the stator
supply frequency and motor number of poles. Constant speed
operation is desirable in some applications. A case in point is
critical pumping applications such as in nuclear power plants
or in ships [5]. Conversely, most of nowadays applications
require a variable frequency drive system (VFD) to control
speed, position or torque.

Fig. 1: Line start IPMSM rotor configuration

Scalar and vector control are the foremost two techniques


of control of any ac motor. Field oriented control (FOC) and
direct torque control (DTC) are the main two types of vector
control [6-7]. DTC is mainly a sensorless control technique;
however FOC may be sensored or sensorless. Direct and
indirect FOC and sensorless control of the IPMSM motors
have been introduced by many authors, including Lorentz, Sul,
and Rahman, since 2000s [6-10]. However, most of the
practical implementations of IPMSM drive systems use a high
price DSP-based controller kit installed on a personal
computer (PC) to obtain the control actions, in conjunction
with a very high level programming language supported by
model-based design software packages [6-10].
For applications that do not require fast dynamic response
like pumps and fans, using a sensorless technique is preferable
to avoid the cost and difficulty of rotor position feedback.
Moreover, a well-designed control system in addition to the
existence of damper winding in the rotor assure rotor
synchronization with the stator applied frequency, and allows
a stable control of IPMSM using open-loop control. Simple
and low cost scalar (constant V/f )control strategy can be used
instead of the sensorless vector control approaches because of
its good performance in the middle to high-speed ranges [10].
This paper suggests a low cost, and well performed real
time embedded control system for line start IPMSM. There is
no need to use neither a PC nor high price software packages.
A low price digital signal controller (DSC) is used as the
embedded processor. Low cost hardware provides high
performance only using sophisticated implementation
techniques, where know-how presents the added value
compared to hardware expenses. Embedded C program is
designed, developed and optimized using shareware software

16th International Middle- East Power Systems Conference -MEPCON'2014


Ain Shams University, Cairo, Egypt, December 23 - 25, 2014
utilities. The drive system is experimentally implemented,
verified, and validated over a wide speed range.
II. MOTOR MODEL
Line start IPMSM is basically a salient pole synchronous
machine. Unlike conventional synchronous machine, the
saliency is created due to the presence of permanent magnets
in the rotor while air gap is smooth. It is inferred from the
rotor configuration shown in Fig. 1 that, the quadrature axis
inductance is much higher than the direct axis inductance.
This is quite contrary to the wound rotor salient pole
synchronous machine. Such inequality in inductances has a
direct consequence on the operation of the machine. In
addition to synchronous torque another component torque
known as reluctance torque is generated in the machine. The
relationship between quadrature and direct axis inductances is
obtained as:
Lq Ld
(1)
A. Dynamic model
In the d-q coordinates which rotate synchronously with an
electrical angular velocity , the voltage, torque, and motion
equations of line start IPMSM are expressed as follows:
v d R s Lsd p
v L
sd
q
0 L md p

0
0

Lsq
R s Lsq p
0
L mq p

L md p

L md
R kd L rd p
0

L mq i d 0
L mq p i q m

i kd 0
0

R kq L rq p i kq 0

t e P ((Lsd Lsq )i d i q L md i q i kd L mq i d i kq m i q )

J d
P dt

te t l

B. Steady State Model


Using the phasor diagram of IPMSM shown in Fig. 2, the
well-known expression for developed power Pd in a 3-phase
balanced condition is expressed as follows [11]:
2
V ph ( X d X q )
V ph E m

Pd 3( )
sin
sin 2
P Xd
2X d X q

where, Vph is the stator supply voltage per phase, Em is the


excitation voltage per phase, Xd and Xq are the direct and
quadrature (d-q) axis reactances, respectively and is the
phase shift between the Vph and Em voltage phasors.
In dq0 reference frame, developed torque can be
expressed as follows [11]:

T em

3
P md I qs - (Ld - Lq )I qs I ds
2

(6)

where, P is number of poles and md is the permanent-magnet


flux linkage. Ld and Lq are the d-q axis inductances,
respectively. Ids and Iqs are the d-q axis components of the
IPMSM stator current, respectively. The first term of (6) is
due to PM and the second term is due to reluctance variation.
Various torque components are shown in Fig. 3.

(2)

(3)

(4)

The subscripts d and q denote variables in the d- and qaxis, respectively; where:

vd,vq
stator terminal voltages,
id,iq
stator currents,
Rs
stator resistance,
Rkd,Rkq
rotor cage resistances,
Lsd,Lsq
stator self-inductances,
Lmd,Lmq mutual inductances,
Lrd,Lrq
rotor self-inductances,
permanent magnet flux linkage,
m
p
differential operator (d/dt),
number of pole pairs,
P
J
moment of inertia,
B
viscose friction coefficient,
te
electromagnetic developed torque,
tl
load torque.

(5)

Fig. 2: Phasor diagram of IPMSM

Fig. 3: Developed torque (Tem) versus load angle()

16th International Middle- East Power Systems Conference -MEPCON'2014


Ain Shams University, Cairo, Egypt, December 23 - 25, 2014

III. IPMSM DRIVE SYSTEM


The drive system of the adopted line start IPMSM is
shown in Fig. 4. It consists of an IGBT power module, three
phase bridge rectifier, and a capacitor connected in the dc-link.
The uncontrolled rectifier module converts the fixed input
222V ac line-to-line voltage into a fixed 300V dc-link voltage.
The IGBT inverter module is a 1200V, 25 Ampere. It is
controlled to convert the dc bus voltage to an ac output of
variable voltage, and variable frequency.
The torque-speed characteristics of the motor depend on
the type of control. It is necessary to vary the voltage and
frequency to meet the torque-speed requirements. An example
of an independent frequency control in the open loop V/f speed
control shown in Fig. 5. There are two distinct regimes of
operation of an IPMSM: constant torque below base speed and
constant power above base speed, as indicated in Fig. 5. The
base speed is defined as the maximum speed at which rated
torque can be developed with rated current flowing without
exceeding the maximum terminal voltage available from the
inverter. Above that speed, it is possible to maintain constant
power. But it is not possible to develop rated torque without
exceeding the voltage constraint imposed by the power supply.
Any modulation scheme can be used to create the variable
frequency variable voltage ac waveforms.
A. PWM Techniques
There are several techniques for pulse width modulation
(PWM). However, the most commonly used PWM techniques
are sinusoidal PWM, and space vector pulse width modulation
(SVPWM). Traditionally SPWM is used to implement V/f
control using a voltage source inverter (VSI) controlled by a
programmable controller. Easy implementation of SPWM
technique and its minimum online computational requirements
lead to its wide spread. However this modulation algorithm
voltage is less than 90% of the available dc bus supply voltage
(VDC). Moreover, SPWM gives more total harmonic distortion
(THD). To reduce the run time processing load for controller,
three 120 phase shifted sine tables are created and stored in
the controller memory. This is an inefficient usage of the
controller memory. Accordingly, this algorithm does not
facilitate more advanced control techniques [12-14].
SVPWM is a sophisticated averaging algorithm. It gives
15% more voltage output compared to SPWM algorithm.
Thereby, it increases the dc bus supply voltage utilization [13].
It also minimizes the THD as well as switching losses.
A three phase inverter as shown in Fig. 4 must be controlled to
avoid switching-on both switches in the same leg. This
requirement is achieved by the complementary operation of
the switches within a leg. VSI outputs can be in one of two
states: either connected to the positive dc bus rail or the
negative dc bus rail. This leads to eight possible switching
vectors for the inverter, V0 through V7 with six active
switching vectors and two zero vectors. TABLE I lists all the
possible switching states of the VSI and respective line- toline voltages.

Fig. 4: Drive system

Fig. 5: Control topology


TABLE I
VSI SWITCHING STATES AND RESPECTIVE VOLTAGES
Vector

Q1

Q3

Q5

VAB

VBC

VCA

V0{000}
V1{100}
V2{110}
V3{010}
V4{011}
V5{001}
V6{101}
V7{111}

OFF
ON
ON
OFF
OFF
OFF
ON
ON

OFF
OFF
ON
ON
ON
OFF
OFF
ON

OFF
OFF
OFF
OFF
ON
ON
ON
ON

0
+Vdc
0
-Vdc
-Vdc
0
+Vdc
0

0
0
+Vdc
+Vdc
0
-Vdc
-Vdc
0

0
-Vdc
-Vdc
0
+Vdc
+Vdc
0
0

Vectors V1 through V6 are called active vectors, as the


energy is supplied form the inverter to the motor during their
switching states. V0 and V7 are called the inactive or zero
vectors, as no energy is supplied from the supply to the motor
during their switching states. Each switching state can be
represented as a voltage vector in space, as shown in Fig. 6 .

Fig. 6: Space vector hexagon

16th International Middle- East Power Systems Conference -MEPCON'2014


Ain Shams University, Cairo, Egypt, December 23 - 25, 2014
The entire space is divided into six equal sized sectors of
60. Each sector is bounded by two active vectors. Zero
vectors are located at the hexagon origin.
To digitally implement SVM a reference voltage Vref is
sampled with a very high frequency fPWM. This frequency is
high enough so as not to generate audible noise due to
switching. The sampling time Ts for Vref is determined from
fPWM, where Ts = 1/fPWM. The reference vector is then
synthesized using a combination of the two adjacent active
switching vectors and one or both of the zero vectors. Various
strategies of selecting the order of the vectors and which zero
vector(s) to use exist. Strategy selection will affect the
harmonic content and the switching losses.
B. Digital Controllers
Regardless of the selected type of control algorithm , realtime control implementation demand the digital suitability and
fast interrupt response of a microcontroller unit (MCU)
nevertheless require the intrinsic computational abilities of a
digital signal processor (DSP). However, rising integration
capacity allowed development of the digital signal controller
(DSC), a microcontroller with DSP structures that enhance
computational ability, creating a hybrid whose range of
performance and peripheral offerings has exploded.
DSC is a hybrid of MCU and DSP. Like microcontrollers,
DSCs have fast interrupt responses, offer control-oriented
peripherals like PWMs and/or watchdog timers. They are
usually programmed using the C programming language,
although they can be programmed using the device's native
assembly language. On the DSP side, they incorporate features
found on most DSPs such as single-cycle multiply
accumulate (MAC) units, barrel shifters, and large
accumulators. Inclusively DSC combines the processing
power of a DSP and the functionality of a MCU with a
flexible set of peripherals to create a cost-effective solution. In
this way, DSCs are excellent at executing the complex, highspeed mathematical functions required by many real time
control systems. The dsPIC30F2010 family member is a 28pin 16-bit DSC specifically designed for low-cost
applications. It costs only 3.55 USD per unit. The
dsPIC30F2010 provides some key features. It has 30 MIPS
processing performance, Six independent or three
complementary pairs of dedicated Motor Control PWM
outputs, Six-input, 1Msps ADC with simultaneous sampling
capability from up to four inputs, multiple serial
communications: UART, I2C and SPI, Small package for
embedded control applications, and a DSP engine for fast
response in control loops.
Consequently, instead of using high cost DSP controller kit
installed on a dedicated PC, low price DSC can be used.
However, a lot of efforts must be exerted to develop an
efficient software that manage the whole embedded control
system. So it is not anly a matter of hardware technology, it is
also the know-how that compensates high hardware expenses.

IV. IMPLEMENTATION OF IPM EMBEDDED DRIVE SYSTEM


Embedded system is a microcontroller or microprocessorbased computer system with a dedicated function within a
lagrer mechanical or electrical system. It is software-driven,
often with real-time computing constraints. It is embedded as
part of a complete device commonly including hardware and
mechanical parts. To implement a real time embedded control
system for IPMSM, both hardware and software have to be
designed precisely and optimized for energy, code size,
execution time, weight, dimensions, and cost.
A. Hardware Topology
A simplified system block diagram is shown in Fig. 7 , this
embedded hardware topology consists of DSC, gate drive
circuits, current measurement circuit, potentiometer for
reference speed input and bush button for starting and
stopping the controller. The control circuit voltage is limited
to +5V. On the power circuit side the voltage is 300V. The
output from DSC motor control pulse width modulation
(MCPWM) is interfaced with optocoupler circuits.
Potentiometer selects the desired motor speed. For protection
purposes, current feedback is provided through simple shunt
resistors and signal conditioning circuits. All the circuits are
designed and experimentally implemented on printed circuit
boards (PCB).
B. Software Architecture
Main state machine diagram shown in Fig. 8 illustrates how
the motor control software is running. At Power-on Reset, the
software initializes all the software variables and enables all
the peripherals to be used by the embedded control system.
Afterwards, the software enters the Motor Stopped state and
remains there until a start command is executed from the
external push button (Start/Stop pressed). When Start/Stop
button is pressed, the variables used for controlling the motor
are initialized, the timer counters are also initialized to zero,
the interrupt flags are cleared and the interrupts are enabled.
Once the variables have been initialized, the software enters
the Motor Running state, and all other activities within the
state machine are performed by three interrupt service routines
(ISRs).

Fig. 7: Hardware topology

16th International Middle- East Power Systems Conference -MEPCON'2014


Ain Shams University, Cairo, Egypt, December 23 - 25, 2014
VI. EXPERIMENTAL RESULTS AND DISCUSSION

Fig. 8: Main finite state machine

TABLE II summarizes the Interrupt Service Routines,


indicates when they are called and provides a brief description
of the operations executed in each particular ISR. If Start/Stop
button is pressed while the motor is running, all the interrupts
are disabled and the motor is stopped.

In order to assess the suggested system, experimental


measurements have been obtained at different operating
conditions. Fig. 9 illustrates the experimental system
components. The motor speed has been measured using a
tachometer coupled on the motor, while a current transducer
has been used for current measurement. System response to a
step change in speed from 150 r/min to 500 r/min is shown in
Fig. 10, while the motor is loaded with 0.3 N.m load torque.
For a large sudden step change in speed from 500 r/min to
1500 r/min, speed oscillations shown in Fig.11 are limited due
to the presence of cage bars. The speed trajectory is preset in
advance inside the embedded firmware, and the motor tracks it
precisely. The motor current variations are shown in Fig. 12,
and it is depicted that the motor draws a reasonable current
during speed changes.
Software performance measures (e.g., memory usage and
CPU utilization) show how the software is optimally designed.
Program and data memory usage is 1678 and 48 bytes
respectively, which means that there is enough memory
available for code expansion. CPU utilization is also
calculated found to be 63%, this means that the CPU is idle for
37% of time so that more tasks can be added.

V. MOTOR PARAMETERS AND SPECIFICATIONS


Determination of motor parameters is an important task
required for modeling and performance analysis of electrical
machines. The most important parameters to be measured for
the stator are d-axis inductance, q-axis inductance, and stator
resistance. Other important parameters for the rotor are
permanent magnet flux linkage, d-axis squirrel cage
resistance, and q-axis squirrel cage resistance. There are three
purely experimental methods to estimate these parameters [1314].
Applying two of these experimental methods, the
parameters of a three phase, 0.5 Hp, 4 pole, 220 V, 50 Hz PM
motor have been determined as shown in TABLE III.

Fig. 9: Drive system rig

TABLE II
SUMMARY OF INTERRUPT SERVICE ROUTINES
ISR

Calling frequency

Operations performed

A/D
PWM
T1

20 KHz
5 kHz
1 KHz

Reads new reference speed value


Generates sine wave using SVM
Calculate the actual speed

CH II: Speed (500 rpm/div)

TABLE III
LINE START IPMSM MEASURED PARAMETERS
Parameter
Stator winding Resistance, Rs
d-axis Inductance, Ld
q-axis Inductance, Lq
PM Flux Linkage, m
d-axis rotor cage resistance, Rkd
q-axis rotor cage resistance, Rkq

Value
15.613
294.11
515.4
0.4912
16.056
12.44

unit

mH
mH
V.s

CH I: Current (2 A/div)

Fig. 10: Speed change from 500 r/min to 1500 r/min

16th International Middle- East Power Systems Conference -MEPCON'2014


Ain Shams University, Cairo, Egypt, December 23 - 25, 2014

CH II: Speed
(700 rpm/div)

has been used for protection purposes, to protect the motor


from being stalled or drawing very high currents during
transients.
The experimental results shows that motor speed is
following the specified reference speed trajectory without
losing synchronization, and the motor draws a suitable current
from the power supply.
REFERENCES
[1]

CH I: Current
(2 A/div)

[2]

[3]
Fig. 11: Speed change from 150 r/min to 500 r/min
[4]

CH II: Speed
(450 rpm/div)

[5]

[6]

[7]

CH I: Current
(2 A/div)

[8]

[9]
Fig. 12: Speed and current profiles over a wide speed range

CONCLUSION
This paper has presented a detailed cost effective
implementation of a real time embedded control system for a
line start interior permanent magnet synchronous motor
(IPMSM). The embedded control system uses a digital signal
controller (DSC) as its processing power. DSC has both the
advantages of a microcontroller unit (MCU) and also the
computational power of a digital signal processor (DSP).
Together hardware and software have been designed precisely
and optimized for energy, code size, execution time, weight,
dimensions, and cost. Scalar V/f control technique has been
implemented, where variable voltage and frequency have been
obtained by space vector pulse width modulation (SVPWM)
technique.
Measurements of motor speed, current, and voltages have
been obtained using a tachometer, current transducer, and
digital storage oscilloscope respectively. The measured motor
current has been converted to digital value using DSC built-in
analog to digital converter. The digital current feedback signal

[10]

[11]

[12]

[13]

[14]

T. Ding and N. Takorabet, Design and analysis of different line-start


PM synchronous motors for oil-pump applications, Magnetics, IEEE
Transactions on, vol. 45, no. 3, pp. 18161819, 2009.
M. Ehsani, G. Yimin, and S. Gay, Characterization of electric motor
drives for traction applications, Industrial Electronics Society, 2003.
IECON '03. The 29th Annual Conference of the IEEE, vol. 1, Nov.
2003, pp. 891 896.
M. G. Kahrisangi, A. H. Isfahani, S. Vaez-Zadeh, and M. R. Sebdani,
Line-start permanent magnet synchronous motors versus induction
motors: A comparative study, Frontiers of Electrical and Electronic
Engineering, Nov. 2012.
M. Zeraoulia, M. E. H. Benbouzid, and D. Diallo, Electric Motor Drive
Selection Issues for HEV Propulsion Systems: A Comparative Study,
IEEE Transactions on Vehicular Technology, vol. 55, Issue 6, Apr.
2006, pp. 1576 1764.
Deshpande, U.S., 2003. Recent Advances in Materials for Use in
Permanent Magnet Machines: a Review, Proceedings of IEEE Electric
Machines and Drives Conference, IEMDC'03, vol. 1, Jun. 2003, pp.
509-515.
S. Jung, S. Member, and J. Hong, Current Minimizing Torque Control
of the IPMSM Using Ferrari s Method, Power Electronics, IEEE
Transactions on, vol. 28, no. 12, pp. 56035617, 2013.
a. a. Hassan and E. G. Shehata, High performance direct torque control
schemes for an IPMSM drive, Electric Power Systems Research, vol.
89, pp. 171182, Aug. 2012.
W. Peters, O. Wallscheid, and J. Bocker, A precise open-loop torque
control for an interior permanent magnet synchronous motor (IPMSM)
considering iron losses, IECON 2012 - 38th Annual Conference on
IEEE Industrial Electronics Society, pp. 28772882, 2012.
G. Andreescu, S. Member, C. I. Pitic, and F. Blaabjerg, Enhancement
for Wide Speed Range Sensorless Direct Torque Control of IPMSM
Drives, Energy Conversion, IEEE Transactions on, vol. 23, no. 2, pp.
393402, 2008.
M. N. Uddin and M. A. Rahman, High-Speed Control of IPMSM
Drives Using Improved Fuzzy Logic Algorithms, IEEE Transactions
on Industrial Electronics, vol. 54, no. 1, pp. 190199, Feb. 2007.
S. Rabbi and M. Rahman, Analysis of starting and synchronization
process for line start IPM motors, Electrical & Computer Engineering
(ICECE), pp. 311314, 2012.
S. Morimoto, M. Sanada, and Y. Takeda, Performance of PM-assisted
synchronous reluctance motor for high-efficiency and wide constantpower operation, IEEE Transactions on Industry Applications, vol. 37,
no. 5, Sept./Oct. 2001, pp. 1234 1240.
J.-I. Itoh, N. Nomura, and H. Ohsawa, A comparison between V/f
control and position-sensorless vector control for the permanent magnet
synchronous motor, Proceedings of the Power Conversion ConferenceOsaka 2002 (Cat. No.02TH8579), vol. 3, pp. 13101315, 2002.
A. Gupta and A. Khambadkone, A general space vector PWM
algorithm for multilevel inverters, including operation in
overmodulation range, Power Electronics, IEEE, vol. 22, no. 2, pp.
517526, 2007.

You might also like