You are on page 1of 25

RENESAS

Field Oriented Control


Application Note
Hamid KHAN

2008
ABSTRACT
AC induction motors of different power ratings and sizes can be utilized in
applications ranging from consumer to automotive goods. A few of these applications
from the multitude of possible scenarios demand for high speeds while high torque at
low speeds only. A common everyday example with these mechanical requirements
is of the motor installed in a washing machine. This requirement can be addressed
through Field Oriented Control or the FOC of an Induction machine.

The objective of this Application Note is developing and implementing an efficient


Field Oriented Control (FOC) algorithm that could be implanted on Renesas SH7125
microcontroller to control the speed and torque of three phase asynchronous motors
more effectively and efficiently.

FOC: Field Oriented Control principles applied to an asynchronous motor are based
on the decoupling between the current components used for generating magnetizing
flux and torque. The decoupling allows the induction motor to be controlled as a
simple DC motor. The field oriented control implies the translation of coordinates
from the fixed reference stator frame to the rotating synchronous frame. This
translation makes possible the decoupling of the stator current into two components,
which are responsible for the magnetizing flux and the torque generation.

Hamid KHAN
2
CONTENTS

Introduction ................................................................................................................. 5

1. Background .......................................................................................................... 6
1.1. AC Induction motor ........................................................................................ 6
1.1.1. Induction Machine Electrical Equations .................................................... 7
1.2. Three Phase Induction Motor ......................................................................... 7

2. Vector Control of Induction Machines ................................................................... 8


2.1. Introduction .................................................................................................... 8
2.2. FOC ............................................................................................................... 8
2.2.1. FOC Theory ............................................................................................. 9
2.3. The FOC Algorithm ...................................................................................... 11

3. MATLAB simulation of FOC ................................................................................ 12


3.1. Introduction .................................................................................................. 12
3.2. System Overview ......................................................................................... 12
3.3. Block FOC .................................................................................................... 12
3.3.1. Flux Estimator ........................................................................................ 13
3.3.2. Calculation ........................................................................................ 13
3.3.3. Park Transformation ............................................................................... 13
3.3.4. Inverse Park Transformation .................................................................. 13

3.3.5. Calculation ........................................................................................ 13
3.3.6. Flux PI .................................................................................................... 13
3.3.7. Current Regulator ................................................................................... 13
3.4. SIMULINK model of FOC ............................................................................. 15
3.4.1. SIMULINK Block FOC ............................................................................ 16
3.5. SIMULINK sub FOC bocks .......................................................................... 16
3.6. FOC Simulation Results ............................................................................... 18

4. FOC Speed Regulator ........................................................................................ 20


4.1. Introduction .................................................................................................. 20
4.2. MATLAB simulation of FOC Speed Regulator ............................................. 20
4.2.1. Speed Controller .................................................................................... 20
4.2.1.1. Flux Table ............................................................................................ 21
4.3. FOC Speed Regulator Simulation Results ................................................... 22

Conclusion ................................................................................................................ 24

Reference.................................................................................................................. 25

Hamid KHAN
3
LIST OF FIGURES
Figure 1 : Classification of Electrical Motors................................................................ 6
Figure 2 : Phasor Diagram describing FOC Scheme .................................................. 9
Figure 3 : Complete Schematic Diagram................................................................... 12
Figure 4 : Block FOC ................................................................................................. 12
Figure 5 : Operational Principle of Hysterysis Modulation ......................................... 14
Figure 6 : Typical Hysterysis Current Controller ........................................................ 14
Figure 7 : Current Controller Bandwidth Hysterysis ................................................... 15
Figure 8 : Simulink Model of FOC ............................................................................. 15
Figure 9 : Block FOC ................................................................................................. 16
Figure 10 : Flux Estimator ......................................................................................... 16
Figure 11 : Flux Orientation Calculation .................................................................... 17
Figure 12 : Flux PI ..................................................................................................... 17
Figure 13 : i Calculation .......................................................................................... 17
Figure 14 : Current Regulator .................................................................................... 17
Figure 15 :Result FOC 1 ........................................................................................... 18
Figure 16 :Result FOC 2 ........................................................................................... 18
Figure 17 :Result FOC 3 ........................................................................................... 19
Figure 18 : FOC with Speed Controller ..................................................................... 20
Figure 12 : Speed Controller Block............................................................................ 21
Figure 21 : Result Speed Regualation 1 .................................................................... 22
Figure 22 : Result Speed Regualation 2 .................................................................... 22
Figure 23 : Result Speed Regualation 3 .................................................................... 23
Figure 24 : Result Speed Regualation 3 .................................................................... 23

