thesis design and implementation of a three-phase induction motor control scheme

Upload: edwardelric

Post on 10-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Thesis Design and Implementation of a Three-Phase Induction Motor Control Scheme

TRANSCRIPT

  • 2001 Thesis Project 1 Gareth S Roberts

    Design and Implementation of a

    Three-Phase Induction Motor Control Scheme

    By Gareth Stephen Roberts

    Department of Information Technology and Electrical

    Engineering, the University of Queensland

    Submitted for the degree of Bachelor of Electrical Engineering (Honours).

    October 2001

  • 2001 Thesis Project A2 Gareth S Roberts

    34 Tolaga Street,

    Westlake, QLD, 4074

    October 17, 2001

    The Head of School,

    School of Information Technology and Electrical Engineering,

    University of Queensland,

    St. Lucia, Qld, 4072

    Dear Professor Simon Kaplan,

    In accordance with the requirements of the degree of Bachelor of Engineering (Honours)

    in the division of Electrical Engineering, I present the following thesis entitled Design

    and Implementation of a Three-Phase Induction Motor Control Scheme. This thesis was

    carried out under the supervision of Dr. Geoff Walker.

    This thesis project has not been submitted at any other University. I declare that this

    work has not been published or written by any other person, except where reference is

    made by text.

    Yours sincerely,

    Gareth Roberts.

  • 2001 Thesis Project A3 Gareth S Roberts

    Abstract The use of a combustion engine to motivate a car has been questioned in recent times due

    to the increasing concern of global warming. As a result of this, the concept of driving

    a car with an electric engine has become of particular interest. Dr. Geoff Walker and his

    PhD students are working on the creation of the Universitys own electric car.

    This thesis project is focused on deriving a control scheme to drive an induction machine

    that could be applied to the electric car. Induction machines are universally used in

    industry because of their robustness, reliability, low price and high efficiency (up to

    80%). However, until recent times, it has been hard to control the torque of the induction

    motor.

    By using the TMS320F243 DSP controller, which is embedded in an existing hardware

    design and a control scheme called Field Orientated Control, we can control the torque

    of an induction machine with a high degree of accuracy. Hence, this thesis project

    demonstrates how to apply Field Orientated Control with a DSP controller. To do this,

    extensive MATLAB analysis was conducted in order to optimize the control system. The

    complete physical system is expected to be working on the demonstration day.

  • 2001 Thesis Project A4 Gareth S Roberts

    Acknowledgements

    I wish to thank the following people:

    Dr. Geoff Walker, my supervisor, for taking the time through the whole course of the

    year for offering clear and enthusiastic explanations. Dr. Walker was always able to

    guide the thesis along the right path.

    Mr. David Finn for lending me his motor controller board. David also provided the

    required information needed to operate this board.

    My family, for offering support through my University years; this year in particular.

    My fellow occupants in the Power Electronics labs, for putting up with my company for

    days on end. To Andrew Gray and Jeffrey Jordan, thank you for the advise you offered

    through the course of the year.

  • 2001 Thesis Project A5 Gareth S Roberts

    Table of Contents

    Abstract.. i

    Acknowledgements. ii

    List of Figures and Illustrations iii

    Chapter 1 Need/Basis for the thesis project.. 1

    1.1. Project Specification. 1

    1.2. Available resources... 1

    1.3. What are hyper and electric cars?. 1

    1.4. Why do we use an Induction motor?. 3

    Chapter 2 Literature Review... 5

    2.1. The Hybrid concept... 5

    2.2. Induction Motor Theory and Practice 5

    2.3. Power Electronics.. 6

    2.4. Field-Orientated Control 7

    2.5. MATLAB analysis. 8

    Chapter 3 The Hardware Design. 9 3.1. The basic control format... 9

    3.2. The existing motor controller... 10

    3.3. Current sensing module 11

    3.4. The speed sensor... 12

  • 2001 Thesis Project A6 Gareth S Roberts

    Chapter 4 The Induction Motor. 14

    4.1. The fundamental operating principles for an

    Induction Motor... 14

    4.2. The Electrical principles of an Induction Motor.. 14

    4.3. Torque/Speed generation for an Induction Motor 16

    Chapter 5 Field-Orientated Control (FOC) 19

    5.1. An introduction.. 19

    5.2. Transformation between reference frames. 20

    5.3. The PI controller. 21

    5.4. PWM Pulse-Width Modulation... 22

    5.5. The Overall Design. 24

    5.6. Conclusions drawn from Chapter 5 26

    Chapter 6 The MATLAB design 27 6.1. MATLAB An introduction 27

    6.2. MATLAB simulation design 27 6.2.1 Field Orientated Control using SIMULINK... 28

    6.2.2 The Current Controller 32

    6.2.3 The Motor Model 32

    6.3. Simulation of the MATLAB design. 34 6.3.1. Speed response analysis. 34

    6.3.2. Analysis of the Field-Orientated Section of the

    Design.. 38

    6.3.3. The significance of feedback... 41

    6.4. The conclusions drawn from Chapter 6. 42

  • 2001 Thesis Project A7 Gareth S Roberts

    Chapter 7 The Software Design 43

    7.1. A basic overview of how the software is

    organized 43

    7.2. The Main Program The Field-Orientated Control

    Portion of the Software Design. 44 7.2.1. The torque controller & Field Weakening.. 45

    7.2.2. Calculation of iqs, ids, cos(rho) and sin(rho). 48

    7.2.3. The Current Controller section of the software design 50

    7.3. The PWM Interrupt Service Routine. 51

    7.4. The Encoder Interrupt Service Rountine... 55

    7.5. A/D conversion. 57

    7.6. Concluding remarks. 58

    Chapter 8 Final Project Performance and Evaluation 59

    8.1. PWM test program... 59

    8.2. Encoder test program #1... 61

    8.3. Encoder test program #2... 62

    Chapter 9 Conclusion. 64

    9.1 Summary and Conclusion... 64

    9.2 Future work. 64

    Bibliography 66

    APPENDIX A The proposed software design

    APPENDIX B PWM test program

  • 2001 Thesis Project A8 Gareth S Roberts

    APPENDIX C Encoder detection test program #1

    APPENDIX D Encoder detection test program #2

    APPENDIX E The schematics for the Motor Controller board

  • 2001 Thesis Project A9 Gareth S Roberts

    List of Figures

    Figure 1.1 The Honda Insight Figure 1.2 The parallel hybrid car Figure 3.1 The basic physical design Figure 3.2 The existing motor controller board Figure 3.3 The current sensing module Figure 4.1 The per phase representation of an Induction motor in steady state Figure 4.2 The torque/speed curve Figure 4.3 Field weakening Figure 5.1 The transformation of the stationary reference frame to the rotating

    reference frame Figure 5.2 The PI controller Figure 5.3 Leg A of the full-bridge inverter Figure 5.4 PWM VSI schematic and waveforms Figure 5.5 The complete FO controller design in a block representation Figure 6.1 The Look-up Table Figure 6.2 The complete SIMULINK design Figure 6.3 The FO_controller block Figure 6.4 The dqe2abc block Figure 6.5 The Inverse_Park_Transform Block Figure 6.6 The Inverse_Clarke_Transform Block Figure 6.7 The Current_controller block Figure 6.8 The Induction machine in stationary qd0 Figure 6.9 The MATLAB speed simulation results Figure 6.10 The speed response of the control system where the proportional

    gain is increased Figure 6.11 The speed response of the system with a proportional gain of 90 Figure 6.12 cos(rho) and sin(rho) signals Figure 6.13 The ids and iqs signal curves over time Figure 6.14 The applied signal to phase A of the Induction motor and the drawn

    current on phase A Figure 6.15 The speed response of the system without feedback Figure 7.1 The flow chart for this thesis project Figure 7.2 The torque controller Figure 7.3 Graphical representation of the trapezoidal rule Figure 7.4 Limiting the integration result Figure 7.5 Calculation of the required rotor flux: Lambdare_r Figure 7.6 The results of using the field-orientated technique Figure 7.7 Overflow prevention of the slip-angle

  • 2001 Thesis Project A10 Gareth S Roberts

    Figure 7.8 Demonstration of the development of the slip angle over time Figure 7.9 Flow-chart demonstrating how the current controller section works Figure 7.10 PWM waveforms with dead-band Figure 7.11 The PWM infrastructure Figure 7.12 The Peripheral Interrupt Expansion Block Diagram Figure 7.13 The encoder detection infrastructure Figure 7.14 The flow-chart for Encoder detection Figure 8.1 Experimentally measured PWM waveforms on the CRO

  • 2001 Thesis Project 1 Gareth S Roberts

    1. Need/Basis for the thesis project

    1.1. Project Specification To design a control scheme for a three-phase induction motor drive. This induction

    motor drive is proposed to be incorporated into a hybrid car or an electric car.

    1.2. Available resources

    Motor controller board. This was constructed by 1999 thesis student, Mr.

    David Finn and was designed to control a brush-less DC motor. However, by

    constructing a feedback loop that can detect the outputs of an induction motor, we

    can use this motor controller to control an induction machine.

    TMS320F243 DSP controller. This is manufactured by the Texas Instruments Company and is one of the major components on David Finns motor controller.

    For this thesis project, a software control design has to be devised that will

    correctly control the DSP controller to meet specifications.

    DC bus. This DC bus is made available from SUNSHARK battery packs, 12VDC to 140VDC. ~40 VDC is the most compatible voltage supply for the motor

    controller that will be used for this thesis.

    Induction motor. Three-phase, 0.5kW, 4-pole machine. This induction motor is only used for the prototype design presented in this thesis.

    1.3. What are hybrid and electric cars?

    Under the supervision of Dr. Geoff Walker, a group of Computer Science and Electrical

    Engineering Ph.D. students at the University of Queensland are constructing a hybrid or

    an electric car. Both of these types have been inaugurated due to the increasing concerns

    of global warming. An electric car simply uses an electric engine as the means of

    motivating the car instead of the conventional combustion engine. These cars have not

    yet been released in the commercial world because the electric engine system (including

  • 2001 Thesis Project A2 Gareth S Roberts

    batteries) does not provide the same power per weight as the combustion engine from the

    research to date [8].

    Figure 1.1. The Honda Insight [14]

    Figure 1.2. The internal infrastructure of a parallel hybrid car [14]

    A hybrid car was released commercially this year. It combines two or more sources of

    power; the gasoline-electric hybrid car, for instance, does just this. The electric engine

  • 2001 Thesis Project A3 Gareth S Roberts

    boosts acceleration and reduces demand on the petrol engine, saving fuel and improving

    performance in the process [14]. While cruising, power comes solely from the petrol

    engine. When the vehicle is coasting downhill, or during deceleration and braking, the

    electric motor recharges a nickel metal hydride battery pack. During periods when the

    vehicle is stationary, the engine automatically shuts down to save fuel, and then starts up

    again when the throttle is pressed. The Honda Insight for instance consumes less than

    half the fuel of a conventional small car and harmful exhaust emissions are lowered by a

    significant 90% [14]. This model features a 10kW electric motor that delivers power to

    the front wheels via a five speed manual gearbox.

    1.4 Why do we use an Induction motor? For this application, the only external input for the electric motor applied by the user is

    the accelerator; which is essentially a variable torque input. There are two existing

    options for an electric motor: the Direct current (DC) type or the Induction type.

    Induction motors are universally used in industry because of their high robustness,

    reliability, low price and high efficiency (up to 80% [15]). However, the brush-less DC

    motor has been, traditionally, the more attractive option for variable torque control. This

    is because the torque can be controlled by varying the armature current (ia), while the

    flux can be controlled by varying the field/exciting current (ix). These two quantities

    operate in a decoupled manner, which is highly advantageous from a design perspective.

    Also, an induction machine has been difficult to control due to its complex mathematical

    model, its non-linear behavior during the saturation effects and the electrical parameter

    oscillation that depends on the physical influence of temperature [15].

    However, the recent fruition of digital signal processors (DSPs) has swung the

    pendulum toward the induction motor for torque control. These high computational

    power silicon devices have made it possible to realize far more precise digital control

    algorithms. Field Orientated Control (FOC), for instance, is a vector control method that

    demonstrates the capability of performing direct torque control. FOC provides an

    induction motor every advantage that DC machine control can have, while freeing itself

    from mechanical commutation drawbacks [9]. It is anticipated that the application of the

  • 2001 Thesis Project A4 Gareth S Roberts

    correct control algorithm combined with the inherent efficiency and power potential will

    make this design very compatible for use in a hybrid car. Additionally, the induction

    machine makes execution of regenerative braking relatively simple. Regenerative

    braking is a means of using the induction machine as a brake. It is anticipated that the

    outcomes from this thesis project support the claim that an induction motor is a better

    means of motivating a hybrid or an electric car.

  • 2001 Thesis Project A5 Gareth S Roberts

    2 The literature review This section of the thesis report reviews the focal sources of information that were

    required to compile this thesis project.

    2.1. The Hybrid car concept

    Honda and Toyota only released the Hybrid car this year. Knowledge of its operational

    principles is not commonly known. The web-site, How Stuff Works, is an educational

    site that is written by Mr. Marshall Brain. It provides a basic introduction onto how a

    hybrid car works. Within this article, the definition of the hybrid car and its potential

    advantages are stated. The concept of the parallel hybrid car is presented. This is a car

    design that simultaneously utilizes both the combustion engine and the electric engine to

    turn the wheels. Mr. Brain also offers an explanation on how commercially released

    hybrid cars (the Toyota Prius and the Honda Insight) work.

    2.2 Induction Motor Theory and Practice

    Wildi [1] is an excellent source of information on the theory behind the operation of an

    induction motor. The three-phase induction machine is presented in Chapter 13. The

    electromagnetic and mechanical phenomena that are responsible for the induction

    motors many advantages are clearly explained. Wildi also presents the two types of

    induction motors: the squirrel cage induction motor and the wound motor. An

    explanation of the advantages and disadvantages of each is given. Essential concepts

    such as synchronous speed, slip, torque and the rated electrical inputs are presented

    and exemplified with example problems. The equivalent electrical circuit for an induction

    motor is derived based on the three-phase transformer.

    This book also presents the fundamentals of the induction motor from a practical

    viewpoint. The small and large motor types are distinguished, where the typical electric

    and mechanical characteristics of each are shown. In the later chapters (20 to 23), Wildi

    takes the reader through some of the existing methods of driving an induction motor:

  • 2001 Thesis Project A6 Gareth S Roberts

    Static frequency charges

    Static voltage controllers

    Rectifier-inverter systems with line commutation

    Rectifier-inverter systems with self-commutation

    Pulse-width modulation systems

    Pulse-width modulation systems are the only control schemes that can be considered for

    this thesis as the motor controller is specifically designed for Pulse-width modulation.

    The text by Mohan, Undeland and Robbins [2] gives good explanations on the operating

    principles of the induction machine. Concepts such as operating the induction motor in

    the constant torque region, volts per hertz control, starting up considerations and driving

    an induction machine with a three-phase bridge inverter are explained.

    2.3. Power Electronics

    Operation of the motor controller board requires knowledge of how the power electronic

    aspects work. Mohan Undeland and Robbins [2] provides chapters of information on

    power electronics; Dr. Geoff Walker utilizes this text to teach his Power Electronics

    subject. In chapter two, all the current power-switching devices are presented. These

    are: the Diode (the various types of diodes are presented and compared), the Bipolar

    Junction Transistor (BJT), the Metal Oxide Field-Effect Transistor (MOSFET) and the

    Insulated Gate Bipolar Transistor (IGBT). In this chapter, the requirements of a

    switching device are also stated. The general desired characteristics of a power switching

    device is to have a high blocking voltage in the reverse direction, to have minimal

    switching losses (this is related to fast switching ability) and the power device is required

    handle a sufficient amount of average forward current. It is found that the MOSFET

    provides the minimal switching losses and is, hence, well suited for voltage switching

    purposes.

  • 2001 Thesis Project A7 Gareth S Roberts

    In chapter eight, the basic switching topologies are outlined. An inverter is an electronic

    configuration that transforms a DC signal into an AC signal in a controlled manner. This

    is very relevant for this thesis project as we have available a DC supply and the induction

    motor requires an AC supply that needs to be controlled to a certain degree of accuracy.

    It compares how each topology generates harmonics. It discusses utilization of the

    supply voltage. All voltage-switching designs require a modulation chip to generate

    Pulse Width Modulated (PWM) signals that are applied to the gate of the power

    switching devices. There are two types of PWM outlined: sinusoidal and square-wave.

    While square-wave switching utilizes the supply voltage better, the harmonic content of

    the output waveform is too high to really be considered an effective solution. Therefore,

    sinusoidal PWM is the best option based on the literature provided in this text. Later in

    the chapter, they talk about dead-time, which is a time delay that needs to be

    introduced to the square-wave to avoid commutation of the power switching devices.

    2.4. Field-Orientated Control

    Bimal K. Boses book that he edited in 1996 [4] presents extensive explanations on FO

    control. Concepts that comprise Field-Orientated (FO) control such as the rotating and

    stationary reference frames, Clarke and Park transforms, PI controllers and PWM are

    extensively explained. Bose also exemplifies some MATLAB models that can be used to

    simulate FO control. In the later stages, self-tuning and sensor-less FO control are

    investigated. Bose also offers the reader general explanations on microprocessors and

    how they are the central control means of FO control.

    The Texas Instruments Literature Document BPRA073 also presents theoretical and

    practical clarifications on FO control. However, they present their DSP controller device,

    the TMSC320C240. This device is specifically suited to motor control techniques such

    as FO control. In BPRA043 [10], example assembler code used to execute FO control is

    offered. Texas Instruments Technical Document BPRA076[17] provides an extensive

    practical detail of how to apply FO control to an induction motor.

  • 2001 Thesis Project A8 Gareth S Roberts

    2.5. MATLAB analysis

    The book, Control Systems Engineering[7] is dedicated to presenting the concepts of

    generating a control design. Furthermore, MATLAB is extensively used through the

    course of the book. However, Dynamic Simulation of Electric Machinery using

    MATLAB/SIMULINK[6] is a book that specifically presents how to apply FO control

    in MATLAB, how to model an induction motor in MATLAB and the control design

    aspects of FO control.

  • 2001 Thesis Project A9 Gareth S Roberts

    3. The Hardware Design 3.1. The basic control format

    In essence, we are endeavoring to design a controller that can vary the torque induced in

    the rotor of the motor. To do this, the induction motor controller will be configured in

    the following format:

    Figure 3.1. The basic physical design [16] The user applies an input signal (e.g., the throttle of the car) that will be fed into the

    command generator of the DSP controller. The DSP controller will manipulate this

    control signal to produce signals that the induction motor can operate off. These signals

    will be converted to PWM (Pulse-Width Modulated) signals so that the Full-bridge

    MOSFET (Metal-Oxide Silicon Field Effect Transistor) inverter on the motor controller

    can amplify these signals to substantial voltage levels. It is anticipated that the amplified

    PWM signals will then induce a torque in the rotor of the induction motor that is

    proportional to the magnitude of the input signal applied by the user. The design will

    utilize an encoder that sends down pulses that can be manipulated to calculate the speed

    and position of the rotor. The encoder pulses and the measured currents drawn by the

    induction motor form the feedback portion of the design. Hence, the major aim of this

    thesis project is to develop a control strategy for the DSP controller that controls the

    torque production within the induction machine. However, there is no great emphasis

    placed on precise torque control.

  • 2001 Thesis Project A10 Gareth S Roberts

    3.2. The existing motor controller

    David Finns motor controller board can be seen in figure 3.2. There are two main

    features that are of particular relevance to this thesis project:

    A. TMS320F243 DSP controller: provides several key functions of different nature,

    in particular, signal filtering, regulation, drive signal generation, measurement,

    monitoring, protection and more. The speed at which we need to execute the control

    algorithms and detect signals in the control feedback loop suggests the requirement

    for an advanced Digital Signal Processor. The TMS320F243 is specifically designed

    for Digital Motor Control. This device combines a 16 bit fixed-point DSP core with

    micro-controller peripherals in a single chip solution that is part of a new generation

    of DSPs called DSP controllers[15]. This DSP controller is built with a Harvard

    architecture, where the data and the instructions occupy separate memories and travel

    over separate buses[16]. Because of this dual bus structure, the processor can fetch,

    simultaneously, an instruction and a data operand. Pipelined operation of instructions

    and data transfer is thus possible, resulting in higher instruction throughput rate[4].

    This DSP controller is capable of executing 20 million instructions per second.

    This DSP controller offers the following:

    12 PWM (Pulse Width Modulation) outputs. Six of these will be utilized to

    drive the three-phase MOSFET bridge inverter on the motor controller board.

    UART (Universal Asynchronous Receiver and Transmitter), this allows for

    communication to occur between the PC and the motor controller. Therefore,

    data acquisition, debugging and fault logging are realized.

    2 fast A/D (Analogue to Digital) converters with 10-bit resolution make the

    computation of accurate, real-time phase current measurements possible.

    Many more features that will be mentioned through the course of this report.

  • 2001 Thesis Project A11 Gareth S Roberts

    Figure 3.2. The existing motor controller board B. The Power Electronics Design: three half-bridge circuits combine to form a

    three-phase full-bridge inverter. The semi-conductor switches are high quality

    MOSFETs that feature sufficient switching efficiency and blocking voltage for

    applications of this nature. Within the DSP controller, the software generates three-

    phase sinusoidal signals. These are then converted to 6 PWM signals in the DSP, one

    for each MOSFET on the full-bridge inverter. Because the PWM signals are square

    waves of varying duty-ratio, we can use the MOSFETs to amplify the PWM

    waveform to significant voltage levels that the induction machine can operate off.

    PWM generation through the software design is discussed in Chapters 5 and 7.

    3.3. Current sensing module

    The implemented current-sensing module consists of two current transducers. Because

    the stator windings of the motor are a three-phase wye connection, we can use the

    following relation to find the other unknown current magnitude:

    0 = Ia + Ib + Ic (3.1)

    Where Ia, Ib and Ic are the three-phase stator currents.

  • 2001 Thesis Project A12 Gareth S Roberts

    However, application of an effective current sensing module requires the designer to

    consider that the DSP A/D converters operate within a voltage range of 0 to +5V. The

    problem with this is that the currents sensed by the transducers are sinusoidally

    oscillating between +2.5V and 2.5V. Therefore, a DC offset of +2.5V will have to be

    continually added to the current signal to ensure that the current does not drop below 0.

    Furthermore, the amplitudes of these signals would be greater than +2.5V.

    Consequently, we would need to insert resistors on the bus to attenuate the current signal

    appropriately. The existing motor controller applies all of this.

    Figure 3.3. The current sensing module [17]

    The added 2.5V offset is subtracted from the A/D conversion result in the PWM service

    routine of the controllers software (see Chapter 7).

    3.4. The speed sensor

    On the shaft of the rotor is an encoder. The encoder generates 500 pulses per revolution

    in a square-wave format. Furthermore, the encoder generates two pulses, A and B,

    which will allow the DSP controller to detect the direction of the rotor; the B pulse lags

    the A pulse by 900 in the positive direction. The DSP controller detects rising and falling

    pulses on its interrupt pins; therefore, the DSP controller is effectively detecting 2000

    pulses per revolution. Based on this, the software section of the design must interrupt the

    speed of the rotor based on the number of pulses it receives. The rated speed of the

    induction motor used in this thesis project is 1500rpm, which is 25 rps. Therefore, the

    DSP controller will receive:

  • 2001 Thesis Project A13 Gareth S Roberts

    (2000 pulses per revolution) 25 (revolutions per second)

    = 50 103 pulses per second at rated speed.

    Every time a pulse is detected, the existing integer number in the free-running counter of

    the DSP controller is latched into a register that the software design can read (T2CNT).

    Therefore, if the software design compares a new count(the current value latched in the

    T2CNT register) to an old count (the previous value), the following formula can be

    applied to calculate the speed:

    Speed = Clock rate (encoder rate (new count old count)) (3.2)

    [(revolutions per second) = (counts per second) (revolutions per pulse) (pulse per count)]

    If the induction machine was rotating constantly at the rated speed, the count difference

    between consecutive encoder pulses will be (the clock speed is 20 MHz):

    Count difference = 20 MHz (counts per second) (50 103 pulses per second)

    = 400 counts per pulse.

    If we now apply formula (3.2):

    Speed = 20 MHz / (2000 400) = 25 rps

    Also, the detection of a pulse means that the rotor has progressed by:

    (3600 per revolution) (2000 pulses per revolution) = 0.180 per pulse.

    Considering the rate that pulses are detected, the resultant resolution of the positional

    angle of the rotor seems to be more than adequate for torque control for this project. If

    the resolution of the rotor angle was not satisfactory, the software design would have to

    interpolate between the pulses. This is discussed in the software section (Chapter 7).

  • 2001 Thesis Project A14 Gareth S Roberts

    4. The Induction Machine

    4.1 The fundamental operating principles for an induction motor

    An induction motor is an asynchronous AC (alternating current) motor. The least

    expensive and most widely used induction motor is the squirrel cage motor. The major

    reason why these machines are so robust and inexpensive is that no external current is

    required inside the rotor to create the revolving magnetic field. An induction machine

    consists fundamentally of two parts: the stator (the stationary part) and the rotor (the

    moving part). For a three-phase induction machine (this will be used in this thesis

    project), three-phase sinusoidal voltages are applied to the windings of the stator. This

    creates a magnetic field. Because the voltages differ in phase by 1200 with respect to

    each other, a revolving magnetic field is created that rotates in synchronism with the

    changing dominant poles around the cylindrical stator.

    The rotor, which, for a squirrel-cage rotor consists of copper bars in a cylindrical format,

    follows the created revolving magnetic field. As a consequence, a voltage is induced in

    the rotor bars that is proportional to the relative angular speed of the magnetic field (this

    is referenced to the angular speed of the rotor). Because a voltage is induced, magnetic

    fields are created around the rotor wires. The two generated magnetic fields (in the rotor

    and stator) interact to generate a force that is also proportional in magnitude to the

    relative angular speed of the magnetic field. Torque is equal to force multiplied by the

    radius of the cylindrical stator. Therefore, the resultant torque applied by the rotor is

    proportional to the relative speed of the magnetic field with respect to the speed of the

    rotor.

    4.2 The Electrical principles of an Induction motor

    The induction machine is an electrical device. The electrical properties that are of

    particular interest to this thesis project are the stator and rotors resistance and

    inductance, as well as the magnetizing inductance. During steady state, the induction

    motor can be modeled in a per phase representation seen in figure 4.1.

  • 2001 Thesis Project A15 Gareth S Roberts

    Figure 4.1. The per phase representation of an induction motor in steady state [17]

    These parameters are important for the control strategies that will be presented in chapter

    5. The induction machine used in this thesis project has the following electrical

    parameters:

    E = rated phase voltage, 127 Vrms

    P = power rating, 500W and 0.67hp

    p = Pole pairs, 2

    rs = stator resistance, 4.495

    rr = rotor resistance, 5.365

    xs = stator inductance, 16 mH

    xr = rotor inductance, 13 mH

    xm = magnetizing inductance, 149 mH

    Mnom = rated Torque, 3.41 Nm

    J = rotor of inertia, 0.95 10-3 kg m2

    Hence, the full-load current for this three-phase motor can be calculated using the

    following approximate equation:

    IFL = 600 PH / E (4.3)

    = 600 0.67 / 220

    = 1.82 A

  • 2001 Thesis Project A16 Gareth S Roberts

    4.3 Torque/Speed generation for an Induction motor

    The angular speed at which the magnetic field rotates is called the synchronous speed,

    while the angular speed by which the rotor falls behind is called the slip speed.

    Synchronous speed, ns = (120f) p (4.1)

    = (12050) 4

    = 1500rpm in this case

    Slip, s = (ns n) ns (4.2)

    Where f = the rated frequency of the motor, p = the number of poles and n = the angular

    speed of the rotor.

    An induction motor never travels at synchronous speed; this is why they are referred to as

    asynchronous machines. When no load is applied to the rotor, the induction machine has

    a slip of 0.5%. When the rotor is locked, the slip is, of course, 100%. At locked-rotor

    conditions, the current can be five to six times the full-load current, making I2R losses 25

    to 36 times higher than normal. For this reason, it is not recommended to leave the rotor

    locked for more than a few seconds [1]. The torque speed curve for the type of induction

    motor used in this thesis project can be seen over-page.

  • 2001 Thesis Project A17 Gareth S Roberts

    Figure 4.2. The torque speed curve for the induction machine at the rated voltage used in this thesis

    As you can see, there is no simple relationship between speed and torque, this is why

    inspection of this curve is so important. Breakdown torque represents the maximum

    torque that the load can apply before the induction motor is unable to develop speed. The

    nominal speed is the angular speed that the induction machine accelerates toward for a

    given voltage and frequency. Therefore, by applying different voltages of different

    frequency (voltage and frequency have to increase by the same proportion in order to

    maintain a constant rotor flux), we can rotate the induction machine at a wide range of

    nominal speeds and rated torque values. By changing the developed nominal speed, the

    torque speed curve is shifted horizontally along the x-axis.

    Usually, the speed operation of the motor has an upper limit that is equal to the rated

    speed of the motor. Operation of the induction motor above the rated speed affects the

    drive efficiency and torque production due to heat dissipation and magnetic saturation

    [17]. Therefore, the rotor flux must be reduced so that the range of high efficiency

    operation of the motor drive is extended. Consider the figure seen below:

  • 2001 Thesis Project A18 Gareth S Roberts

    Figure 4.3. The field weakening operation As can be seen, by maintaining a constant flux, increasing the applied voltage and

    frequency can proportionally increase the nominal speed. However, outside the rated

    speed operation, the flux has to be decreased like an inverse function of speed. By

    weakening the rotor flux, the induction machine can reach speeds that are four times the

    nominal speed [4].

    In summary, the major design considerations for driving an induction motor are:

    The voltage (both magnitude and frequency) applied to the stator windings (is) is

    proportional to the created speed/torque of the rotor.

    (rotor flux) ! needs to be maintained constant when operating in speeds below

    the rated speed. Anything above this, the speed needs to be decreased in an

    inverse, non-linear fashion. Hence, we need to develop a control strategy that varies the frequency and voltage of the

    signal applied to the windings of the induction motor, while controlling the flux created

    in the air-gap of the induction motor. This will be shown in the next chapter.

  • 2001 Thesis Project A19 Gareth S Roberts

    5. Field-Orientated Control (FOC) 5.1. An introduction

    A DC machine has traditionally been a superior choice for torque control. The

    commutator of the DC machine holds a fixed, orthogonal spatial angle between the field

    flux and the armature MMF, allowing for the torque and flux to be controlled in a de-

    coupled manner [4]. Induction machines, via FOC, can emulate this control method.

    FOC control is a software algorithm that utilizes the position of the rotor combined with

    two-phase currents to generate a means of instantaneously controlling the torque and

    flux. Field-orientated controllers require control of both magnitude and phase of the AC

    quantities and are, therefore, also referred to as vector controllers. FOC produces

    controlled results that have a better dynamic response to torque variations in a wider

    speed range compared to other scalar methods. Also, FO control can induce a high

    torque at zero speed.

    To simplify equations and to provide a control over torque production in a

    straightforward manner, both stator and rotor equations are expressed with respect to a

    common reference axis. This axis is along the rotor field r, at a rotor flux angle rf with

    respect to the stator s1 axis (a axis in figure 5.1). In order to express the torque in terms

    of the rotor flux r and the stator current, an orthogonal d-q axes reference frame is

    introduced. The direct (d)-axis is always aligned with the rotor flux r, while the

    quadrature (q)-axis is always 900 ahead of the d-axis. The current space vector can be

    decomposed along the d-q axes as:

    is = isd + jisq (5.1)

  • 2001 Thesis Project A20 Gareth S Roberts

    Figure 5.1. The transformation of the stationary reference frame to the rotating reference frame [9]

    Hence, the FOC concept implies that the current control components applied to the

    system are in-phase (flux component) and in quadrature (torque component) to the rotor

    flux r. By locking the phase of the reference system such that the rotor flux is entirely in

    the d-axis (d-axis), the following mathematical constraint eventuates:

    qr = 0 (5.2)

    The electromagnetic torque developed by the motor can, hence, be shown by

    Tem = kt dr isq (5.3)

    Therefore, the stator current along the quadrature axis is given by:

    isq = Tem (kt dr) (5.4)

    Finally, the following relation can demonstrate the rotor-flux along the direct axis:

    dr = kr isd (5.5)

    The stator current along the direct axis is given by:

    isd = dr kr (5.6)

    Where kt and kr are constants that depend on the stator and rotors resistance and

    inductance. Having equations that are dependent on variables that describe the motor

    will consequently result in better control over torque variations. By maintaining dr and,

    therefore, isd at a constant value, the electromagnetic torque developed by the rotor Tem is

    completely determined by the stator current along the quadrature axis, isq, as seen in

    equation (5.3). Therefore, isq becomes the desired torque control command.

    5.2. Transformation between reference frames

    It was found in the previous section that the DSP chip and the designer require two

    current control quantities, isq and isd, that are referenced along a rotating axis.

    Furthermore, the induction motor requires three stationary voltage inputs that are each

    1200 apart. In order to transform the two rotating input quantities into three stationary

    output quantities, we need to perform the Inverse Clarke and Park transformations. See

    figure 5.1 for the way this transpires on the vector diagram.

  • 2001 Thesis Project A21 Gareth S Roberts

    (d,q) ! (, ) the Inverse Park transformation. This projection transforms the d,

    q rotating reference frame to a two-phase orthogonal system (, ). It utilizes the

    positional angle of the rotor flux () to do this:

    The Inverse Clarke transformation, modifies a two dimension orthogonal system

    (, ) into a three-phase system (a,b,c):

    To obtain the positional angle of the rotor flux we require, firstly, an encoder connected

    on the shaft of the rotor; this is used to detect the position of the rotor (with the assistance

    of software). Secondly, we need to calculate the slip angle. This is computed by using

    Hence, the rotor flux angle is given by:

    = (slip + rotor) dt (5.11)

    Where: Lm = the magnetizing inductance, Tr = the rotor time constant (= rotor inductance

    rotor resistance) and r is the estimated rotor flux.

    5.3. The PI controller

    The PI controller is an effective means of regulating torque and voltage magnitudes to the

    desired values. It also improves the steady state error and the error sensibility [4]. This

    is achieved by providing a gain for the error term with an integral component correction.

    Kp is the proportional gain and Ki is the integral gain of the feedback loop. The PI

    controller will be executed completely in the software section of the design. Via

    (5.8)

    (5.10) Lm isqTr r

    =slip

    isaisbisc

    =isis

    " 0

    -# $#

    -# -$#

    (5.9)

    isis

    =cos -sinsin cos

    isdisq

  • 2001 Thesis Project A22 Gareth S Roberts

    MATLAB analysis, we have to find the necessary poles and zeros for the design so that

    the transient response is quick and steady state errors are minimized.

    Figure 5.2. The PI controller

    There are four PI controllers used in this design. The first PI controller is called the

    torque controller as it calculates the required electromagnetic torque required by the

    motor. The other three are used in the current controller section of the design from the

    speed error signal. These PI controllers regulate the voltage into the induction machine

    by making sure that the induction machine is not drawing too much or too little current.

    5.4. PWM Pulse-Width Modulation

    The objective of PWM is to shape and control the three-phase output voltages in

    magnitude and frequency by utilization of a constant DC voltage. PWM is a process

    where three-phase sinusoidal signals are compared with a repetitive switching frequency

    triangular waveform. In the software design, the DSP core will cause periodic interrupts

    where the three sinusoidal values are fed into 3 compare registers (see Chapter 7). The

    TMS320F243 DSP will create the desired symmetrical synchronized PWM through the 6

    PWM signal generators. The 6 PWM signals are applied to the 6 MOSFETs on the three-

    phase inverter on David Finns motor controller via the MOSFET drivers.

    The frequency of the triangular wave is 20 kHz. This is compatible for use with the

    MOSFETs existing on David Finns motor controller board. In spite of this, because of

    the finite turn-on and turn-off times associated with any type of switch, the design

    requires the inclusion of slight time delays when the MOSFETs are switching. A dead

    band is the time delay between switching off one MOSFET on a phase of the inverter and

    switching on the complementary MOSFET. This ensures that any time delay in

    CorrectionError

    Error Kp

    Error Ki

    +

    +

    Command signal

    -

    Feedback signal

  • 2001 Thesis Project A23 Gareth S Roberts

    switching off a device does not lead to a shoot-through short circuit that can damage the

    circuit when its partner is switched on.

    Figure 5.3. Leg A on the full-bridge inverter If you turn your attention to figure 5.4, when PWM 1 is positive, MOSFET A+ will

    conduct. When PWM1 is zero, its compliment, PWM2, will be positive, thereby, turning

    MOSFET A- on. This will connect ground to the phase A connection for the duration that

    PWM2 is on. From the point of reference of the induction machine, it sees a line-to-line

    voltage relationship between phase A and phase B (VAB = VA VB). This is because it is

    connected in a three-phase Y format, this can be seen in Figure 5.5. As a consequence of

    this, a sinusoidal signal is created (see the figure below).

    Figure 5.4. PWM VSI schematic and waveforms [2]

  • 2001 Thesis Project A24 Gareth S Roberts

    Therefore, the FO control design is essentially applying line-to-line voltages to the

    induction machine from its point of reference. The induction machine will draw currents

    that are determined by the inductance and the back EMF. The PI controllers that feature

    in the current controller section of the design regulate the current drawn by the induction

    machine.

    5.5. The Overall Design

    Following theoretical considerations, a block diagram of the complete FO controller can

    be seen over the page.

    The design employed here is referred to as Indirect Field Orientation. This is because

    this method uses a speed sensor in the feedback loop instead of a hall sensor that the

    direct method uses. * is the input applied by the user (the throttle of the car). This is

    compared with the attained speed of the rotor that is obtained from the speed sensor.

    This is then converted into an electromagnetic torque signal Tem* via the torque controller

    (this is a PI controller). The obtained speed of the rotor is also used to set the required

    rotor flux r* that is needed to be created in the air-gap induction motor. The Field-

    Weakening Block compares the incoming speed value and outputs a desired flux value.

    For the most part, the induction motor requires constant rotor flux, however, at high

    positive and negative speeds, the Field-Weakening Block will have to decrease the output

    flux in a non-linear fashion. The Tem* and dr* signals are then converted into isd and isq

    signals using equations (5.4) and (5.6) that were stated above.

    These values, that are in the rotating reference frame, are then converted into three-phase

    a, b, c values that are referenced in the stationary frame via inverse Clarke and Park

    transformations. The inverse Clarke transform requires the quantified positional angle of

    the rotor that is obtained from the rotary encoder. This is added to the slip angle to equal

    positional angle of the rotor flux, rho. The calculated three-phase sinusoidal current

    values are then compared with the measured stator currents. The three-phase error

    currents are then fed into current controllers. These are blocks that contain PI controllers

    that convert the current signal into a voltage signal. Also, the current controllers contain

  • 2001 Thesis Project A25 Gareth S Roberts

    saturation blocks that limit the amount of voltage that can be applied to the next stage.

    The sinusoidal voltage signals are converted to PWM signals. These PWM signals are

    then amplified by the three-phase MOSFET bridge inverter on the existing motor

    controller and fed into the stator windings of the induction machine.

  • 2001 Thesis Project A26 Gareth S Roberts

    Figure 5.5. The complete FO controller design in a block representation

  • 2001 Thesis Project A27 Gareth S Roberts

    5.6. Conclusions drawn from Chapter 5

    It is concluded that FOC provides a reliable and effective means of controlling torque and

    flux. For this project, there is basically one variable torque input (the throttle of the car),

    which can directly control the torque of the induction motor by means of FOC.

    Furthermore, FOC facilitates four-quadrant operation, full motor torque capability at low

    speeds and higher efficiency (compared to the traditional Volts/Frequency control

    method) for each operation point in a wide speed range [4]. Therefore, FOC is elected as

    the means of motion control for this thesis project. This complete design will have to be

    tested in a computer simulation program called MATLAB. All of this design discussed

    except for amplification of the PWM signals will comprise the C-code design that will be

    downloaded into the DSP controller.

  • 2001 Thesis Project A28 Gareth S Roberts

    6. The MATLAB design

    The MATLAB design constructed is used to simulate the final FO control design where

    all parameters, processes and variables are modelled mathematically. Furthermore, the

    MATLAB program can convert a MATLAB design into a C-code design in a relatively

    straightforward manner. Hence, this stage of the thesis project is seen to be of great

    importance.

    6.1. MATLAB An introduction

    MATLAB is a computer simulation program developed by Math Works Inc. Embedded

    within MATLAB version 6 is SIMULINK. This is a program that allows the user to

    create mathematical blocks with inputs and outputs; highly suited to designing a control

    system of this nature. A proper explanation of MATLAB is beyond the scope of this

    report. However, one key feature is that it allows you to simulate your design over a

    specified period of time. This way, you can analyze the time response of your control

    system.

    6.2. MATLAB simulation design

    A MATLAB control design ultimately allows the designer to check its correctness. All

    the blocks that were shown in figure 5.6 can be represented by mathematical formulae.

    However, there is a great difficulty in properly simulating an induction machine.

    Development of an induction machine SIMULINK model is a quite complex and

    extensive process. The problems that can eventuate from this are, firstly, that the

    building of a correct model is a long and difficult process. Secondly, if there exists a

    problem in the generated induction machine design, trouble-shooting through the

    induction machine model is a very long and tedious task; this student experienced this.

    Finally, you will never be able to properly model an induction machine. This is because

    of unpredictable parameters such as temperature, magnetic flux saturation etc. In spite of

    all this, we can get a good general feel for how the device operates and, more

    importantly, that it by and large works.

  • 2001 Thesis Project A29 Gareth S Roberts

    6.2.1. Field Orientation Control using SIMULINK The complete MATLAB model can be seen below in Figure 6.2. This SIMULINK

    design essentially employs all the basic principles of indirect field-orientation that was

    discussed in the previous section. As mentioned, the speed of the rotor is used to set the

    desired rotor flux that will be induced in the air-gap of the induction machine. To do this,

    we use a Look-Up Table block called lambdare^r* on this design. The Look-Up

    Table matches the desired value of rotor d-axis flux to that of the mechanical speed, rm. For speeds less than the base or rated speed, the rotor flux command is set equal to its no

    load value with rated supply voltage, as determined by [6]:

    (vqse jvdse) = (rs + jweLs) (iqse jidse) + (Eqs jEds) (6.1)

    Beyond the base speed, the flux speed constant is set at the base speed value. The values

    of dr* and mechanical speed are generated by an m3 file (this can be seen in Appendix

    E).

    Figure 6.1. The Look-Up Table block

    There are two inputs into this system, * and T_load. The fundamental intention of this SIMULINK design, is that the FO control portion of the design will cause the rotor to

    generate a speed profile that follows the commanded speed input, *. To do this, the commanded speed signal is fed into the FO section of the design where it is subtracted

    from the measured speed of the rotor. The error generated is then fed into a torque

    controller block. The torque controller block is a PI controller that generates a Torque

    command, Tem*. This torque command is used to set the electromagnetic torque induced

    within the induction motor by calculating an appropriate iqs* command based on the

    generated Tem* signal and using equation 5.4.

  • 2001 Thesis Project A30 Gareth S Roberts

    Figure 6.2. The complete SIMULINK design

  • 2001 Thesis Project A31 Gareth S Roberts

    Tem*, lambdare_r (the signal produced from the look-up table), along with theta_r

    (the integral of the speed of the rotor) are fed into the FO_Controller block.

    Figure 6.3. The FO_Controller block

    The constants used in this block are equal to:

    Gain_G1 = (4*xr)/(3P*xm) = 0.05817

    Gain_G2 = 2/P = 0.5

    Gain_G3 = 1/xm = 6.711

    Gain_G4 = xr/(rr*xm) = 0.0163

    Gain_G5 = xm*rr/(lamdare_est*xr) = 177.72

    The FO_controller block mathematically calculates iqs^e*, ids^e*, cos_rho

    and sin_rho by using equations 5.3 to 5.10. All of these are the outputs of this block

    and are the inputs of the next block, the dqe2abc block. The FO_controller and

    dqe2abc blocks regulate the sinusoidal currents applied to the current_controller

    according to the commanded electromagnetic torque, Tem* and the rotor flux,

    lambdare_r. The dqe2abc block can be seen below. It utilizes the inverse Clarke and

    Park transformations; methods used to transform values referenced along the rotating

    reference frame, into values referenced in the stationary frame, by using equations 5.8

    and 5.9. isq and isd, are used to set the magnitude of the current sinusoidal values

  • 2001 Thesis Project A32 Gareth S Roberts

    produced by the dqe2abc block. rho sets the frequency or angular displacement of the

    signals.

    Figure 6.4. The dqe2abc block

    Figure 6.5. The Inverse_Park_Transform block

    Figure 6.6. The Inverse_Clarke_Transform block

  • 2001 Thesis Project A33 Gareth S Roberts

    6.2.2. The Current Controller The primary purpose of this block is the to regulate the voltage signal applied to the

    induction motor. The phase currents measured from the feedback portion of the circuit

    (ia, ib, ic) are subtracted from the commanded currents (ia*, ib*, ic*) The

    error generated is fed through PI controllers. After this, it is amplified to significant

    voltage levels that the induction machine can operate off.

    Figure 6.7. The Current_Controller block

    6.2.3. The Motor Model We are trying to simulate a three-phase, 4-pole symmetrical induction machine in the

    stationary reference frame with winding connections. For small dynamic stability

    analysis, a synchronously rotating reference frame yields steady-state values of steady-

    state voltages under balanced conditions [6]. We need to build a model that includes the

    stator and rotor flux referenced along the d-q axes. This is because these values are used

    to calculate the voltages induced in the rotor. Once again, calculations are greatly

    simplified when all quantities are referenced along the d-q reference frame, however, in

    this case, the d-q reference frame is stationary. Therefore, the angular position of the

  • 2001 Thesis Project A34 Gareth S Roberts

    2Jb d(r/b) = Tem + Tmech - TdampP dt

    rotor is not required to make the transformations. The abc2qds block seen in figure 6.2

    performs this transformation. The interior of the induction machine in

    stationary qd0 block can be seen below:

    Figure 6.8. The Induction machine in stationary qd0

    Explanation of the operation of this block is of no great relevance to this thesis. In short,

    this block allows the designer to:

    By using this equation:

    (6.2)

    The rotor mechanical speed can be calculated, which is essential for the whole

    operation of this SIMULINK design.

    Observe the dynamic response of this vector control method

    See how well such a control keeps the rotor flux constant during changes in load

    torque.

  • 2001 Thesis Project A35 Gareth S Roberts

    6.3. Simulation of the MATLAB design

    Simulation of the proposed MATLAB design is seen in Figure 6.2 is considered to be of

    significant importance to the success of this thesis project. While simulation gives an

    excellent insight into how well the design works, it also allows the designer to witness

    first-hand how all the sub-systems within FO control work together to produce the

    desired outputs. Hence, the designer can attain a deeper understanding of how FO

    control works. This knowledge is found mainly through the use of Scopes. A scope is

    a SIMULINK block that displays signals at nodes during simulation. The displayed

    signals from the scopes are the basis for discussion in this section of the report. The

    simulation studied occurred over 2 seconds. The integration method used is variable-

    step, the Dormand-Prince method with an initial step size of 0.0005s. Indeed, to

    effectively use this integration method with sine and cos functions would require a micro-

    controller with high processing power. This highlights why the TMS320F243 DSP

    controller is used for an application of this nature instead of the conventional Atmel,

    HC11 etc. chips.

    6.3.1. Speed response analysis The speed response of our designed control system is the outcome that is of the utmost

    significance to this section of the thesis project. By feeding an input speed command into

    the system, we are going to observe the speed developed by the rotor of the induction

    machine over time. The two major criteria that we are trying to fulfill are:

    1. That the system develops a speed response that closely resembles the input

    speed command.

    2. That the system is stable (stability is the most important design

    specification for any control system [7]).

    Other criteria that we are looking to achieve are a quick transient response (quick

    acceleration) and a response that is smooth.

  • 2001 Thesis Project A36 Gareth S Roberts

    Figure 6.9. The MATLAB speed simulation results

    For the simulation conducted, the speed input fed into this system (in figure 6.2) ramps to

    200rpm for the first 0.5s and then remains at 200rpm for the remaining 1.5s; this can be

    seen in figure 6.9. The other curve, which resembles an over-dampened second-order

    control system response, is the actual speed developed by the motor. The major

    conclusion that can be drawn from this graph is that our design works and there is no

    substantial indication of instability. The speed response curve adequately resembles the

    speed command curve. From figure 6.9, it can be seen that when the speed input

    command is constant, the speed response is relatively constant. Therefore, it is concluded

    this system is acceptably stable. Recalling that this motor control scheme would only be

    used to drive a hyper or electric car, it is concluded that this speed response is

    satisfactory.

    For this simulation, the steady-state error is 8 rpm, which is 4%. Let us say, for argument

    sake, that 200 rpm is equivalent to 60 km hr-1 for our electric car. Furthermore, the user

    provides the input speed command by applying a force on an accelerator pedal. A

  • 2001 Thesis Project A37 Gareth S Roberts

    steady-state error of this magnitude is not of any real concern as the user will simply

    press the accelerator pedal down until he/she sees that the speed developed by the car is

    60 km hr-1 via reading the speedometer on the dashboard of the car. However, inspection

    of figure 6.9 would suggest that there is room to speed up the transient response. To do

    this, we would have to add more proportional gain to the torque controller (the PI

    controller for the speed error signal) [7]. Therefore, an experiment was conducted where

    the proportional gain was increased from 30 to 60. The results can be seen below:

    Figure 6.10. The speed response of the control system where the proportional gain of the speed

    controller is increased

    As you can see, the transient response is faster as it follows the speed command slope

    more closely. The problem with this speed response is that the ramp response is not very

    smooth; instead, it is quite coarse and jagged. This indicates the existence of high

    frequency components that have significant voltage magnitudes. This could be either

    noise or harmonics. Both of these affect the short-term and long-term performance of the

    induction machine. According to Bose [3], harmonics can cause the following to an

    induction machine:

  • 2001 Thesis Project A38 Gareth S Roberts

    Harmonics:

    Can cause torque and speed disturbances (cogging and frequency beats)

    Can cause motor overheating due to excess iron and copper losses

    Causes motor current transients that overtax the inverter commutation ability. Furthermore, these high frequency components would strain mechanical components that

    are connected to the rotor. One important point that should be reinforced is that

    MATLAB is a program that models all the physical processes involved with this motor

    controller mathematically. It does not consider variables such as heat, magnetic

    saturation etc. With the presence of high frequency components, we have not seen how

    these variables or a rapid speed response may affect the operation of the induction

    machine. If we now increase the proportional gain from 30 to 90, the system becomes

    unstable as can be seen in Figure 6.11. Our speed control signal has no significant

    influence on the speed developed by the motor, therefore, our control design is no longer

    adequately controlling the induction machine.

    Figure 6.11. The speed response of the system with a proportional gain of 90

  • 2001 Thesis Project A39 Gareth S Roberts

    Therefore, it is concluded that increasing the proportional gain of the torque controller

    will:

    Either amplify or introduce high frequency components into the system that will

    damage the induction machine.

    The system will approach instability that breaches the fundamental design

    specification of any control scheme.

    Therefore, the proportional gain of the torque controller is elected to be 30. Based on the

    MATLAB analysis, we get an adequate transient response from this. Also, the transient

    response does not feature rapid, sharp transients of any kind. It seems to be a reliable and

    safe option. If one where to optimize the transient response of this system, they would

    have to conduct tests physically by trial and error as MATLAB does not truly

    demonstrate exactly how the induction machine behaves.

    6.3.2. Analysis of the Field-Orientated Section of the Design In the later stages of Chapter 4, it was mentioned that to increase the speed of the rotor,

    we have to increase the voltage and frequency by the same proportion. This ensures that

    we maintain a constant magnetic flux in the air-gap of the induction motor. In this

    section of the report, through the use of scopes placed on nodes of interest, we will see

    that FO applies this principle of speed operation. If you turn your attention to figures

    6.12 to 6.14, we see how FO control transforms the commanded DC signals applied by

    the user and the feedback signals into sinusoidal signals that the induction machine

    requires.

  • 2001 Thesis Project A40 Gareth S Roberts

    Figure 6.12. The top and bottom graphs are the cos(rho) and sin(rho) signals respectively.

    Figure 6.13. The ids^e* and iqs^e* curves over time

  • 2001 Thesis Project A41 Gareth S Roberts

    Figure 6.14. The applied signal to phase A of the Induction motor and the drawn current at phase A

    FO control is also referred to as vector control because it controls both the magnitude and

    phase of the voltage signal applied to the stator windings of the induction motor. The

    manner in which the phase changes over time for the cos_rho and sin_rho signals

    (figure 6.12) is very similar to the way the phase voltage signal develops over

    time (figure 6.14). Also, the iqs signal ramps for the first 0.5s then it remains constant

    (figure 6.13). The amplitude development of the phase voltage signal has a

    similar profile. Therefore, the cos_rho and sin_rho signals control the phase, while

    the iqs and ids signals control the magnitude. Hence, it is through these signals (all of

    which are produced in the FO_controller block) that FO control achieves vector

    control. Furthermore, it can be seen that the speed is linearly increased when the

    frequency and amplitude of the phase voltage signal are increased by the same

    proportion.

    The principle of increasing the voltage magnitude and the frequency by the same

    proportion in order to maintain a constant rotor flux is the basis for applying scalar volts

    per hertz speed control method. However, the equations used to execute FO control

    consider the parameters of the motor, therefore, we achieve better control over torque

  • 2001 Thesis Project A42 Gareth S Roberts

    variations. FO control also has the advantage of extending the speed range of operation

    through field weakening. Finally, FO control is a torque control method. This suits the

    requirements of the this thesis control design.

    6.3.3. The significance of feedback While the MATLAB design shown illustrates the behavior of a working solution, we can

    use it to demonstrate how the system would operate if components failed. What speed

    profile would the rotor develop without speed feedback? We can answer this question

    with MATLAB. By simply removing the feedback path from the design shown in figure

    6.2, we can see how the system operates without feedback. This highlights why

    MATLAB analysis is an intrinsic stage in the development of a working motor controller.

    Observe the figure below:

    Figure 6.15. The speed response of the system without feedback i.e. the open-loop response of the

    system

    As can be seen, there exists no adequate control over the steady-state response of the

    system. Hence, it has no stability. Furthermore, the transient response is erratic and

  • 2001 Thesis Project A43 Gareth S Roberts

    uncontrolled. This simulation highlights the need for feedback in this system. Because

    of this, it is very important that the encoder actually works and that we execute the speed

    feedback analysis correctly in the software design. If not, the induction motor will travel

    to speeds that are higher than we command and the system will become unstable. For an

    application such as a hyper or electric car, this would not be very good at all.

    6.4. The conclusions drawn from Chapter 6 We saw how FO control on an induction motor can be modelled and tested using

    SIMULINK.

    By simulating the control system shown in figure 6.2, we found that this

    developed a good speed response and there was adequate stability.

    It was concluded that the torque controller should have a proportional gain of 30,

    as this seems to be the safest and most reliable option based on the simulation

    results.

    Increasing the proportional gain of the torque controller will either introduce or

    amplify noise and/or harmonics. This affects the short-term and long-term

    performance of the induction machine. Also, by increasing the proportional gain

    of the torque controller, the system approaches unstable regions of operation.

    In Chapter 4, it was stated that to increase the speed of the rotor, we have to

    increase the magnitude and frequency of the voltage signal by the same

    proportion. We found that FO control emulates this principle.

    From the simulation results of the system without speed feedback, we witnessed

    that the speed response becomes unstable and dangerous.

  • 2001 Thesis Project A44 Gareth S Roberts

    7. The Software Design

    7.1 A basic overview of how the software is organized

    This section of the thesis project is concerned with formulating a software design that

    will instruct the DSP Controller to the extent that the design can control the torque and

    flux of the induction motor in a decoupled manner. The software design is the point of

    convergence for this thesis project. This is because it is the point where all theories and

    practices presented through the course of this report come to together to form an

    appropriate software design. The DSP controller commands the operation of the

    hardware by the use of the software design. The constructed software design is a C-code

    design. Programming DSPs in a high-level language such as C provides portability and

    maintainability. This allows for the program to be prototyped relatively quickly (relative

    to producing an assembler design) and the program can be optimized to this particular

    Figure 7.1. The flow-chart for this thesis project

    Start

    Initialize Parameters and ISRs. Write to the registers used for PWM, Encoder detection, ADC and SCI

    while (1)

    Calculate the desiredspeed input in rps

    Calculate the 3 phase currentsdrawn by the induction motor

    Calculate the required

    electromagnetic torque

    Calculate the

    required rotor flux

    +_

    Calculate the commanded iqs^e*, ids^e* and

    Calculate the required three phase currentsusing Clarke and Park transforms

    +_

    Encoder ISR PWM ISR

    Pulsedetection onthe QEP pins

    Regular interrupttriggered by Timer1

    Return

    Feed the existingthree-phase voltagevalues into the threePWM compareregisters

    Return

    Acceleratorinput

    A/D results

    Calculate the speedand position of therotor.

    PI controller +Voltage limitation

    Phase voltages

  • 2001 Thesis Project A45 Gareth S Roberts

    processor architecture.

    The flow-chart shown on the previous page is more complex than a standard flow chart

    used for a microprocessor. One of the inherent differences between a DSP controller and

    other microprocessors is that they have the ability to receive and service multiple

    interrupt sources very quickly. This highlights again the need for such a sophisticated

    DSP controller like the TMS320F243. The initialization section is where all the variables

    and constants that will be used in the program are initialized. The method void

    initalise_parm(void) initializes all the variables and constants, as well as calling

    the PWM, the ISR, the A/D conversion and the Serial Communication Interface (SCI)

    setup methods. In these methods, all the relevant registers associated with these

    processes are appropriately written to.

    The main program is essentially the Field Orientated control portion of the design. There

    are two interrupt routines (this may change by the time the final product is presented).

    The PWM Interrupt Service Routine (ISR) is regularly entered into in a real-time fashion.

    The PWM time period is set by TIMER1, an internal register within the DSP controller

    that can be set to an integer multiple of the clock period. The details of this routine will

    be seen in section 7.3. The second ISR is requested when the DSP detects a pulse on

    either the QEP1 or QEP2 pins from the encoder. The code embedded within this ISR

    will be detailed in section 7.4. At the time this report was complied, the encoder code

    was not fully tested. It is anticipated that there will be no need for an encoder ISR and

    the code used to calculate the positional angle of the rotor and the speed of the rotor will

    be embedded in the PWM ISR.

    7.2. The Main Program The Field-Orientated Control Portion of the Software Design

    This section of the design essentially emulates the processes presented in Chapter 6 from

    the SIMULINK design. Referring back to figure 6.2, we are formulating a software

    design that applies the initial summation block, the Torque PI controller, the

  • 2001 Thesis Project A46 Gareth S Roberts

    FO_Controller block, the dqe2abc block and the current controller block. It was

    mentioned earlier that we could generate a C code design from the MATLAB design

    using the real-time workshop. When this process was carried out, it was found that the

    generated C code was not very efficient in the way it utilized the variables it declared.

    Also, the MATLAB generated code used variables called temp1, temp2 etc.; this

    impedes the portability and maintainability advantages associated with using C code. By

    using temp variables, it is hard to see how FO control develops within the program. As

    a result, it makes optimization of the code a difficult process. Hence, it is concluded that

    the generated code in the real-time workshop is a good guide as to how to build the

    program. However, it should not be used as the final solution to the FO control portion of

    the software design.

    7.2.1 The torque controller & Field weakening All the constants and variables used in the main program are declared at the start of the

    program. The following flow diagram represents the torque controller and how it is used

    to generate the commanded electromagnetic torque signal:

    Figure 7.2. The speed error signal, wrm, is the input for the torque controller and Tem* is the output

    The Speed_input signal is made available by using the SCI interface. The value of the

    Speed_feedback variable is updated every time an encoder pulse is detected and the

    Encoder ISR (this will be seen in section 7.4) is requested. Hence, the generated speed

    error variable, wrm, is used in the torque controller section of this code. The integral gain

    section of the torque controller is simply represented by Integrator1. The code used

    to generate the Integrator1 value can be found in the Integrator blocks section of the

    Tem*Speed error

    Speed error Kp

    Integrator1

    +

    +

  • 2001 Thesis Project A47 Gareth S Roberts

    software design (see Appendix A). The following code is used to generate the

    Integrator1 value:

    /* The calculation of Integrator1 uses the trapezoidal rule where */ /* it updates its magnitude by integrating over the time period */ /* for timer1. */

    Integrator1 = Integrator1 + timer1_period*Gain_Ki*wrm;

    As the initial comment suggests, the trapezoidal rule is used to integrate the wrm value. If

    you turn your attention to figure 7.3, we can see how the trapezoidal rule works over time

    for a constant speed error signal. Every time this portion of the code is processed, the

    existing Integrator1 value is added to the TIMER1 period multiplied by the speed

    error signal, wrm and the Integral gain of the PI compensator, Ki. Therefore, the software

    design is effectively creating a step profile over time. This makes sense when you

    consider that the integration of a constant or straight line is a linear slope. The

    continuous blue line drawn in between the pink blocks in figure 7.3 demonstrates that by

    using the trapezoidal rule, we create a linear slope from a constant wrm value. The

    software design only requires the value of Integrator1 every TIMER1 period. Therefore,

    this method more than adequately suits the requirements.

    Figure 7.3. A graphical representation of how the trapezoidal rule develops the Integrator value over time for a constant speed error signal

    Application of the Trapezoidal rule over time

    0.00E+002.00E-054.00E-056.00E-058.00E-051.00E-041.20E-041.40E-041.60E-041.80E-042.00E-04

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

    TIMER1 interrupts

    The

    valu

    e of

    Inte

    grat

    or1

    0

    5

    10

    15

    20

    25

    30

    35

    40

  • 2001 Thesis Project A48 Gareth S Roberts

    If the motor controller is used over a long period of time and we do not slow the speed of

    the induction motor at any stage of the operation, the Integrator1 value will eventually

    reach a relatively large value. We do not want this to happen. This is because the

    generated electromagnetic torque command could reach values outside the possible

    operation limits of the induction motor. The other possibility is that Tem value could

    overflow. Therefore, the value goes from being relatively large to be being very small in

    one clock cycle. By using an if-else statement shown below (figure 7.4), we inhibit any

    chance of either of these scenarios occurring.

    Figure 7.4. Limiting the integration result In Chapter 6, the SIMULINK design used a look-up table to achieve field weakening.

    We could create the same in this software design, however, we would have to account for

    all the possible speed values. Therefore, the look-up table would be rather large and

    would strain the memory limits. By using the if-else statement shown, a constant flux is

    maintained below the rated speed limit. The Constant_flux sets the applied flux

    signal lambdare_r to be constant at 0.571 Wb. This is fundamental when the induction

    motor is operating in the constant torque region. Outside this region (the constant power

    region), the DSP CPU will decrease the flux value by setting it equal to the inverse

    square of the speed error signal multiplied by one hundred. The result of using this

    technique can be seen over the page:

    Integrator1 If (Integrator1 > Integrator1_US )

    Yes

    No

    Integrator1 = Integrator1_US

    Integrator1

    If (Integrator1 > Integrator1_LS )

    YesIntegrator1 = Integrator1_LS

    Integrator1

    No Integrator1

  • 2001 Thesis Project A49 Gareth S Roberts

    Figure 7.5. Calculation of the required rotor flux: Lambdare_r

    Figure 7.6. The results of using the field-weakening technique used in the software design

    7.2.2. Calculation of iqs^e*, ids^e*, cos(rho) and sin(rho) This section of the software design is equivalent to the FO_Controller block seen in

    the SIMULINK design shown in Chapter 6. The code used to generate the FO control

    variables can be seen in Appendix A. These calculated values are strongly dependent on

    the rotor and stator resistance values. One design consideration that has not been

    exploited by this software design, is that the rotor resistance and stator resistance values

    change as the induction machine is operated over time. This is because the induction

    motor heats up and the resistance magnitude of the stators windings and the rotors bars

    is proportional to heat. While we do not require precise speed control, the effects of heat

    Field_weakening using the if-else statement

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0 20 40 60 80 100 120

    Speed error

    Com

    man

    ded

    Flux

    Speed_feedback If (Speed_feedback > rated_speed )

    Yes

    No

    Field weakening

    Lambdare_r = the rated flux value

    Lamdare_r

    Lamdare_r

  • 2001 Thesis Project A50 Gareth S Roberts

    may become significant eventually. Therefore, if this software design were to be

    optimized in the future, the designer should strongly consider the inclusion of a self-

    tuning FO control module.

    The methods used to calculate the stator currents along the quadrature and direct axis are

    simply employing the formulae seen in Chapter 5. To calculate rho, the software design

    uses another Integrator variable. This integrator method again uses the trapezoidal

    method; the code used to create this value can be seen below:

    /* The magnitude of Integrator2 gets updated over the time period for timer1 */

    Integrator2 = Integrator2 + slip_speed *timer1_period;

    Figure 7.7. Overflow prevention of the slip angle

    This time we do not constrain the Integrator value to upper and lower limits. This is

    because the Integrator2 value is essentially the slip angle that was discussed in Chapter 5.

    Therefore, in order to ensure that overflow of this value never occurs, if the slip angle is

    equal to or greater than 3600, 3600 is subtracted from the current slip angle value. This

    will reset the slip angle value to 00 or lower. The result over time can be seen in figure

    7.8; it looks like a saw-tooth wave.

    After the DSP controller calculates the angle of rho, it calculates the sin and cos of rho.

    To do this, it requires the utilization of functions from the maths library. This will

    consume some valuable program execution time. All these values are used in the inverse

    Park Transform.

    Integrator2 (~Slip_angle)

    If (Integrator2 => 3600 )

    Yes

    No

    Integrator2 = - 3600

    Integrator2

    Integrator2

  • 2001 Thesis Project A51 Gareth S Roberts

    Figure 7.8. Development of the slip angle over time

    7.2.3. The Current Controller section of the software design

    Figure 7.9. This flow chart demonstrates how the Current Controller section works

    At the start of this section of the code, there is a summing junction for the commanded

    phase currents and the feedback currents. After this, each phase current error is fed

    through their own PI controllers. Once again, Integration methods are employed that

    utilize the trapezoidal rule and an if-else statement to limit the values calculated.

    Limiting the values is very important because it prevents numbers that are either negative

    or greater than the TIMER1s triangular waves amplitude from being sent to the PWM

    compare registers. The PI compensators proportional gain is used to scale the current

    error value.

    Demonstration of the slip angle over time

    0

    50

    100

    150

    200

    250

    300

    350

    400

    0 20 40 60 80 100 120 140time

    slip

    ang

    le

    Ia_command

    Ia_feedback

    -

    + Ia_command PI controllerVa_command

    TIMER1 ISR request

    TIMER1compareregister #1

    16

  • 2001 Thesis Project A52 Gareth S Roberts

    7.3. The PWM Interrupt Service Routine The software design generates symmetrical complementary PWM signals at 20kHz

    where TIMER1 is used as a time base. The TIMER1 period is set in the PWM_setup() method to be 500 (20kHz = 20Mhz/(500*2) and 20MHz is the clock speed). By setting

    up the relevant registers in continuous up-counting mode, the DSP unit can generate a

    triangular wave that is compared to the value placed into the three TIMER1 compare

    registers. Because the design requires 6 PWM signals and we only write to 3 compare

    registers, we have to set the GP TIMER1 control register into Time Source Symmetric

    mode. This means that for the PWM signal on phase A, its complement is also produced.

    Hence, three-phase symmetric PWM signals are generated as a consequence.

    To illustrate how PWM signals are generated, we will send the following values into the

    three compare registers to generate the following waveforms:

    TIMER1 period register, TPR = 5h

    TIMER1 compare register1, CMPR1 = 3h

    TIMER1 compare register2, CMPR2 = 2h

    TIMER1 compare register3, CMPR3 = 4h

    Figure 7.10. The PWM waveforms generated with dead-band enabled[11]

  • 2001 Thesis Project A53 Gareth S Roberts

    As can be seen, the amplitude of the generated triangular wave is 5 and its period is 10.

    TIMER1 compare register 3 was sent the largest compare value (4h), however, it had the

    smallest duty ratio of all the non-complemented waveforms. Based on this, the PWM

    process effectively inverses the number fed into the compare register.

    Figure 7.11. Shows the internal infrastructure of the DSP controller that is concerned with PWM

    generation (use Figure on page 7 of the dead-time generation) [11]

    As can be seen in the diagram above, we have to program the GP Timer 1 register to

    provide the correct PWM period. Also, the three compare units will have to be fed the

    desired compare values (the three-phase current values) every time the PWM ISR is

    requested. The registers associated with generating Symmetric PWM and Dead-Band

    Control have to be correctly enabled.

    When the GP timer is in this mode, the state of the output of the waveform generator is

    determined by the following:

    0 before the counting operation starts

  • 2001 Thesis Project A54 Gareth S Roberts

    Remains unchanged until the first compare match

    Toggles on the first compare match

    Remains unchanged until the second compare match

    Toggles on the second compare match Remains unchanged until the end of the period.

    Requesting an interrupt every TIMER1 period is fundamentally important if PWM is to

    implemented. There are three steps that must be undertaken to ensure that the interrupt

    service routine associated with PWM is requested at regular intervals:

    1. Define the interrupt routine in the x.C file. For this software design, the

    following code was used to achieve this: #define PWM_ISR c_int2

    void PWM_ISR (void) {

    2. An initialize interrupt method must be declared before the while (1) statement

    starts running. In this initialize interrupt method, the interrupt mask register

    (IMR) and the group A i