Hamid KHAN
4
Introduction

AC Induction motors offering desirable operational characteristics such as


robustness, reliability and ease of control; are extensively used in various
applications ranging from industrial motion control systems to home appliances.

Until a few years ago the AC motor could either be plugged directly into the mains
supply or controlled by means of the well-known scalar V/f method. When power is
supplied to an induction motor at the recommended specifications, it runs at its rated
speed. With this method, even simple speed variation is impossible and its system
integration is highly dependent on the motor design (starting torque vs. maximum
torque, torque vs. inertia, number of pole pairs). However many applications need
variable speed operation. The scalar V/f method is able to provide speed variation
but does not handle transient condition control and is valid only during steady state.
This method is most suitable for applications without position control requirements or
the need for high accuracy of speed control and leads to over-currents and over-
heating, which necessitate a drive which is then oversized and no longer cost
effective.

The last few years have seen rapid growth in the field of electrical drives. This
growth can be attributed mainly to the advantages offered by semiconductors in both
power and signal electronics; hence giving rise to powerful microcontrollers and
DSPs. These technological improvements have allowed the development of very
effective AC drive controls marked with lower power dissipation hardware and
increasingly accurate control structures. Using three phase current and voltage
sensing has made the electrical drive controllers even more accurate.

This application note describes the efficient scheme of vector control - the Field
Oriented Control (FOC). On application of this control structure to an AC machine,
with a speed/position sensor coupled to the shaft, the AC machine acquires every
advantage of a DC machine control structure i.e. a very accurate steady state and
transient control along with higher dynamic performance.

Hamid KHAN
5
1 Background

Electric Motors

AC DC

Asynchronous Synchronous

Brushless DC
Induction
Sinewave

Squirrel Cage Hysteresis


Wound Motor
Step

Reluctance

Figure 1: Classification of Motors

1.1 AC induction motor


The AC induction motor is a rotating electric machine designed to operate from a 3-
phase source of alternating voltage. Asynchronous motors are based on the
induction principle. The extreme simplicity and ruggedness of the squirrel cage
construction are outstanding advantages of this type of induction motor which make
it by far the most commonly used type of motor. In these types of induction motors
aluminium conductors or bars are cast into slots in the outer periphery of the rotor.
These conductors or bars are shorted together at both ends of the rotor by cast
aluminium end rings. For variable speed drives, the source is normally an inverter
that uses power switches to produce approximately sinusoidal voltages and currents
controllable in terms of frequency and magnitude.

Like most motors, an AC induction motor has a fixed outer portion, called the stator
and a rotor that spins inside, with a well-optimized air gap between the two. All
electrical motors except a three phase induction motor use magnetic field rotation to
spin their rotors. In a three phase AC induction motors the rotating magnetic field is
generated in the stator by virtue of the nature of the supply.

In an AC induction motor, one set of electromagnets is formed by virtue of the AC


supply connected to the stator windings. As per the Lenzs law the alternating nature
of the supply voltage induces an Electromagnetic Force (EMF) in the rotor (just as
voltage is induced in the secondary transformer), thus generating another set of
electromagnets; hence the name induction motors. Interaction between the
magnetic fields produced by these two electromagnets a revolving force or torque is
generated, causing the motor to rotate in its own direction.

Hamid KHAN
6
1.1.1 Induction Machine Electrical Equations

= + +


= +


0 = + + ( )


0 = + ( )

3
= ( )
2

Where

= +

= +

= +

= +

1.2 Three-phase induction motor


Three-phase AC induction motor are widely used in many fields. They are classified
in two categories:

 Squirrel cage motor


 Wound-rotor motor

90% of the three-phase AC Induction motors are squirrel cage motors because of
their lower cost and higher capability of starting heavier loads in comparison with
wound-rotor motors. Induction motors with power ratings ranging from one-third to
hundred horsepower can be commonly found.

The wound-rotor motor is a variation of the squirrel cage induction motor. While the
stator construction is same as that in the squirrel cage type motor, the rotor has a set
of windings on the rotor which are not short circuited, but are terminated to a set of
slip rings. These are helpful in adding external resistors and contactors.

Hamid KHAN
7
2 Vector Control of Induction Machines
2.1 Introduction

The construction of a DC machine is such that the field flux is perpendicular to the
armature flux. Being orthogonal, these two fluxes don not interact with each other.
Hence by adjusting the field current the DC machine flux can be controlled and
independent to this the torque can be controlled by varying the armature current. But
the control of an AC machine is not as simple because of the interactions between
the stator and the rotor fields owing to their non orthogonal orientations to each other
and varying orientations as per the operating conditions. A DC machine-like
performance can be attained by maintaining a fixed orthogonal orientation between
the field and armature fields in the AC machine. This can be achieved by orienting
the stator current with respect to the rotor flux in a manner such that independent
control of flux and torque is established. Flux Oriented Control or the Vector Control
works on this principle. Vector control can be applied on both induction and
synchronous motors. In this document the application of flux oriented vector control
on induction motors has been elaborated.

Vector control entails varying not only the magnitude but also phase of the variables.
Control quantities have been expressed in terms of matrices and vectors. This
method takes into account not only successive steady-states but real mathematical
equations that describe the motor itself, so that the obtained results have a better
dynamic for torque variations in a wider speed range.

The Field Oriented Control (FOC) offers a solution to circumvent the need to solve
high order equations with a large number of variables and nonlinearities and achieve
an efficient control with high dynamic.

This approach needs more calculations than other standard control schemes but has
the following advantages:
 full motor torque capability at low speed
 better dynamic behaviour
 higher efficiency for each operation point in a wide speed range
 decoupled control of torque and flux
 short term overload capability
 four quadrant operation

2.2 FOC

FOC involves controlling the components of the motor stator currents, represented
by a vector, in a rotating reference frame (with a d-q coordinate system). In a special
reference frame, the expression for the electromagnetic torque of the smooth-air-gap
machine is similar to the expression of torque in a separately excited DC machine. In
the case of induction machines, the control is normally performed in a reference
frame aligned to the rotor flux space vector. To perform the alignment on a reference
frame revolving with the rotor flux requires information about the modulus and the
space angle (position) of the rotor flux space vector.

Hamid KHAN
8
In order to estimate the rotor flux vector either of the below mentioned strategies can
be adopted:

 DFOC (Direct Field Oriented Control) -


In this strategy rotor flux vector is either measured by means of a flux sensor
mounted in the air-gap or by using the voltage equations starting from the
electrical machine parameters.

 IFOC (Indirect Field Oriented Control)-


In this strategy rotor flux vector is estimated using the field oriented control
equations (current model) requiring a rotor speed measurement.

The usual terminology Sensorless signifies that no position/speed feedback


devices are used.

2.2.1 FOC Theory


Considering the d-q model of the induction machine in the reference frame rotating
at synchronous speed ,

The field-oriented control implies that the component of the stator current would
be aligned with the rotor field and the component would be perpendicular to .
This can be accomplished by choosing as speed of the rotor flux and locking the
phase of the reference frame system such that the rotor flux is aligned precisely with
the d axis, as illustrated in Figure 2 below.

e dr = r
q-axis qr = 0 e
iqs
r d-axis
is r

r
ids
Rotor Reference Frame
sl
f = r + sl
r f

Stator Reference

Figure 2: Phasor diagram describing the FOC scheme

From Figure 2 it can be established that -


= 0 =0

Hamid KHAN
9
And =

Hence the flux equation gets reduced to:

Lm
r = (ids ) (Equation used for estimating the flux.)
1 + Tr s

And torque can be expressed as:



= ( )

Following which the expression for can be reduced to:

3
= ( )
2

Which can be also expresses as:

= , this equation is used to calculate the stator current torque component i*qs.

Hence the analogy with DC machine performance is clearly established, while


keeping the flux constant. The electric torque is found proportional to the
component, and the flux and component of current can be related through a

first-order linear transfer function with a time constant .

The rotor flux orientation in a squirrel-cage induction machine cannot be measured


easily. It can be only estimated from terminal measurements. An alternative way is to
use the slip relation derived above to estimate the flux position relative to the rotor,
as shown.

The IFOC technique is described in this application note. Indirect vector control of
the rotor currents can be implemented using the following data:
 Instantaneous stator phase currents, ia, ib, and ic
 Rotor mechanical speed

To monitor the three-phase stator currents and speed, the motor must be equipped
with sensors and a speed feedback device such as a tachometer respectively.

Hamid KHAN
10
2.3 The FOC Algorithm

An abbreviated version of the FOC (or vector-control) algorithm is summarized


below:

1. Measure the stator phase currents ia, ib and ic. If only the values of ia and ib are
measured ic can be calculated as for balanced current ia + ib + ic = 0.

2. Transform the set of these three-phase currents onto a two-axis system. This
conversion provides the variables i and i from the measured ia , ib and ic values
where i and i are time-varying quadrature current values, as viewed from the
stators perspective. This conversion is popularly known as Clarke
Transformation.

3. Calculate the rotor flux and its orientation.

4. Rotate the two-axis coordinate system such that it is in alignment with the rotor
flux, using the transformation angle calculated at the last iteration of the control
loop. This conversion provides the id and iq variables from i and i. This step is
more commonly known as the Park Transformation.

5. Flux error signal is formed using flux reference and estimated flux value. A PI
controller is then used to calculate i*d using this error signal. i*q is generated using
the reference torque value and the estimated flux value.

6. i*d and i*q are converted to a set of three phase currents to produce i*a, i*b, i*c.

7. i*a, i*b, i*c and ia, ib, ic are compared using hysterysis comparator to generate
inverter gate signals.

Hamid KHAN
11
3 MATLAB Simulation of FOC
3.1 Introduction

To validate the algorithm developed, it was tested on MATLABs simulation tool


SIMULINK, a powerful simulation software with many inbuilt blocks which proved
very helpful in forming a complete model.

3.2 System Overview

The motor to be controlled is in a close loop with the FOC block which generates
inverter switching commands
command to achieve the desired electromagnetic torque at the
motor shaft. ud
r*
Gate
* FOC Signal ASIM
s
m

iabc

Fig
Figure 3: Complete Schematic Diagram

3.3 Block FOC

r* PI *
i
ds *
r Flux Controller i
Inverse Park abc

* Transformation
*
i
Current
Gate
dq
r Signal
Calculation Regulator
f

i qs
i abc Park f

Transformation
r Calculation
i ds Flux Estimator

f m

Figure 4: Block FOC

Hamid KHAN
12
3.3.1 Flux Estimator

This block is used to estimate the motor's rotor flux. This calculation is based on
motor equation synthesis.

Lm
r = (ids )
1 + Tr s

3.3.2 Calculation

This block is used to find the phase angle of the rotor flux rotating field using the
following equations.

= + From which it can be established that,


= +


Which can also be written as? = +

Therefore,


= ( + ) With =

3.3.3 Park Transformation

This block performs the translation of the a,b and c phase variables into dq
components of the rotor flux rotating field reference frame.

3.3.4 Inverse Park Transformation

This block performs the conversion of the dq component of the rotor flux rotating
field reference frame into a,b and c phase variables.

3.3.5 Calculation

This block uses the calculated rotor flux and the torque reference to compute the
stator current quadrature component required to produce the electromagnetic torque
on the motor's shaft.

3.3.6 Flux PI

This block compares the estimated rotor flux and the reference rotor flux as the input
to a Proportional Integrator which calculates the flux to be applied to the motor which
in turn is used to compute the stator current direct component required to produce
the required rotor flux in the machine.

Hamid KHAN
13
3.3.7 Current Regulator

The current regulator is a bang-bang current controller with adjustable hysteresis


band width.

Modulation Technique Used


The hysteresis modulation is a feedback current control method where the motor
current tracks the reference current within a hysteresis band. Figure 5 elaborates the
operation principle of the hysteresis modulation. The controller generates sinusoidal
reference current of desired magnitude and frequency which then is compared to the
actual motor line current. If current exceeds the upper limit of the hysteresis band,
the upper switch of the inverter arm is turned off and the lower switch is turned on.
As a result, the current starts to decay. If the current passes the lower limit of the
hysteresis band, the lower switch of the inverter arm is turned off and the upper
switch is turned on. As a result, the current gets back into the hysteresis band.
Hence, the actual current is forced to track the reference current within the
hysteresis band.

Figure 5: Operation Principle of Hysteresis Modulation

Figure 6 details the hysteresis current control modulation scheme, consisting of three
hysteresis comparators, one for each phase.

Figure 6: Typical Hysteresis Current Controller

Hamid KHAN
14
Current controller hysteresis band

The current hysteresis bandwidth refers to the total bandwidth distributed


symmetrically around the current set point. Figure 7 illustrates a case where the

current set point is and the current hysteresis bandwidth is set to .


2



2

Figure 7: Current Controller Hysteresis Bandwidth

3.4 SIMULINK model of FOC

Figure 8: Simulink Model of FOC

As detailed in Figure 8 the Simulink Model of FOC consists of three blocks:

 The green colour represents the already existing SIMULINK models of the
hardware used to implement the FOC scheme namely the motor and the
inverter.
 Blocks in orange represent probes used for current acquisition and to
observe the electromagnetic Torque.
 The blue block is the software i.e. the FOC algorithm to be implanted in the
microprocessor.
 The reference values of torque and flux are in red.

The file paramfoc.m contains all the machine and control parameters used in the
FOC block, namely:

Machine Parameters:
 Lm - Mutual Inductance
 Rs - Stator Winding Resistance
 Lls - Stator Leakage Inductance
 Rr - Rotor Winding Resistance
 Llr - Rotor Leakage Inductance

Hamid KHAN
15
FOC Parameters:
 kp - Proportional Gain (flux PI)
 ki Integral Gain (flux PI)
 csat - Flux output limits
 h - hysteresis band of the Current Regulator
 freq_max - Maxing Switching frequency
 fc - low pass - filter cut-off frequency used in Flux PI block to filter the
estimated flux
 Tfc - sampling time of the FOC block which must be a multiple of the
simulation time step.

These machine and control parameters can be modified for different machines to
achieve desirable performance.

3.4.1 SIMULINK Block FOC

Figure 9: Block FOC

In addition to the different blocks discussed above which make up the complete FOC
block, other blocks have also been used to discretize it. The switching control
block is used to limit the inverter commutation frequency to a maximum value
specified by the user.

3.5 SIMULINK sub FOC Blocks


Figures 10 - 13 represent the SIMULINK version of various FOC blocks explained
earlier i.e. blocks used for coordinate transformation namely the Park and Inverse
Park transformations.

Figure 10: Flux Estimator

Hamid KHAN
16
Figure 11: Flux Orientation Calculation

Figure 12: Flux PI

Before being compared to its reference value the estimated flux value is filtered by
passing it through a low pass filter.

Figure 13: Calculation


This block uses the relation = ( ) to calculate i*qs.

Figure 14: Current Regulator

Hamid KHAN
17
3.5 FOC Simulation Results
The results elaborated below were obtained on varying the sampling times (Ts) while
maintaining the reference torque and reference flux constant at 30N-m and 0.3wb
respectively and the hysteresis comparator bandwidth set to 0.1A. The initial
conditions as specified below and simulation time of 2 seconds was kept the same.
Motor Initial Conditions:
 Initial Current, phase A = 0
 Initial Current, phase B = 0
 Initial Current, phase C = 0
 Slip Initial value = 1
 Initial Rotor Position = 0

1) For Ts=1s
Torque (N-m)

Time (seconds)
Figure 15: Result FOC 1
An error of 2% is observed.

2) For Ts=10s
Torque (N-m)

Time (seconds)
Figure 16: Result FOC 2

An error of -6% to +2% is observed.

Hamid KHAN
18
3) For Ts=100s

Torque (N-m)

Time (seconds)
Figure 17: Result FOC 3

For this case the error ranges from -50% to +13%, but for most of the time it
oscillates between -25% to -5%.

Hamid KHAN
19
4 FOC Speed Regulation
4.1 Introduction

The final objective of this application is to enable the control of the motor speed by
applying desired torque. To achieve this objective a speed controller is added to the
existing system in a closed loop with the motor. This Speed Controller then provides
the flux and torque reference values to the FOC Block.

4.2 MATLAB Simulation of FOC Speed Regulator

Figure 17 details the complete SIMULINK model of the speed regulation system
using the FOC scheme (as explained earlier).

Figure 18: FOC with speed controller

4.2.1 Speed Controller

In addition to the machine and FOC parameters, the file paramspeed.m contains all
the control parameters of the Speed Controller block.

Speed Control Parameters:


 nf - nominal Machine Flux.
 ctrl_sat Defines the torque output limits in N-m.
 ramp Limits the acceleration and deceleration to the defined value in rpm/s.
 Skp - Proportional gain of the speed controller PI regulator.
 Ski - Integral gain of the speed controller PI regulator.
 Sfc - Speed measurement low pass filter cut-off frequency in Hz
 Tsc - Speed Controller Sampling time.

Hamid KHAN
20
Figure 19: Speed Controller Block

The speed controller block contains Speed PI block and the Flux table block. The
Speed PI block is an ordinary PI regulator with the speed error signal calculated from
the comparison of the Speed Reference value and the actual speed as its input. The
torque reference value is its output which is then provided to the FOC block as input.

4.2.1.1 Flux Table

The Flux Table contains the flux values corresponding to different speeds, which is
based on the fact that at low speed high torque is required and at high speed low
torque is required. Since torque is proportional to the machine flux, so at high speed
a fraction of the nominal machine flux is used while at very low speed the machine is
magnetized at the nominal flux to induce high torque.

Hamid KHAN
21
4.2 FOC Speed Regulator Simulation Results

In this section speed regulation results obtained on varying speed control


parameters such as maximum permissible torque and loads applied are discussed.
All results discussed are based on a 1400 rpm Speed Reference and a sampling
time of 100 s.

1) Simulation result # 1
Speed (rpm)

Time (seconds)
Figure 20: Result Speed Regulation 1
Motor at No-Load with,
Maximum permissible
issible torque = 20 N-m
Maximum Permissible Acceleration
cceleration = 1500rpm/s.
Observations:
Steady state error 1%
Rise Time 0.8s.

2) Simulation result # 2
Speed (rpm)

Figure 21: Result Speed Regulation 2


Motor Load = 5Nm.
Maximum
aximum permissible torque = 20 N-m
Maximum Permissible Acceleration
cceleration =1500rpm/s.
Observations:
Steady state error 1%

Hamid KHAN
22
Rise time 1.2s
3) Simulation Result # 3

Speed (rpm)

Time (seconds)
Figure 22: Result Speed Regulation 3

Motor at No-Load with,


Maximum
aximum permissible torque = 25 N-m
Maximum Permissible Acceleration = 1500rpm/s.
Observations:
Steady state error 1%
Rise time 0.6s.

4) Simulation Result # 4
Speed (rpm)

Time (seconds)
Figure 23:
2 Result Speed Regulation 4

Motor Load = 5Nm


Maximum
aximum permissible torque = 25 N-m
Maximum Permissible Acceleration = 1500rpm/s
Observations:
Steady state error 1%
Rise time 0.8s.

Hamid KHAN
23
CONCLUSION
The simulation results validate FOC as a very powerful machine torque control
scheme with exceptional dynamics. Not only is the reference torque attained in less
than 8m seconds; a good torque control for both sampling times of the order of 1s
and 10s are also achieved. The degraded performance for a sampling time of
100s order can be justified as the rotor time constant is no longer very small in
comparison to the sampling time.

The results obtained for the Speed Regulator; the speed regulators minimal error
margin of 1%, under both loaded and unloaded condition, for a sampling time as
large as 100s bears further testimony to the capability of vector control technique.
The low speed error can be attributed to the machine shaft inertia which filters out
any sharp impact on the speed caused by an oscillating torque.

By redefining the maximum torque and acceleration limit parameters the rise time
could also be modified easily.

This application note elaborates how by using the developed SIMULINK model of the
FOC Speed Regulator can be adapted to the various application requirements by
simply modifying the control parameters in the MATLAB file paramspeed.m.

Hamid KHAN
24
REFERENCE
1. Contrle des machines tournantes, Jean-Pierre Plumey.
2. Commande des machines ELT7, 4 November 2008, R. Chapuis.
3. EE8412 Advanced AC Drive Systems ABB.
4. Field Orientated Control of 3-Phase AC-Motors Texas Instruments.
5. http://www.mathworks.com/ Electric Drives.
6. Bose, B. K., Modern Power Electronics and AC Drives, Prentice-Hall, N.J.,
2002.

Hamid KHAN
25

You might also like