speed control of a switched reluctance motor benjamin pilley...switched reluctance motor. further...

79
Speed Control of a Switched Reluctance Motor Benjamin Pilley 2 nd November 2005 A thesis submitted in partial fulfilment of the requirements for the degree of Bachelor of Engineering in Electrical Engineering at The University of Newcastle, Australia.

Upload: others

Post on 26-Feb-2021

23 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

Speed Control of a Switched Reluctance Motor

Benjamin Pilley

2nd November 2005

A thesis submitted in partial fulfilment of the requirements for the degree of

Bachelor of Engineering in Electrical Engineering at The University of

Newcastle, Australia.

Page 2: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

i

Abstract The aim of this project is to control the speed of a Switched Reluctance Motor. A

current controller, utilising a Mitsubishi M16C microcontroller, from a previous attempt at

this project will be used. The switched reluctance motor was originally from a washing

machine but required a new controller for research into a general purpose drive. A speed

control loop has been placed around the existing current controller and a PI speed controller

now controls the motor. The speed is measured using the position encoder and filtered to

reduce the effects of noise. A means of varying the commutation turn on and turn off angles

has been implemented to give greater control on the production of torque. The drive and user

interface circuitry has been mounted in an instrument case for teaching purposes. Extra

functionality has been added in the form of protection, ramping of the speed set-point and an

LCD.

Further work has been undertaken into investigating methods that remove the need

for a mechanical position sensor. The ruggedness and reliability of the SRM makes it suitable

for applications in harsh environments and removing the dedicated shaft position sensor

further improves its potential in these applications.

Page 3: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

ii

Acknowledgments I would like to take this opportunity to thank the many people that have helped me

throughout the project. It has been a challenging, but rewarding experience and it is only

fitting that I acknowledge those that have helped me get to this point.

To my Parents, family and friends who supported me along the way and helped in

anyway they could. This is dedicated to you.

I would like to thank Colin Coates, my academic supervisor for the guidance, support

and ideas provided throughout the year.

Finally I would like to thank all the technical staff in the electrical engineering

department, but especially Nick Hawryluk and Chris Jones who readily provided equipment

when needed.

Thankyou,

Benjamin Pilley

Page 4: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

iii

List of Contributions Contributions that have been made during this project include:

• Reconstruction of previous project.

• Implementation and tuning of PI speed controller.

• Improvement on position detection techniques using position estimation.

• Design and construction of enclosure.

• Addition of an LCD.

• Adjustable commutation angles.

• Calculation of optimal turn on angle.

• Long and short dwell commutation schemes.

• Modification of current transformers.

• State machine background software.

• Improved reliable starting method.

• Ability to reverse while already running.

• Agitation demonstration mode.

• Accurate measurement of speed.

• Filtering of measured speed.

• Stall and current protection.

• Investigation into position sensor-less methods.

• Measuring inductance profile.

• Trialling of a position sensor-less method.

Signed,

Benjamin Pilley Colin Coates

______________ ________________

2/10/2005 2/10/2005

Page 5: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

iv

Table of Contents

ABSTRACT...................................................................................................................................... I

ACKNOWLEDGMENTS ............................................................................................................... II

LIST OF CONTRIBUTIONS ........................................................................................................III

TABLE OF CONTENTS ...............................................................................................................IV

LIST OF FIGURES...................................................................................................................... VII

1. INTRODUCTION........................................................................................................................ 1

1.1 SCOPE....................................................................................................................................... 1 1.2 OVERVIEW OF SWITCHED RELUCTANCE MOTORS ....................................................................... 2 1.3 ADVANTAGES AND DISADVANTAGES ......................................................................................... 2 1.4 APPLICATIONS........................................................................................................................... 3 1.5 OUTLINE OF REPORT ................................................................................................................. 4

2. THEORIES AND PRINCIPLES.................................................................................................. 5

2.1 VARIATION OF INDUCTANCE WITH ROTOR POSITION................................................................... 5 2.2 THE VOLTAGE EQUATION .......................................................................................................... 8 2.3 CONTROL METHODS................................................................................................................ 11

2.3.1 Energising the SRM......................................................................................................... 11 2.3.2 Voltage Control............................................................................................................... 12 2.3.3 Current Control............................................................................................................... 12 2.3.4 Single Pulse Mode ........................................................................................................... 13 2.3.5 Commutation and Firing Angles ...................................................................................... 14

3. HARDWARE AND BACKGROUND SOFTWARE................................................................. 17

3.1 HARDWARE............................................................................................................................. 17 3.1.1 SRM and Converter Circuit ............................................................................................. 17 3.1.2 Microcontroller............................................................................................................... 18 3.1.3 Current Feedback............................................................................................................ 18 3.1.4 Position Encoder............................................................................................................. 19 3.1.5 User Interface ................................................................................................................. 20 3.1.6 Interface Board ............................................................................................................... 21 3.1.7 Enclosure ........................................................................................................................ 21 3.1.8 Power Supplies................................................................................................................ 21

3.2 BACKGROUND SOFTWARE ....................................................................................................... 22 3.2.1 Initialisation, Reset and Off State..................................................................................... 22 3.2.2 Motor Start Procedure..................................................................................................... 24 3.2.3 On State .......................................................................................................................... 25

Page 6: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

v

3.2.4 Reverse State................................................................................................................... 26 3.2.5 Agitate State.................................................................................................................... 26

4. FOREGROUND SOFTWARE AND CONTROLLER ............................................................. 28

4.1 POSITION ESTIMATION............................................................................................................. 28 4.2 COMMUTATION ANGLES .......................................................................................................... 31

4.2.1 Advance Angle................................................................................................................. 31 4.2.2 Turn Off angle................................................................................................................. 32

4.3 COMMUTATOR ........................................................................................................................ 33 4.4 CURRENT CONTROLLER........................................................................................................... 35 4.5 OVER CURRENT PROTECTION .................................................................................................. 35 4.6 USER INTERFACE TIMER .......................................................................................................... 35 4.7 SPEED MEASUREMENT AND FEEDBACK .................................................................................... 36 4.8 SPEED FILTER ......................................................................................................................... 37 4.9 SPEED SET POINT CREATION AND RAMPING.............................................................................. 38 4.10 STALL PROTECTION ............................................................................................................... 38 4.11 PI SPEED CONTROLLER.......................................................................................................... 39

4.11.1 Tuning the Speed Controller .......................................................................................... 39 4.11.2 Implementing the Speed Controller ................................................................................ 40

4.12 INTERRUPT PRIORITIES .......................................................................................................... 40 4.13 PROCESSOR LOADING ............................................................................................................ 41

5. RESULTS ................................................................................................................................... 42

5.1 SPEED MEASUREMENT ............................................................................................................ 42 5.2 POSITION ESTIMATION............................................................................................................. 42 5.3 CURRENT CONTROL ................................................................................................................ 44 5.4 SPEED CONTROL ..................................................................................................................... 46

6. POSITION SENSOR-LESS TECHNIQUES ............................................................................. 49

6.1 REVIEW OF POSITION SENSOR-LESS TECHNIQUES ..................................................................... 49 6.1.1 Flux-linkage.................................................................................................................... 50 6.1.2 Observation of the Phase Current Waveform.................................................................... 50 6.1.3 Active Probing................................................................................................................. 51

6.2 INVESTIGATION INTO ACTIVE PROBING .................................................................................... 52 6.2.1 Measurement of the Inductance Profile ............................................................................ 52 6.2.2 Implementation of Active Probing .................................................................................... 53 6.2.3 Results and Issues............................................................................................................ 55

7. CONCLUSION........................................................................................................................... 57

7.1 WORK BEFORE OPEN DAY....................................................................................................... 57 7.2 FUTURE WORK........................................................................................................................ 57 7.2 CONCLUSIONS ......................................................................................................................... 57

Page 7: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

vi

REFERENCES............................................................................................................................... 59

Appendix A- Software in C code

Appendix B-Ports and connections

Appendix C-Speed calculation errors

Appendix D-Current setpoint

Appendix E-Speed controller tuning

Appendix F-Circuit diagrams

Appendix G-Photos

Page 8: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

vii

List of Figures FIGURE 2.1 2/2 SWITCHED RELUCTANCE MOTOR [8]. ............................................................................................ 6

FIGURE 2.2: INDUCTANCE PROFILE FOR THE SINGLE PHASE 2/2 SRM....................................................................... 6

FIGURE 2.3 3 PHASE 6/4 SRM [2] ........................................................................................................................ 7

FIGURE 2.4: 12/8, 3 PHASE SWITCHED RELUCTANCE MOTOR [2] ............................................................................ 7

FIGURE 2.5: FLUX LINKAGE VERSUS CURRENT CURVES AT VARIOUS ROTOR POSITIONS FOR A) IDEAL, B) PRACTICAL. . 8

FIGURE 2.6: EQUIVALENT CIRCUIT FOR A SINGLE PHASE......................................................................................... 9

FIGURE 2.7 HALF-BRIDGE INVERTER [2] .............................................................................................................11

FIGURE 2.8 CURRENT CONTROL METHODS ..........................................................................................................13

FIGURE 2.9: TORQUE SPEED CURVE FOR A SRM [13]...........................................................................................14

FIGURE 2.10: PHASE INDUCTANCE PROFILES WITH ENCODER PATTERN FOR THE 12/8 THREE PHASE SRM ..................15

FIGURE 2.11: DETERMINING THE TURN ON ANGLE. ...............................................................................................16

FIGURE 3.1: HARDWARE OVERVIEW [2] ..............................................................................................................17

FIGURE 3.2: BACKGROUND SOFTWARE FLOW .......................................................................................................23

FIGURE 3.3: STARTING PROCEDURE.....................................................................................................................25

FIGURE 3.4: REVERSE AND AGITATE MODES OF OPERATION ..................................................................................27

FIGURE 4.1: BLOCK DIAGRAM OF SPEED AND CURRENT CONTROLLERS..................................................................28

FIGURE 4.2: FOREGROUND SOFTWARE .................................................................................................................29

FIGURE 4.3: A) POSITION ENCODER EDGE DETERMINATION AND B) LOGIC OF POSITION ESTIMATION .........................30

FIGURE 4.4: A) COMMUTATION WITH NO OVERLAP B) COMMUTATION WITH OVERLAP ............................................34

FIGURE4.5: SPEED CALCULATION, DISPLAY AND RETURN FUNCTION.......................................................................37

FIGURE 4.6: INTERRUPTS IN ORDER OF PRIORITIES ................................................................................................41

FIGURE 5.1: ESTIMATION OF POSITION AT 1 RPS ..................................................................................................43

FIGURE 5.2: ESTIMATION OF POSITION AT 10RPS.................................................................................................43

FIGURE 5.3: POSITION ESTIMATION AT 25 RPS.....................................................................................................44

FIGURE 5.4: OVERLAPPED CURRENT WAVEFORMS AT 13RPS.................................................................................45

FIGURE 5.5: NON-OVERLAPPED CURRENT WAVEFORM AT 13 RPS..........................................................................45

FIGURE 5.6: CURRENT WAVEFORMS AT 7RPS. .....................................................................................................46

FIGURE 5.7: START-UP WITH NO LOAD. ................................................................................................................47

FIGURE 5.8: START-UP WITH LOAD......................................................................................................................47

FIGURE 5.9: SPEED REFERENCE CHANGE AND RESULTING MOTOR SPEED. ................................................................48

FIGURE 5.10: CHANGED IN LOAD AT FIXED SPEED.................................................................................................48

FIGURE 6.1: COMBINED FIGURE SHOWING RISE/FALL TIME AND CHANGE OF SLOPE METHODS....................................51

FIGURE 6.2: ACTIVE PROBING IN AN UNEXCITED PHASE.........................................................................................52

FIGURE 6.3: INDUCTANCE CURVES AT VARIOUS MECHANICAL ANGLES AND CURRENTS. ...........................................53

FIGURE 6.4: ACTIVE PROBING METHOD................................................................................................................54

FIGURE 6.5: ACTIVE PROBING OF PHASE A...........................................................................................................55

FIGURE 6.6: RESULTS OF ACTIVE PROBING METHOD..............................................................................................55

Page 9: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

1

1. Introduction The increase in need for variable speed drives in industry and consumer applications

has seen renewed interest in the Switched Reluctance Motor (SRM). Reluctance machines

have been around in one form or another since the 1830s [1]. The introduction of

semiconductor power switching technology in the 1960s saw the first modern SRM become a

reality, however it was not until the late 1980s that the interest in SRMs increased. Since then

much research and development on these motors has taken place. Only a small number of

commercial products presently use SRMs. However the advantages of the SRM over other

drives, particularly in applications requiring reliability and adjustable speed, continue to fuel

research on these motors.

1.1 Scope

The primary aim of this project is to design and implement a speed controller for a

Switched Reluctance Motor. Further work is to be done to research methods of advanced

control using sensor-less control. Finally the drive will be packaged in a more user friendly

arrangement to ease further work on the motor.

The switched reluctance machine and its associated drive electronics were obtained

from a washing machine. In 2003, Mathew Tildesley designed a current controller for the

motor [2] and this project builds on this and adds speed control. The existing current

controller uses the Mitsubishi M16C microcontroller, bypassing the original controller. The

original drive circuit still remains. This project will continue using this arrangement as the

microcontroller has the ability to handle the planned speed controller.

The further work undertaken into removing the need for a mechanical position sensor

by investigating position sensor-less control is motivated by one of the main advantages of

the SRM. The ruggedness and reliability of the SRM makes it suitable for applications in

harsh environments and removing the dedicated shaft position sensor further improves its

potential in these applications.

The installation of the drive circuit and various interfacing electronics inside an

enclosure increases the safety of the user when running the motor at voltages above the safe

levels specified in AS/NZS3000:2000. It will also increase the ease of use in demonstrations

and for future final year projects, teaching or use in the laboratories.

Page 10: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

2

1.2 Overview of Switched Reluctance Motors

All electrical machines can be classified into two different categories depending on

how they produce torque. The first is electromagnetic, where motion is produced from the

interaction of the two magnetic fields produced by the stator and the rotor. This produces an

electromagnetic torque that tends to bring the fields into alignment. The vast majority of

motors fall into this category, such as DC and induction motors, but they differ on how their

magnetic fields are generated.

The second type, of which the SRM is included, produces its torque “by the tendency

of its moveable part to move to a position where the inductance of the excited winding is

maximized” [3]. These motors are known as variable reluctance motors. The tendency of the

rotor is to move to a position of minimum reluctance, in order to close the flux path, thereby

producing torque. The term ‘switched’ derives from the switching of the currents in the

individual stator phases, more accurately described as commutation. This switching creates

momentary magnetic circuits which cause the rotor to continuously move to a position of

minimum reluctance. By controlling the switching strategy, and the current flowing through

the stator coils, we can control the torque and the speed of the motor.

1.3 Advantages and Disadvantages

The SRM has no permanent magnets; therefore its construction is very simple. It has

windings on the stator, but not on the rotor. The rotor is quite basic, consisting of steel

laminations stacked around the shaft. This attributes a number of advantages to the SRM. The

costs “and problems associated with permanent magnets (such as magnetization and

demagnetization) are avoided” [3]. The rotor is easier to manufacture and weighs less, giving

the shaft a low inertia, therefore increasing its ability to accelerate and its ability to operate at

high speed. The lack of windings produces minimal heat, eliminating the difficulties that arise

from the need to cool the inside of the motor.

The SRM is able to operate over a very wide speed range without any special

arrangements or modifications. Due to the simple construction and lack of brushes, they are

very robust and suitable for operation in harsh environments. This also means that in simple

applications such as a general drive, little maintenance is required and a long life can be

expected.

Unfortunately, the SRM has some shortcomings. The most important is that its

control characteristics are nonlinear. This is caused by a number of factors including fringing,

magnetic saturation and the reliance on a single excitation source. Another disadvantage,

compared to other types of motors, is the commutation of the SRM has to be done

Page 11: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

3

electronically, rather than being operated from an AC source or DC bus like other more

popular motors. This requires a microcontroller and power electronics to control the

commutation of the motor’s phases.

The need to provide the controller with rotor position information requires the use of

a mechanical encoder, typically a slotted disc with photo interrupters or Hall Effect sensors.

The dependence on these mechanical sensors increases “the cost and complexity, and tend to

reduce the reliability of the drive system. The discrete sensors are also undesirable in space

restricted applications.”[4]. The alternative is to use a sensor-less method of position

detection that relies on online measurements of motor parameters. This eliminates the

mechanical position encoders but typically requires extra software overheads such as a fast

processor or reasonable amounts of memory.

Another disadvantage is the ripple in the production of torque. This is due to the

switching of the current in the phases. This ripple can be attributed to the period when a stator

phase is energized, but the rotor is in an unaligned position and therefore unable to produce

the maximum amount of torque. The switching of the current can also produce an amount of

acoustic noise if the switching frequency is in the audible range of frequencies.

1.4 Applications

The advantages of Switched Reluctance Motors, such as reliability and speed range,

have seen them adopted into a variety of applications. For example the motor that this project

is concerned with originated in a washing machine. Below are some examples of real world

applications.

• CompAir Broomwade Limited uses switched reluctance motors in some of its

variable speed compressors.

• Besam AB uses switched reluctance motors in its Besam EMD 3000 sliding door

operating system

• Smallfry utilises a compact SRM in its “next generation of food processors” [5].

• SR Drives Manufacturing Ltd manufactures switched reluctance motors for use in

hazardous environments such as mines.

• Automotive applications such as power steering[6].

With continuing research and development into overcoming the disadvantages of torque

ripple and the need for a rotor position sensor, the adoption of the SRM as a general purpose

drive will start to take place.

Page 12: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

4

1.5 Outline of Report

Chapter 2 provides a look at the basic principles of the SRM. The properties of the motor

are discussed with reference to the voltage equation and the torque equation is developed. A

brief look at the circuit used to control the SRM and some of the methods of control are

introduced.

Chapter 3 outlines the hardware involved in the project and the background software.

Chapter 4 presents the controller and supporting functionality that occurs during the

interrupts.

Chapter 5 presents the results of the drive with the speed controller.

Chapter 6 contains some background, work and results on position sensor-less methods

of control.

Chapter 7 concludes the report, presenting what has been achieved, the road to the open

day and some future possibilities for projects involving this motor.

Page 13: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

5

2. Theories and Principles This section will outline the basic principles of operation of the SRM and expand on

the relevant information required for the discussion of the project. The motor that this project

is based on is a 12/8, 3-phase SRM, with 12 stator poles and 8 rotor poles. References will be

made to different stator/rotor layouts to explain the basic principles. Firstly a 2/2 motor will

be used to explain the variation of inductance with rotor position and then the process of

torque production. A 6/4 motor will then be used to explain the methods of rotation. The

torque equation will be derived using the voltage equation. Finally the circuit used to energise

the SRM will be introduced and the typical methods used to produce torque.

2.1 Variation of Inductance with Rotor Position

The 2/2 SRM shown in figure 2.1 is a simple machine that can only produce torque

over a limited arc of rotation, but will serve as the basis of a discussion on one of the main

principles of SRMs, the variation of inductance with respect to rotor position. From the theory

of electromagnetism, reluctance is the “opposition offered to the establishment of magnetic

lines of force in a magnetic circuit”[7] and is defined as

Al

µ=ℜ H-1

where l is the length (m) and A is the cross-sectional area (m2) of the magnetic circuit. The

permeability is µ (Hm-1). The inductance is inversely related to reluctance and is defined as

ℜ=

2nL Hm-1

where n is equal to the number of turns. When the windings around the stator coil are

energised and the stator and rotor poles are not aligned, the lines of flux will have to travel

across a large amount of air. The reluctance of the circuit will be a maximum, making the

inductance minimal. As the rotor pole moves to overlap the stator pole, the flux lines will be

able to find a path of lower reluctance through the air-gap between the poles. When the two

poles are aligned, the reluctance will be at a minimum and the inductance at a maximum. A

typical inductance profile for a single phase of an SRM can be seen in figure 2.2.

Page 14: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

6

Figure 2.1 2/2 Switched Reluctance Motor [8].

Figure 2.2: Inductance profile for the single phase 2/2 SRM

The 2/2 SRM in figure 2.1 is unable to produce continuous unidirectional torque.

Obviously there needs to be more phases so that gaps in the production of torque can be

accounted for by the other phases. Figure 2.3 shows a 6/4, 3-phase SRM. When the phase pair

A-A’ are energized, by supplying current to the coils around each pole, the rotor pole pair X-

Y will rotate to align with A-A’ in order to close the flux path and increase inductance. If

rotation is required in the clockwise direction, A-A’ is switched off and the pair C-C’ is

energized, causing the rotor poles W and Z respectively to rotate to align with the C poles.

The B pair are energized next, acting on X and Y and so on. “The cycle of torque production

associated with one current pulse is called a stroke” [3]. The stroke is also definable as the

step angle, which can be calculated using the following equation.

radqN r

πε

2=

Where rN is equal to the number of rotor poles and q is the number of phases. For the 6/4

motor, the stroke is equal to 0.523 rad or 30 degrees.

Page 15: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

7

Figure 2.3 3 phase 6/4 SRM [2]

Thus when the rotor is aligned with phase A as in figure 2.3, and the next phase is activated,

in this case C, the rotor will move 30 degrees to a position of maximum inductance. For the

12/8 SRM involved in this project (see figure 2.4) the stroke is 0.26 rad or 15 degrees. To

complete a full revolution, the 12/8 motor needs 24 steps.

Figure 2.4: 12/8, 3 phase Switched Reluctance Motor [2]

Page 16: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

8

2.2 The Voltage Equation

By examining the voltage equation and determining an expression for torque we can

learn a great deal about the operation of the SRM. By undertaking a linear analysis we assume

that the inductance is unaffected by the current. In a practical SRM, saturation occurs as the

current in the phase increases beyond a certain point contributing to the machines non-linear

nature. In figure 2.5 we see a typical set of magnetisation curves for a SRM. The ideal curves

are shown next to these. For this analysis the ideal case will suffice. We can also ignore the

fringing flux about the pole corners and make the assumption that the flux crosses the air gap

in a radial manner. The mutual coupling between phases is ignored in this case as its effect is

negligible. These assumptions can be made to simplify the analysis, without eliminating the

important characteristics.

Figure 2.5: Flux linkage versus current curves at various rotor positions for A) Ideal, B) Practical.

The expression Vo is the applied voltage to one phase [9]:

dtd

RiVo)(θλ

+=

Where, Vo is the voltage across the phase winding, R is the winding resistance, ? (?) is the

flux linkage that varies with position and is expressed as:

iL ⋅= )()( θθλ

dtiLd

RiVo))(( ⋅

+=θ

Using the product rule:

θωθ

ddL

idtdi

LRiVo ⋅++= )( eq 1

Page 17: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

9

The three terms on the right hand side of this equation relate to the resistive voltage drop, the

inductive voltage drop and the induced EMF respectively. Note that the induced EMF is

dependent on the rotor position, shaft speed and the current and so can be difficult to

calculate. The equivalent circuit for a single phase of a SRM can be seen in figure 2.6.

Multiplying both sides of the equations with the current gives the instantaneous power.

θθ

ωθd

dLi

dtdi

iLRiiVP oi)(

)( 22 ⋅++== eq 2

The energy stored by an inductor is given by

2

21

LiW =

Power in an inductor is given as the change in energy over time. The product rule gives

dtdi

LiddL

idtdi

LidtdL

iLidtd

pL +=+=

=

θω222

21

21

21

eq 3

Using the law of conservation of energy the mechanical power can be found by subtracting

the power loss due to the winding resistance and the inductor. Subtracting equation 3 and Ri2

from equation 2 will give

θθ

ωd

dLiPi

)(21 2 ⋅=

The electro-mechanical torque is equal to power over the speed of rotation. Applying that to

the equation above will leave us with the result

θθ

ddL

iTe)(

21 2=

Figure 2.6: Equivalent circuit for a single phase.

Page 18: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

10

Further investigation into this equation reveals some key concepts in the operation of the

SRM.

1. The torque produced by the motor is independent of the direction of the current due to

the i2 term.

2. The dL/d? term is the slope of the inductance curve shown in figure 2.2. Due to the i2

term, the direction of the torque is dependent on the slope of the inductance curve.

Therefore to produce positive or motoring torque, current should be applied only

where the slope of the inductance is rising. Likewise negative or braking torque can

be produced by applying current when the slope of the inductance curve is negative.

3. While motoring, current in the energised phase needs to exit the windings before the

rotor reaches the aligned position. Current left in the energised phase after this would

produce negative torque, reducing the efficiency of the motor.

4. The second property implies that where the slope of the inductance profile is small,

the torque produced will be smaller than when the slope is at a maximum. Therefore

about the aligned and unaligned positions of each of the phases of the SRM, the

torque produced will be much smaller than where the slope is a maximum. This has

implications for the starting of the motor, where the starting phase cannot produce

enough torque to rotate the shaft.

5. While this is a linear analysis, in reality the inductance curve is a function of the

position as well as the current, making further development of the equivalent circuit

and model difficult.

6. The i2 term is proportional to the torque, giving the SRM good starting torque. The

lack of windings or magnets on the shaft also contributes.

7. Property two also implies that the SRM is capable of four quadrant operation.

Switched reluctance generators have been popular with researchers and show many

promising advantages over other generators especially in applications requiring

“robustness, high speed and fault tolerance”[10].

8. The direction of rotation is determined by the order in which the phases are energised.

This is a simple operation to perform.

9. The SRM requires a converter circuit and a method of controlling it. It cannot be

operated directly from a DC bus or three phase power supply. This relegates the SRM

to use as a variable speed drive to justify the cost and complexity of the converter

circuit.

The instantaneous change of the current waveform cannot be reproduced in practice

and effective ways to approximate and control this will be discussed next.

Page 19: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

11

2.3 Control Methods

There are three common techniques for energising and controlling the current applied

to the stator phases. These are Single Pulse Mode, Voltage control and Current control. The

basic principles are outlined below after an introduction into the circuit used to energise the

SRM.

2.3.1 Energising the SRM

The SRM in this project is energised using an Asymmetric Half Bridge Inverter

shown in figure 2.7. This is a common topology used for this type of motor as it allows each

phase to be energised independently. There are three voltages that can be applied to the stator

windings. Taking Phase A for example, if both the Hi FET and Lo FET are switched on the

voltage applied to the stator winding will be +Vpos, or in the case of this project, +30V. This

is assuming that Vneg is 0Volts, which is the case in this project. The stator winding will

experience 0Volts if only one of the FETs is switched on and –Vpos if both of the FETs are

off and the current is free wheeling through the two diodes.

There are two common methods of switching, soft chopping and hard chopping. Soft

chopping has only one FET doing the chopping, steering the current through the windings.

The other FET continues to conduct throughout the excitation. In this case the stator windings

experience either +30V or 0V. The other method, hard chopping, switches both FETs on or

off together or between +30V and -30V. This method “generally produces more acoustic and

electrical noise, and increased current ripple…” [11] so soft chopping is generally preferred

and is used in this project.

Figure 2.7 Half-Bridge Inverter [2]

Page 20: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

12

2.3.2 Voltage Control

Voltage control does not use measurements of the current to control the excitation of

the phases. This would make it suitable for a low cost drive, but in this case its inability to

control and limit the current makes it undesirable. This limitation means there is no control

over the torque output and smooth torque production is difficult to achieve. It is performed

using a fixed frequency Pulse Width Modulation (PWM) with variable duty cycle which is set

by the outer speed control loop. However this was not a previously implemented method of

controlling the current for this project so warrants no further discussion.

2.3.3 Current Control

The most common methods of current control for a SRM involve measuring the

current and then chopping either the current or the voltage to achieve the desired effect.

Chopping is the switching on/off of the power transistors at a high frequency, compared to the

fundamental frequency of the phase current waveform. The current chopping method of

current control is a hysteresis type control. The power transistors are switched off if the

specified current set point is exceeded by the measured current. When the measured current

falls below the set point, the transistors are switched back on. The supply voltage remains the

same in this case, but the switching frequency changes. This can “cause a subsonic noise in

the SRM”[12] which increases the noise produced by the motor. This makes it an undesirable

choice for some applications.

The Chopping Voltage method of current control is the one that has been previously

implemented for this project. It involves chopping the supply voltage at a fixed frequency to

maintain the measured current about a set point. The duty cycle is determined by the

difference between the measured current and the set point set by the speed controller. Figure

2.8 shows the voltage being chopped in order to maintain the current within an error band.

This method of control was chosen as it is possible to control the torque quite accurately.

Voltage control does not take the stator current into account and therefore the torque that is

produced is not as smooth or constant as that produced by a current controller.

Page 21: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

13

Figure 2.8 Current Control Methods

2.3.4 Single Pulse Mode

The previously mentioned current control methods are suitable for low to medium

speed operation. However once the ‘base’ speed is reached (see figure 2.9), the back-EMF

produced by the motor will increase to the point where the power transistors will have to

remain on throughout the stroke to maintain the required current. Should the supply voltage

be chopped, the average voltage would fall. This would have the effect of reducing the current

and hence reducing torque.

To increase the speed further there are two possible solutions. The first is to increase

the period that the phase is conducting. This conduction period is also known as the dwell

angle. The second involves keeping the dwell angle constant and advancing the turn on angle.

A combination of these methods is also possible. If we advance the turn on angle so that the

“phase commutation begins sooner, we gain the advantage of producing current in the

winding while the inductance is low, and also of having additional time to reduce the current

in the winding before the rotor reaches the negative torque region”[13]. This method of

current control has not been used in this project. At the low to medium speeds of this motor in

its present configuration the previously mentioned voltage chopping method of current

control will be used.

Page 22: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

14

Figure 2.9: Torque Speed Curve for a SRM [13]

2.3.5 Commutation and Firing Angles

The design of the SRM requires that the commutation of the phases be managed by

the controller unlike a DC motor which uses commutator brushes. The choice of commutation

angles for the SRM has a large effect on the performance. The commutation angles are

chosen “in such a way that they optimise the overall performance of the motor; e.g. minimise

currents or maximise efficiency”[14]. This flexibility allows the varying of the turn on angle

online to optimise performance.

Throughout the report references will be made to mechanical angles and electrical

angles. A portion of a typical inductance profile for the three phases of a 12/8 SRM can be

seen in figure 2.10. The phase inductance repeats every 45 degrees. The mechanical angle

refers to the physical angle between the shaft and the body of the motor where one revolution

is equal to 360 degrees. With the angle relative to the aligned position of phase C, one period

of the phase inductance is said to be 360 electrical degrees.

The 12/8 SRM has a stroke of 15 degrees, so each phase needs to be energised so that

it produces torque for an angle equal 15 degrees. This will ensure that there are no gaps in the

production of torque. It is also possible to energise a phase for an angle greater than 15

degrees. In this case two phases will be conducting at the same time.

Page 23: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

15

Figure 2.10: Phase inductance profiles with encoder pattern for the 12/8 three phase SRM

This overlap will eliminate the small periods of no torque production that occur in the real

implementation of the controller where a small delay may exist between the changing of

phases.

The choice of the turn on and turn off angles at which a phase is energised to produce

torque and then turned off have a significant impact on the overall performance of the SRM.

The maximisation of the mean torque is the main objective in this case which will give a

“wider torque-speed envelope and faster transient response”[15]. The same paper presents a

set of criteria in order to achieve the maximisation of torque. The turn off angle can be chosen

to maximise torque while the turn on angle is chosen to maximise efficiency. The most

common method used to determine the optimal turn on angle is presented next followed by

the choice of the turn off angle.

Turn on angle

Close to the unaligned position of any of the phases, the inductance is at its minimum

value. If the current to the phase is applied while the inductance is at a minimum, it will rise

at a faster rate compared to applying it further away from the unaligned position where the

inductance is higher. If we utilise this property we can establish the required current in the

phase before the inductance increases. From the voltage equation presented in section 2.2 we

can neglect the voltage drop due to resistance in this case as the resistance is small and the

second term as the inductance can be assumed constant in the unaligned position. We now

have:

ωθ

⋅⋅=d

dLiV ph

phph

Page 24: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

16

This can be rearranged to the following to obtain the turn on angle as a function of

other variables.

ωθ ⋅⋅=ph

phphon V

Li

Figure 2.11 demonstrates the application of the equation to the turn on angle. As the

speed and desired current or torque demand increases, the turn on angle is increased, giving

the current more time to reach its required value.

Turn off angle

The turn off angle can be calculated in a number of ways. If the phases are to conduct

one at a time and not overlap, the choice of the turn off angle would simply be 120 electrical

degrees or 15 mechanical degrees after the turn on angle. If some overlap is required then the

turn off angle can be chosen to “maximise the mean torque”[15].

Figure 2.11: Determining the turn on angle.

Page 25: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

17

3. Hardware and Background Software This section provides an overview of the hardware relevant to this project and the

software that runs in the background. The hardware is discussed first, outlining the additions

and changes made to the components since the previous project. The background software is

discussed next, detailing the movement between the states of operation depending on inputs

from the user. A description of the starting algorithm is presented as well.

3.1 Hardware

3.1.1 SRM and Converter Circuit

The SRM and its drive circuitry were originally obtained from a washing machine.

The SRM in question is a three phase motor with 12 stator teeth and 8 rotor teeth. The stator

poles are 90 degrees apart and the arrangement can be seen in figure 2.4. The converter circuit

houses all the power electronics used to control the current in the stator windings. The circuit

uses the Asymmetric Half Bridge Inverter, seen in figure 2.7, to switch a voltage across the

stator coils. The current controller controls the current flowing in the stator by switching the

Field Effect Transistors (FETs) according to the control algorithm used. The implementation

of this can be seen in section 4.4.

Figure 3.1: Hardware overview [2]

Page 26: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

18

For safety reasons the circuit has been modified to allow operation from a much

lower voltage than originally intended. The original converter and SRM operated from a

voltage supplied by rectifying 110VAC. The rectifying diodes have been bypassed and a

supply voltage of 30VDC is provided by a bench power supply ensuring that no dangerous

voltages may harm the user. A circuit diagram of the power supply can be found in the

appendices. The maximum speed and torque will be limited by the reduction of supply

voltage, increasing safety, but limiting performance.

With the completion of the speed controller and housing of the circuitry in an

enclosure the supply voltage can be increased as there is insulated barrier provided between

the user and the circuits. This presents an opportunity to increase the performance of the

motor and to validate the current and speed controllers at the original specifications.

3.1.2 Microcontroller

Mitsubishi’s M16C Microcontroller is a 16-bit microcontroller and is used to control

the SRM in this project. A full description of its features can be found by looking at the

appropriate datasheets available through the School [16].

Various features that are used in this project are I/O ports, timers and ADCs. The I/O

ports are being used for many purposes including switching the devices on the converter

circuit, reading user inputs, and outputting data to a Liquid Crystal Display (LCD). Four ports

are configured to repeatedly convert the analogue voltages produced by three Current

Transformers and a potentiometer, located on the user interface board, into digital values

between 0 and 1024. The conversion time is 2µs, which is adequate for this application[2].

Numerous timers have been set up to enable time critical components of the controller to

function in the foreground. Two external interrupt pins INT2 and INT3 are used to inform the

controller of increments made by the encoder. The roles of these timers and interrupts will be

discussed in later sections.

3.1.3 Current Feedback

In order to control the motor using the voltage chopping current control method, the

phase currents need to be measured so that it is possible to chop the voltage to keep the

current around the set point. The current is measured using one LEM LTS 25-NP Current

Transformer (CT) for each phase. These devices produce a voltage that is converted to a

digital number by the M16C’s 10-bit analogue to digital converters. The CT is ideal as it also

provides a high level of isolation between the microcontroller and the higher voltages of the

motor circuit.

Previously, the CTs were set up with a nominal current measurement of 2.5 Amps.

Being a 10-bit ADC and having a maximum and minimum measurement of 5 and 0 volts

Page 27: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

19

respectively, the resolution of the conversion would be 4.88mV. The CT outputs a voltage of

3.125V for a measurement of 2.5 Amps, the rated current of this particular SRM. Over this

current range we have 128 different levels resulting in a resolution of 19.5mA. We can

increase the performance of the CT by improving the resolution.

By increasing the turns on the primary side of the CT, we reduce the nominal current

measurement to 1.78A. The CT can still operate up to 2.5A (output voltage would be

3.775V), but the resolution is increased to 13.9mA. This is the realistic limit of the device as

no more turns could be achieved on the primary side due to the gauge of the wire required to

handle the current. The voltage, once converted into digital is compared to the controller’s set

point in its unmodified 10-bit number to ensure that an accurate comparison is made [2].

3.1.4 Position Encoder

Knowledge of the position of the rotor with respect to the stator is important in the

control of a SRM. The rotary position encoder that is mounted on the shaft of the SRM is

used to provide the controller feedback on the position of the rotor. The encoder uses an

optical sensor which is conditioned by some simple circuitry to produce an output voltage of

0V for a gap and 5V for a block. The output signal is passed to the microcontroller through

two interrupt on change ports (INT), one each to capture the rising or falling edge. The

encoder voltage supply of 9V will be discussed in section 3.1.8.

The encoder is implemented as an incremental encoder, which records the number of

times a known sequence passes the sensor. This is a simple way to operate the encoder

compared to operating it as an absolute encoder. The absolute encoder method measures the

width of the pulse and decides if it is a ‘big’ or ‘small’ pulse and compares it to the previous

pulse. The main disadvantage is that acceleration or deceleration of the shaft might cause

errors in the measurement of the pulses. While it is possible to avoid this by limiting the rate

of change of speed, accuracy cannot be guaranteed and therefore the encoder is operated as an

incremental encoder [2].

The main problem with the incremental encoder method is the need to start the motor

from a known position in order to initialise the count. The start up routine is discussed in

section 3.2.2. Once the encoder has been initialised subsequent increments will advance the

count in the appropriate direction.

For rotation in the clockwise direction, the encoder count is incremented on the

positive edges and for anti-clockwise rotation on the negative edges. The pattern of the

encoder can be seen in figure 2.10. Each increment of the counter corresponds to a movement

of 7.5 mechanical degrees of the rotor or 60 electrical degrees. This gives six increments over

the electrical period and 48 over the complete revolution of the shaft.

Page 28: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

20

3.1.5 User Interface

The user interface (UI) allows the user to control the motor using simple intuitive

controls. It consists of an On/Off momentary push button, Single Pole, Double Throw (SPDT)

direction switch, SPDT mode switch, potentiometer speed setting, LED On/Off indicator, four

line LCD display, LED rotation indicator and a piezo beeper. A momentary on push button

was chosen as it allowed the motor to be turned off by the software in the protection

functions. The LCD display is used to display the speed, direction of rotation, mode and other

information such as the current set-point, advance angle, and anything else used during tuning

or debugging.

After applying power and loading the software, the motor is controlled from the UI.

The user can turn the motor on by pressing the on/off button. To turn the motor off, the same

button is pressed. A green LED will light to show that the motor is turned on. A potentiometer

is used for the setting of the speed command. A switch is provided to set the direction of

rotation and the present setting can be seen on the LCD display. A mode switch allows the

user to toggle between different control methods or between normal and the agitation mode.

The final role of this control has not been determined yet, but will likely assist in the

demonstration on open day. A red LED and piezo beeper alert the user to an over current

protection issue or a stalled shaft.

A Liquid Crystal Display (LCD) has been added to the project. Originally a pair of

seven segment LED displays informed the user of the speed of the motor. However, they were

no longer part of the project equipment at the start of this year. To replace them, and to

provide more information to the user, a 4x20 character LCD display was interfaced to the

M16C. The data lines for the LCD use the same ports that were previously used for the

LED’s. An LCD display was chosen as the modules were readily available, easy to interface

and could display a large amount of information. However there were also disadvantages such

as slow update times and larger software overheads compared to the LED solution. This was

overcome by only updating the display once a second.

The LCD is operated from a series of sub-routines called from the main function and

at times when a value needs to be displayed. The LCD controller contained on the LCD

module is an industry standard Hitachi HD44780 compatible controller. The LCD needs to be

initialised before use. The LCD initialisation is run with the other initialisation routines before

the motor is operated and contains control words sent at specified time intervals. The routine

also writes any words or information to the screen that will remain constant throughout the

motors operation. This will save the need to write this in one of the timer interrupts and waste

processor time.

Page 29: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

21

When a value that needs to be displayed is updated, a function is run that takes this

value as an argument and copies it for later display. When the 100 Hz user interface interrupt

occurs one hundred times, one second will have elapsed and the value that has been copied

will be displayed. As the copy function runs each time the value is computed or updated, the

value displayed will be the most recent. In most cases, the one second update time will be

sufficient. The number of variables that can be displayed is only limited by the size of the

display.

3.1.6 Interface Board

Before mounting in the enclosure, the UI and some other circuitry were located on a

piece of Vero board. The UI components are now located on the front panel of the enclosure,

but the Vero board is still used to mount the current transformers, noise filtering capacitors,

and optical isolators for each of the high and low side gate switches for each phase. All

connections made to the microprocessor from the UI elements, the isolators, position encoder

and current transformers still go through the Vero board.

The isolation is provided by six 4N36 Phototransistor opto-couplers produced by

Fairchild. This protects the microcontroller from possible faults on the current converter side

that might result in a high voltage being applied to the microcontroller and destroying it. The

15VDC necessary for the high side of the opto-couplers is provided by a 15VDC supply on

the current converter circuit. The 5VDC power supply for the remaining circuity is provided

by the microcontroller development board.

3.1.7 Enclosure

To increase the safety and useability of the project, the circuits have been placed

inside an enclosure. A plastic junction box was chosen due to the insulating properties of

plastic, the ease of machining and the large sizes available. The enclosure is large enough to

mount the two circuit boards side by side and is hinged along one side, allowing ease of

access. As mentioned previously the components of the user interface are mounted on the top

of the enclosure. The rear of the enclosure contains the connections to the microprocessor, the

motor and the power supply.

3.1.8 Power Supplies

At present the 5V power supply for the CTs and other circuits on the interface board

and the 9V for the position encoder circuit are provided by the M16C development board and

its switch mode power supply respectively. With the mounting of the two circuits in the

Page 30: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

22

enclosure it would be elegant to provide the power for these circuits from another source

located within the enclosure. A 15V supply derived from a zener diode provides the high side

voltages for the isolation drives and could be used for this purpose. However this will

eliminate the isolation that presently exists between the converter circuit and the

microcontroller. Further possibilities are being explored.

3.2 Background Software

The software follows a state machine type of operation which controls the operation

of the controller and hence the motor, with time critical operations operating from timer and

INT interrupts. The user controls the movement between states based on the input from the

UI. A flow chart depicting the movement through the software based on the UI settings can be

seen in figure 3.2. A brief outline of the operation of the software will be followed by a more

in depth look at each of the states and the operations performed in the interrupts.

3.2.1 Initialisation, Reset and Off State

When power is first applied the software will initialise itself and the LCD display and

set up the required peripherals. This only needs to occur once. The software enters the reset

phase once this is done, disables the speed controller and commutation functions and

initialises the encoder counts, the current set point and other counts and flags to their

appropriate values. Disabling the speed controller and commutation functions prevents them

from interfering with the start up routine. After initialisation and reset have been completed,

the software enters the Off state. The Off state consists of a simple ‘while’ loop that exits only

when the user starts the motor from the UI.

Page 31: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

23

Initialisation

Reset

Off

on/off switch?

Startup

On Do direction reverse

Agitate

Reverse switch?on/off switch?

Turn off agitation?

offl

on

on

off

no changel

reverse

on

off

offl

on

Agitate switch?

Figure 3.2: Background software flow

Page 32: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

24

3.2.2 Motor Start Procedure

To start the motor turning in the correct direction the controller needs to know where

the shaft is so it can energise the correct phase next to start rotation. The position encoder

needs to be initialised to a known position for subsequent position information to be accurate

and useful. To overcome these problems the encoder is always initialised in alignment with

phase C.

Originally the starting routine had some issues with rotating to align with phase C.

The problem occurred when the rotor was in such a position that no torque was produced by

the energised phase C due to the rotor poles not overlapping the stator poles. The new routine

corrects this problem by energising both phase B and C at the same time. This will cause to

rotor to turn regardless of its initial position. After a short wait, phase B is turned off and only

phase C is left energised, aligning the rotor pole with phase C. This process can be seen in

figure 3.3.

When the rotor has aligned with phase C, a wait of approximately 0.8s occurs. This

allows the rotor to become stationary and the encoder to be initialised to the correct position

before the encoder software is enabled. After this wait is over, the direction command set by

the user is checked and the encoder software is enabled. If rotation is required in the

clockwise direction, phase B and C are energised, causing the shaft to kick in the clockwise

direction. If an anti-clockwise direction is required, phases A and C are energised. This initial

kick will provide the encoder with an edge to act upon and update the position so that the

appropriate next phase is energised in order to ensure rotation. After the kick has been

completed, the starting procedure is completed. Operation now passes to the On state

discussed in the next section.

The rotor needs to overcome any load to move to the energised phase and setting the

current at a high arbitrary set point will not always guarantee a successful start. If the load is

too great for the motor to start a stall detection routine will identify the problem, turn the

drive off and alert the user. In the future a more advanced starting algorithm could identify

this problem and increase the current set-point up to the limit in an effort to move the shaft.

Page 33: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

25

Energise Phase B & C

Start command received

Energise Phase C

Wait a small time

Wait 0.8s

Energise Phase B & C

Energise Phase A & CDirection

Continue to normal operation Continue to normal operation

Anti-clockwise

Clockwise

Figure 3.3: Starting procedure.

3.2.3 On State

Like the Off state the On state consists of a while loop that waits until a user input

causes it to exit. A reverse of direction, enabling agitation or turning off the motor will cause

the while loop to exit and return to the off state.

Page 34: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

26

3.2.4 Reverse State

The reverse state is entered when the user requests a change in direction of rotation.

To rotate the motor in the opposite direction only requires that the phase sequence order is

changed. However the motor needs to be stopped and restarted again. The method used

closely resembles the start-up method discussed previously. Ideally it would also use a

hesitation free method where by the motor could stop at any point and be restarted again.

Once the reverse function is entered its first task is to stop the shaft. A flowchart of

the process can be seen in figure 3.4. The commutation and speed control routines are

disabled, phase C is enabled and the current is set to approximately one ampere. This will

cause the motor to brake and slow down, eventually stopping aligned to phase C. The

software waits for a predetermined time until it assumes the rotor is stationary. This time was

determined during testing to give a minimal wait time between the changing of direction. The

position is reset as the rotor is aligned with phase C. A routine similar to the start up routine

discuss in section 3.2.2 now restarts the motor in the new direction. The speed controller and

the commutator are enabled and Control returns to the On state with the motor rotating in the

new direction.

3.2.5 Agitate State

The agitate state is a demonstration mode that operates to continuously change the

direction of the motor. Its purpose is not to emulate the previous role of this motor, but to

provide a simple display mode. Its operation is similar to the reverse state with the exception

that control remains with this state until the mode is turned off.

The agitate demonstration mode is entered from the On state by the user engaging the

mode on the UI. Control passes to the agitate state which is contained in a while loop that

continues to loop until the user disengages the agitation mode on the UI and control is passed

back to the off state. The agitate state operates by disabling the speed control and

commutator, then braking the motor in the same way as the reverse state. Once the shaft has

settled the direction of rotation is reversed, the position reset and the commutation function

enabled. The shaft is kicked in the required direction and then the function waits until it has

reached the speed set on the UI. Once the motor reaches this speed, the function loops back to

the start, braking the motor. This operation continues until the user turns the agitation mode

off and control is diverted to the reset and then off state. Figure 3.4 demonstrates the

operation of this mode.

Page 35: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

27

Direction change

Disable speed control and commutator

Brake using phase C

Reset position and wait until stationary

What is the new direction?

Set direction to anti-clockwise

Exit rotating anti-clockwise Exit rotating clockwise

Clockwise

Anti-clockwise

Set direction to clockwise

Agitate mode

Disable speed control and commutator

Brake using phase C

Reset position and wait until stationary

Toggle direction

Are we at the maximumspeed?

Has the mode been turned off?

Start motor in new direction

Enable speed control and commutator

Has the mode been turned off?

Return to off state

Yes

No

No

Yes

Yes No

Figure 3.4: Reverse and Agitate modes of operation

Page 36: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

28

4. Foreground Software and Controller The primary aim of this project is to design and implement a speed controller for use

with the motor and its existing current controller. The speed controller will consist of speed

measurement, feedback of the speed and at least a Proportional Integral (PI) controller to

control the speed. The controllers, the position estimation, commutation and other supporting

software are executed using interrupts. This section discusses the operation of the software

that is run in the foreground by the interrupts. The background and implementation of the

speed controller and its place within the overall drive is also discussed.

4.1 Position Estimation The position encoder provides the position information that is essential to the

operation of the SRM. As previously mentioned the encoder consists of a slotted disk and a

photo detector and provides the exact location of the rotor with respect to the stator every 7.5

mechanical degrees. Originally the commutation angles of the controller were fixed to these

encoder edges. To allow greater efficiency and higher speeds than were possible under the

previous method, the commutation angles should be variable. While the position encoder

provides accurate information at discrete positions, in between encoder edges the position of

the shaft is not known. To determine the position of the shaft between encoder edges, a

position estimation routine has been implemented.

Figure 4.1: Block diagram of Speed and Current Controllers

Page 37: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

29

-Estimate or update position-Calculate turn on angle-Commutation-Current control-Speed control at 1kHz

-Read input controls-Write to LEDs-Create setpoint-Write to LCD-Ramp Logic-Debounce On/Off

-Calculate Speed

-Positive edge-Update count if required

-Negative edge-Update count if required

5kHz Timer

10Hz Timer

100Hz Timer

INT 2 INT 3

Figure 4.2: Foreground software

To allow flexibility and ease of tuning, the electrical angle is now represented by a

16-bit number with a range of 0 to 65535. One electrical degree is equal to 182.04 bits, while

1 bit is equal to 0.0055 degrees. Obviously due to errors in obtaining exact position

information with the encoders, this degree of accuracy is not required. However, since the

M16C is a 16-bit microprocessor there will be no large overheads required and so the full 16-

bit range will be used. Common angles such as 60 degrees and 120 degrees are defined in the

header file to allow ease of reading.

The position encoder uses two interrupt on change pins, INT2 and INT3 to interface

with the M16C for the positive and negative edges respectively. As mentioned in section

3.1.4, rotation in the clockwise direction requires that the encoder count is incremented on the

positive edges and for anti-clockwise rotation on the negative edges. This is handled in

software by keeping track of the edges, and on the required edge, be it positive or negative,

the counter is incremented. A flowchart of the procedure can be seen in figure 4.3A. After six

increments the counter is reset as the motor has completed one electrical revolution. At the

maximum set speed of 2000rpm, there will be 1584 edges every second or one every 631.2µs.

The updating of the position of the rotor takes place at 5 kHz or once every 200 µs giving

plenty of time for the edge to be recognised.

Page 38: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

30

Has there been an edge?

Enter 5 kHz Interrupt

Is the rotor initialised and kick started?

Is the rotor initialised and kick started?

EndEstimate position using present speed

Determine which edge using encoder count

Clear edge flag

Edge from encoder

Direction?

Positive or negative edge? Positive or negative edge?

Set positive edge flag

Exit without updating

increment count and reset if 6

Also incrementspeed count

Exit

Was the previous edge positive?

Anti-clockwise

Positive

Negative

Clockwise

Positive

Negative

Yes Yes

NoNo

Yes

No

Was the previousedge negative?

Set negative edge flag

Increment edge count and reset if 6

Also increment speed count

Exit without updatingExit

Positive

Negative

Negative

positive

A)

B) Figure 4.3: A) Position encoder edge determination and B) logic of position estimation

At each valid encoder edge, a flag is set signifying that an encoder edge has just taken

place. This flag notifies the position estimation routine that operates in the 5 kHz timer that an

encoder edge has just occurred. A function is run that determines which edge just occurred

and updates the appropriate 16-bit representation of the angle to the estimated position

Page 39: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

31

variable. This will provide the controller with exact position information at the six discrete

angles. The flow of the software can be seen in figure 4.3B.

If no encoder edge has occurred the software runs the routine to estimate the position

of the shaft. This routine uses the following equation to update the position of the shaft.

sfnnn

1)(ˆ)1(ˆ)(ˆ ⋅+−= ωθθ

This equation takes the last position updated either by the encoder or the previous

execution of the estimation algorithm and adds the distance travelled since the last update.

This is measured by multiplying the speed of the shaft by the period between updates. As the

updates occur at a regular frequency the speed can be multiplied by a constant that takes into

account the scaling as well as the frequency of updates. This constant is calculated as below.

162360

65535)(1

360(sec)60

(min)1(sec)1)(60_ESTK_POSITION ⋅

°⋅

°⋅⋅⋅=

revfsrps

In this case the frequency is set to 5 kHz and we obtain a result of 858972.

4.2 Commutation Angles

In the original current controller, the commutation angles coincided with edges of the

position encoder and so were fixed. The present controller allows the commutation angles to

be varied due to the position estimation performed between encoder edges. This enables the

turn on and off angles to be adjusted for optimum performance of the SRM. The choice of

these angles was discussed in section 2.3.5. This section will discuss the calculation of the

commutation angles and their implementation into the controller.

4.2.1 Advance Angle

The turn on angle is referred to as the ‘advance angle’ in this case as it advances as

the speed and current set-point increase (see figure 2.11). The advanced angle is calculated in

the commutation function that runs in the 5 kHz timer interrupt. It takes the desired current

output from the speed controller and the speed of rotation and produces the advanced angle in

terms of the 16 bit angle. The assumption is made that the phase voltage used in the

calculation is equal to the voltage of the DC bus, in this case 30V. During the period in

question, i.e. from turn on to the current demand is met, both FET switches will be on and the

full bus voltage minus the voltage drop across the FETs will be applied to the phase. As

accuracy is not paramount in this case, the voltage drop across the FETs can be neglected.

The inductance around the unaligned position is relatively flat so the inductance used in this

equation can be considered constant. Below is the explanation of the software that is

Page 40: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

32

responsible for the calculation of the advance angle and how it adjusts the turn on angle. The

code is based on the method presented in [13].

The speed is first obtained from the speed function and multiplied with the current set

point specified by the speed controller. The result of this multiplication is scaled by dividing

by 4 using the shift command (a/4 = a>>2) to ensure that the code runs as fast as possible.

This scaling accounts for the DC bus voltage, the inductance at the unaligned position and the

units and was calculated as below.

( ))(360)(65535

)(1)(8

)(1)(360

(sec)60(min)1

)(585)(1

601

1

elecbits

elecmech

revmech

bitsA

rpsV

LConst

DCun °

×°°

×°

××××××=

With the unaligned inductance equal to approximately 7mH and the DC bus voltage

at 30V, we obtain a value of 5.31. At the increased operating voltage of 120V a scaling value

of 19.23 is required. If we round this down to 4 and 16 respectively we can take advantage of

the shift by two or shift by 4 operations which are simpler for the M16C to accomplish. The

errors associated with this rounding are at most half of an electrical degree which is

acceptable for this application. To further increase the accuracy, the DC bus voltage could be

measured online and the result could be used to take into account the changes in winding

resistance due to temperature changes and the voltage drop across the semi conductors.

Once the advance angle has been calculated, it is combined with the estimated

position by summing the two together to provide the electrical angle. As either the current

demand or the speed increases, the advance angle and hence the electrical angle will increase

also. Thus when the commutator is deciding when to commutate the phases, a larger advance

angle will cause the phase to commutate sooner.

4.2.2 Turn Off angle

As noted previously the turn off angle has two possibilities that depend whether

overlap is required. For no overlap the turn off angle is calculated simply by addition of 120

degrees to the turn on angle. If overlap is required then the turn off angle is fixed to the most

effective angle for each phase. The amount of overlap is selected offline and defined as a

constant in software. The overlap is chosen so that the current still has time to exit the

windings before the stator and rotor poles overlap, but the period of overlap is long enough to

provide the maximum amount of torque. Through experimentation and observation over time

the ideal amount of overlap is deemed to be 30 electrical degrees.

Page 41: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

33

4.3 Commutator

The commutation decisions are made in the 5 kHz timer interrupt after the calculation

of the advance angle. The commutator makes the decision based on the advance angle, the

reference turn on angle for phase A and the estimated position. As stated in section 4.2.1 the

advance angle is combined with the estimated position and it is the result of this addition that

the commutator acts upon. A reference turn on angle is specified for phase A, which would

normally be the start of overlap of the rotor and stator poles, and from this the turn on angle is

calculated for the other two phases through offsetting by ±120 electrical degrees. This enables

the user to specify the reference angle in order to experiment or fine tune the operation of the

motor. The commutator also takes into account the 20 electrical degree offset of the position

encoder. Previously when the turn on and off angles were fixed, the leeway of 20 electrical

degrees or 2.5 mechanical degrees allowed the current in the phase to exit the winding before

entering the negative torque region. The offset was not changed on the encoder, but is

accounted for in the software by a constant.

The commutator consists of a series of if statements or rules that determine which

phase to enable based on the position of the rotor. Various constant angles such as p and p/2

are represented in software as a 16 bit number in the same format discussed previously. The

commutation angles are different depending on the direction of rotation.

Two versions of commutator rules were completed. The first does not overlap the

phases and uses a constant dwell angle and varying turn off angle. This was used for most of

the time as it was simple and provided adequate performance. Recently the turn off angle was

fixed, as discussed previously and the excitation of the phases was made to overlap. This is

the second version of rules. The new set of rules theoretically provides more torque and fewer

ripples in the torque waveform and is referred to as the long dwell mode. Presently the long

dwell mode is activated when the current set-point specified by the speed controller exceeds

approximately 0.3A. When the motor is running under normal conditions with a minimal

load, the non-overlap method is engaged, but in the future a more advanced system could be

implemented. A flow chart of these two rules can be seen in figure 4.4.

Page 42: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

34

Start of Commutation

Calculate advance angle and add this to the estimated position

Angle within phase A rules?

Angle within phase B rules?

Angle within phase C rules?

Enable Phase A Enable Phase B Enable Phase C

End of Commutation

No No

Yes Yes Yes

No

Start of long dwell Commutation

Calculate advance angle and add this

to the estimated position

Angle within phase A rules?

Angle within phase A&B rules?

Angle within phase B rules?

A)

Angle within phase A&B rules?

Angle within phase B rules?

Angle within phase A&B rules?

Enable Phase A

Enable Phase A&B

Enable Phase B

Enable Phase B&C

EnablePhase C

Enable Phase C&A

End of long dwell commutation

No

No

No

No

No

Yes

Yes

Yes

Yes

Yes

Yes

No

B) Figure 4.4: A) Commutation with no overlap B) Commutation with overlap

Page 43: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

35

4.4 Current Controller

The soft voltage chopping current control method used is executed by a timer that

runs at 5 kHz. This timer is set up to have the highest priority of all the timer interrupts, which

enables it to run even while executing the lengthy LCD routines. Only the INT pins used to

capture the pulses of the encoder have a higher priority, due to the critical nature of the

information.

The controller identifies which phase has been enabled by the commutation sequence

and activates its low side FET. The controller compares the measured current values to the set

point, created either by the user or the speed controller, and switches the high side FET on if

the measured current is below the set point. This places 30V across the winding and causes

the current in the coil to increase. If the measured current is above the set point, the high side

FET is turned off, placing 0V across the coil. A theoretical result for this method can be seen

in figure 2.8.

4.5 Over Current Protection Over current protection is an essential safety and reliability mechanism. Since this

project uses a current sensor for each phase we can use this to provide a measure of over

current protection in software. As a first precaution the speed controller has a limit on the

maximum current it can demand from the current controller. This is set at the 2.5 amps that

the motor is rated for. The primary over current protection occurs within the current

controller. When the currents are measure the software checks to see if it exceeds the limit. If

so the drive is turned off. The limit is set at the rated current of 2.5Amps. If the over current

protection is enabled, the red light on the UI is turned on and the buzzer is activated. The user

can turn these off by pressing the on/off button. Another press of the on/off button will start

the drive again.

4.6 User Interface timer

The user interface timer takes care of the tasks involving the user interface. The

direction and mode switches are checked and the LED’s are set to the appropriate values. The

value of the potentiometer is read and converted into a speed set-point with a value between 1

RPS and 32RPS. De-bouncing of the on/off push button also takes place using this interrupt.

Writing to the LCD occurs after one hundred executions of the interrupt (i.e. at one second).

This was most appropriate as a large amount of time, 10ms, is required to communicate with

the LCD. Sending the data any quicker would be a waste of processor time and the user does

Page 44: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

36

not need the information updated any more than this. The ramping of the speed set-point

occurs every half a second. The on/off button is read and de-bounced from this timer as well.

4.7 Speed Measurement and Feedback

The rotational speed must be known so that the speed controller can act on the current

controller to increase or decrease the speed to the reference set by the user. Previously the

speed was only calculated every second so that it could be displayed for the user’s

information. While the updating of the rotors speed every second was suitable for display

purposes, the speed is now updated more frequently allowing for a faster response by the

speed controller. This has been achieved by placing the speed calculation routine into a timer

driven interrupt that occurs at a frequency of 10Hz.

All tasks related to the calculation, formatting for display and query of present speed

are accomplished through the use of the speed calculation function. The required task is run

depending on the argument passed to the function. The flow diagram in figure 4.5 shows the

operation of the function. The count update task is called every time a relevant encoder edge

occurs and increments a counter. The relevant edge for clockwise rotation is positive and for

anti-clockwise it is negative. This counter is used in the calculation task that is performed in

the 10Hz timer interrupt. This task calculated the speed and will be discussed shortly. The

display task is used to display the speed of the SRM on the LCD. It is called from the user

interface timer interrupt once every second. The final task runs whenever the controller needs

to know the speed. It simply returns the most recent value of the speed in RPS.

The speed is calculated by counting the number of encoder position increments that

occur in a known time frame. For each encoder increment, the rotor has turned through 7.5

degrees. Therefore 48 increments of the encoder will occur in one rotation. If calculated over

the period of a second, the number of increments divided by 48 will give the speed in

Revolutions per Second (RPS). This calculation is scaled up by 128 to avoid the elimination

of the fractional part that results from the division by 48. This method avoids using floating

point arithmetic for which the M16C is not equipped. To calculate the speed at the faster rate

of 10 times every second, the same calculation is carried out, with the result being multiplied

by 10 to give a result in RPS.

The difference between desired speed and the measured speed of the motor gives the

input to the speed controller. The speed controller then acts on this information to produce the

current set point. The potentiometer on the user panel produces a voltage from 0 to 5V which

is then converted to a 10-bit digital number using the onboard ADC. This number is scaled to

the speed range we require by using a simple algorithm. The final speed range that will be

used a maximum of 2000 revolutions per minute (RPM) and a minimum of 60 RPM.

Page 45: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

37

Speed Calculation function called

Perform countupdate?

Calculate speed?

Display speedon LCD

Return presentspeed

Increment count

Exit

Calculate speed

Run LCD display function

Return withpresent speed

Reset counter

Label

No

No

No

No

Yes

Yes

Yes

Yes

Figure4.5: Speed calculation, display and return function.

4.8 Speed Filter

During testing it was determined that a filter was needed on the speed feedback signal

to smooth out the speed measurement. The encoder and the software that calculates the speed

are not perfect and problems can arise due to interrupts delaying the calculation of speed and

general rounding errors introduced by the integer arithmetic used to calculate the speed. This

could cause the speed to oscillate between various values and the speed controller would act

to try and rectify this. By filtering the speed signal, the speed controller does not act on the

errors and a much smoother response is obtained.

A simple Finite Impulse Response (FIR) was chosen for this requirement. This was

mainly due to its simple implementation. A second order filter was designed in Matlab to

operate in the speed control function that operates at 1 kHz, filtering the speed signal at 10Hz.

The coefficients obtained using a Hamming window were [0.0689 0.862 0.0689] which were

Page 46: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

38

scaled by 27 and rounded off. The filtering takes place before the speed control algorithm. We

can see that the filter takes into account the previous two values of the speed. Although a

higher order or more complex filter could have been implemented, the second order FIR filter

produces adequate results without imposing large software overheads on the microprocessor.

4.9 Speed Set point Creation and Ramping

The set point for the speed controller is created in the user interface interrupt. The 0-

5V signal created by the potentiometer is converted into a 10 bit number by the onboard

ADC. This 10 bit number is scaled to give a range of 1 RPS to 33 RPS, in 1 RPS increments.

This gives an operating range of 60 RPM to approximately 2000RPM. While the SRM is

capable of higher speeds (up to 3000RPM in testing) the speed has been limited. This is

because the time between encoder edges reduces to the point where the estimation of the shaft

position does not have time to take place.

To prevent problems caused by the user changing the speed set point at too fast a rate,

a simple ramping algorithm has been implemented. This limits the rate of change of the speed

set point and takes place in the UI timer interrupt. If the new speed set by the user differs

from the previous measured set point by a value greater than 5 rps ever 0.5 seconds, the rate

of change is fixed to an increase of 5rps every 0.5s until the set point is within 5rps of the new

set point. The rate of change decelerating is different to the rate of accelerating as the motor is

able to increase speed far quicker then it can reduce speed, especially with no load. The rate

of change for the set point while decelerating is set to 3rps every 0.5 seconds.

4.10 Stall Protection

The stall protection module of the controller will stop the energising of the phases

and warn the user if it detects that the rotor has stalled. The shaft will stall when the motor

cannot produce enough torque to overcome the load. At the reduced supply voltage, the shaft

can be stopped with the load provided by someone’s hands. If the rotor was stationary and the

controller was applying the full rated current there is a chance that the coils on the stator can

burn out. Stalling also causes problems for the position estimation and the measurement of

speed as no encoder edges occur. By stopping the motor from energising any of the phases

and returning to the Off state, we can eliminate these problems.

The stall detection occurs in the one second portion of the user interface interrupt.

Each time an encoder edge occurs a flag is set in software. This flag is checked in the

interrupt and if it is set then operation carries on as usual and the flag is rest. If the flag has

not been set, then it can be assumed that the shaft has stopped turning and the controller is

Page 47: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

39

turned off and control passed back top the off state. At the motors minimum speed of 1rps,

there will be 48 edges so there is no chance of a stall being detected, however if the rotor

stops, no edges will occur and the stall will be detected. In a similar manner to the over

current protection, the buzzer will sound, but the red LED will blink at one second intervals.

This helps to distinguish which protection has stopped operation of the drive. The buzzer and

the blinking LED can be cancelled by pressing the on/off button. Another press will restart

the motor.

4.11 PI Speed Controller

The speed controller that is used in this project is a Proportional plus Integral

Controller (PI). The PI controller is widely used in industry as it is a simple and effective

controller for applications that do not require a more sophisticated approach. For the speed

control of this SRM, the PI controller has been deemed adequate. The gains from using a

more complex, higher-order type of controller are unlikely to improve the operation of the

SRM by any great margin. Investigation of a more complex controller could be a future aim.

The PI controller will act on the error signal calculated from the user set point and the

measured speed. The proportional part of the controller “provides a contribution which

depends on the instantaneous value of the control error” [17]. However a proportional

controller cannot remove steady state errors that are caused by disturbances. To remove these

errors, integral action is added to the control. Integral action “gives a controller output that is

proportional to the accumulated error” [17] and so the controller will always work to reduce

the error signal to zero. The transfer function of a PI controller is:

sK

KsT

KC Ip

rPPI +=+= )

11(

where KP is the proportional gain, Tr is the reset time and KI is the integral gain that is equal

to KP/ Tr .

4.11.1 Tuning the Speed Controller

The speed controller for this SRM was tuned using empirical methods, due to the lack

of a model for the SRM. The Ziegler-Nichols reaction curve method was used to obtain a

starting point for further tuning. As specified in the tuning rules, the speed controller was

disabled, allowing the current set-point to be controlled by the user. The motor was placed at

a stable operating point with a light load on the shaft and a step in the set-point was made.

The resulting speed curve was captured by an oscilloscope, downloaded to a PC and plotted

in Matlab. The plot and the calculations used to obtain the two gains can be seen in the

appropriate appendix. The proportional gain obtained was 9.15 and the integral gain was 5.08.

Page 48: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

40

Through further testing and tuning that took place throughout the project, the integral gain

was increased to 11, and the proportional gain rounded up to 10. This gave a slightly faster

rise time and a better response to changes in the load.

4.11.2 Implementing the Speed Controller

The speed controller is called at a frequency of 1 kHz in the timer function that

handles the commutation and current control. The speed is filtered in this function as

discussed previously. The error between the set-point specified by the user and the filtered

speed of the SRM is calculated and the result is passed to the integrator. The integrator is a

simple summation of the previous errors. An integral limit is applied at this point to avoid

windup of the integrator. The limit was determined through testing. The result of the

integrator is multiplied by the integrator gain, which is scaled (212 ×1000) to account for the

sampling rate of the integrator, and the proportional gain to give the current set-point. Before

the routine is complete, the controller checks to see if the set-point exceeds the rated current

of the motor and applies a limit if needed.

4.12 Interrupt Priorities

The priority of the interrupts can be seen in figure 4.6. The two INT pin interrupts

have the highest priority as this will ensure the feedback of the position is as accurate as

possible. The timer interrupt that runs the current control, commutation and the speed control

has the next highest interrupt. This is due to its importance in the control of the motor and the

time critical functions that are performed like the estimation of the position. The timer that

contains the speed calculation routine is the next most important. Finally the UI timer has the

lowest priority as the controls on the UI do not change at a high frequency and there are no

time critical tasks.

Page 49: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

41

INT 2 - Encoder signal, positive edge

INT 3 -Encoder signal, negative edge

5kHz Timer - Speed and current control- Commutation

10Hz Timer - Speed calculation

100Hz Timer - User interface

Figure 4.6: Interrupts in order of priorities

4.13 Processor Loading

The M16C is more than capable for the implementation of the speed controller in its

present form. However care was taken when writing the software to keep the code as fast as

possible. Below is a table outlining the typical times required for the execution of the

interrupts. The task that requires the most time is the LCD display routine. As this is in a low

priority interrupt, this is not an issue. There is still the capability for more functionality,

however investigation into more advanced techniques of torque control or high performance

sensor-less control would benefit from a Digital Signal Processor (DSP).

Interrupt Task Frequency of execution

Execution Time

5 kHz Timer Commutation and current control 5kHz 50us

Speed control 1kHz 32us 100 Hz Timer UI tasks 100 Hz 11us

Write to LCD 1 Hz 75ms 10 Hz Speed calculation 10 Hz 8us INT Encoder edges depends on speed 19us

Total with LCD write=75.12ms Total without LCD write=120us

Table 1: Typical execution times.

Page 50: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

42

5. Results The results obtained are presented in this chapter. The results were captured using an

Agilent 4-channel oscilloscope. The speed, set-points and position information were

measured by outputting the required data to the two onboard Digital to Analog Converters

(DAC).

5.1 Speed Measurement

The accuracy of the speed measurement depends on the speed of the motor and the

delay caused by interrupts. Measurements were taken to confirm the accuracy of the speed

determined by the encoder using an oscilloscope to measure the time between negative edges

on the encoder. The distance between negative edges is known from section 2.1.4 as 7.5

degrees or one forty eighth of a revolution. The errors ranged from 23% at two revolutions

per second (120 RPM) to a minimum of 0% at twenty revolutions per second (1200 RPM).

In-between the errors were varied and may have been prone to measurement errors such as

noise and parallax error. The measurements taken can be seen in the appropriate appendix.

The general trend of the errors can be explained. At low speed the time between

encoder edges is longer than at high speed and in this time the shaft could be accelerating due

to disturbances. The count of encoder edges will also be much lower than at a higher speed.

For example at four revolutions per second there will be 19.2 encoder edges between speed

calculation interrupts, while at fourteen revolutions per second there will be 67.2 edges. The

fixed point arithmetic used has a higher precision at higher speed as it has more encoder

edges giving a larger scaled number. When the scaling is removed, the rounding will have a

larger impact on the lower number.

5.2 Position Estimation

By its nature, the estimation of the position is prone to errors. The following figures

5.1, 5.2 and 5.3 show the output of the position encoder at the top, the estimated position in

the middle and the position as it was calculated previously at the bottom. At 1RPS, there is a

distinct step in the estimate when the encoder edge updates the position. This is mainly due to

the long time in-between edges, the variations in speed and errors in the constant used to

calculate the position. At 10RPS, the estimate is more accurate, with no noticeable steps. At

25RPS the time to perform the estimate has decreased and so while the estimate is still

accurate, fewer cycles of the estimation routine take place. This accounts for the tiny steps

seen in the relevant figure.

Page 51: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

43

Figure 5.1: Estimation of position at 1 RPS

Figure 5.2: Estimation of position at 10RPS

Page 52: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

44

Figure 5.3: Position estimation at 25 RPS.

Overall the position estimation routine performs its function well and allows more flexible

choices of commutation angles.

5.3 Current Control

While the current controller itself has not changed, the turn on and turn off angles

have and this affects the current waveform. As discussed, there are two methods of

commutation, the long dwell angle mode and the normal mode. As expected the long dwell

mode did not require as high a current set-point as the normal mode. At 13RPS with the same

load, the overlapped method had a set-point of 0.45A while the non-overlapped method had a

set-point of 0.53A. The plots of the current in the three phases obtained from the CTs as well

as the encoder output for the overlapped and normal method in figures 5.4 and 5.5

respectively. In both cases, phase A is at the top and phase C is at the bottom.

The chopping of the current around the set-point can be seen in all the current

waveforms. Figure 5.6 shows a typical set of waveforms at a 7RPS with no load. The current

regulation in this figure is not as expected. Ideally the current should rise to the set-point and

then remain flat topped until the turn off angle which is clearly not the case. In this case the

problem is exaggerated by the lack of load on the motor. One of the reasons that the current is

so poorly regulated is the early turn on angle.

Page 53: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

45

Figure 5.4: Overlapped current waveforms at 13RPS.

Figure 5.5: Non-overlapped current waveform at 13 RPS

As shown previously, the inductance of the stator coils is at a minimum when the phases are

unaligned. By turning the phase on early we can take advantage of the low inductance, but

this causes the current to increase so rapidly that the current controller does not have the

chance to turn the phase off before the current overshoots. This is not a large issue when there

is a load and when the inductance is larger i.e. closer to the aligned position. For example

with the overlap and a load, as in figure 5.4, after the initial overshoot, the current is a much

more ‘sensible’ shape. The increasing inductance can be clearly seen in this figure as the rise

and fall times of the current increase as the aligned position is approached.

Page 54: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

46

Figure 5.6: Current waveforms at 7RPS.

5.4 Speed Control

With the completion of the PI speed controller the speed is regulated about the users

command. Figure 5.7 shows the motor’s starting response with no load and figure 5.8 shows

the response with a load. The speed set-point was set to 1500RPM and the motor turned on.

The delay of two seconds between the point of turn on and the movement of the rotor is due

to the starting algorithm. The no load case exhibits some overshoot and a settling time of

approximately five seconds, while the load case shows little if no overshoot and a settling

time of about 3 seconds. This is an improvement on the result of 10 seconds with no load

presented in the interim report.

The response to speed set-point changes with a load can be seen in figure 5.9. The

motor is quick to increase speed to match the set-point, but is not so quick when slowing

down as the motor is just coasting. Only the results for the case with a load are shown. The

results without a load are similar, but display overshoot like the start-up case and is slower in

reducing the speed.

Figure 5.10 shows the speed response for the loading and unloading of the motor. The

first small increase in speed is due to the load being removed from the shaft. The load in this

case is provided by weight acting on a block of wood which can be seen in the photos

contained in the appendices. The motor is then loaded, which decreases the speed. The motor

is unloaded and loaded again. The actual speed only varies by 2RPS.

Page 55: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

47

Due to the relatively low voltage that the motor is operating at, the speed controller

has difficulty dealing with loads above a certain magnitude. This was noticeable at speeds

above 2000RPM, prompting the speed to be limited. Due to the empirical method of tuning,

fine tuning of the gains has been an on going process. This is likely to continue through until

open day.

Figure 5.7: Start-up with no load.

Figure 5.8: Start-up with load.

Page 56: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

48

Figure 5.9: Speed reference change and resulting motor speed.

Figure 5.10: Changed in load at fixed speed.

Page 57: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

49

6. Position Sensor-less Techniques The reliance on a position sensor to provide accurate phase switching information is

one of the significant limitations that has prevented the wide spread adoption of the SRM. A

mechanical position sensor adds cost to the drive and reduces the reliability. As one of the

major applications of the SRM is in situations that are hostile to mechanical sensors, the

elimination of this sensor would be a significant advantage. The use of methods to determine

the position without a mechanical sensor will be referred to from here on as sensor-less

methods. This was the motivation behind further study into this area.

This chapter investigates the previous work done in this area and the possible

solutions to the problem. A closer look at the method that was chosen for further investigation

and the difficulties faced will follow. Finally the results of the work completed to date are

presented and discussed.

6.1 Review of Position Sensor-less Techniques

The techniques used for determining the position of the rotor without a mechanical

sensor can be divided into two groups. One group uses measurements taken from the

energised phase and are non intrusive. That is they do not impose any further waveforms or

signals on the motor. Examples of techniques that fit into this group are state observers, flux-

linkage measurements and observation of the current waveform. These methods are generally

computationally intensive and suited for use at high speeds. The second group uses one of the

phases that is not producing torque and injects a low voltage test signal. Examples include

active probing and modulated signal injection. The intrusive nature of this method implies

that some negative torque will be produced due to the injection of the test signal in the region

of negative inductance slope. Some variations require large amounts of storage for inductance

profiles, however, they are not as demanding on the processor and work well at low speeds.

A number of methods from both groups were considered for further investigation due

to their chance of success and their ease of integration into the present drive. For the active

phase techniques, state observers were not considered due to the need for a mathematical

model of the system which was not attempted in this project. The injection of a modulated

signal was also not attempted. This was due to the external hardware required to supply the

modulated signal to the inactive phase. The extra cost and complication eliminated further

investigation into this method. The methods that were deemed suitable are discussed below.

Page 58: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

50

6.1.1 Flux-linkage

Methods using the measurement of the flux-linkage in the active phase are among the

most popular sensor-less techniques. The use of the unique relationship between the flux,

angle and phase current was first proposed by Lyons et al [18]. The equation below is used

along with the flux verses current curves for various angles as presented in figure 2.5.

∫ ⋅−= dtiRVph )(ψ

where Vph is the applied voltage to the phase, R is the winding resistance and i is the phase

current. From this equation we know that with the knowledge of the flux and the current we

can determine the inductance and hence position.

The method can be used to continuously update the position, however this requires a

large amount of data to be stored. A more common alternative proposed identifies only one

inductance value per stroke, reducing the need for a complete set of stored flux curves.

This method can provide good accuracy and is suitable for use in the medium and

high speed range. It is not intrusive and normally requires no extra hardware. The main

limitations of this method centre on the “integration of the phase voltage”[19]. The variation

of the phase resistance with temperature can produce errors that are more prominent at low

speeds due to the long periods of integration. The complexity of computation requires a fast

processor to be able to operate at high speeds and depending on the method used a large

amount of storage space. The accuracy of the magnetisation curves also has an effect on the

accuracy of this method.

6.1.2 Observation of the Phase Current Waveform

Many different techniques fall under this category and all use measurements and

observations of the current waveform used to produce torque. The rise time and fall time

methods use measurements of the current rise and fall times in the chopping waveform. As

the inductance increases the time taken for the current to rise or fall a set amount will

increase. This would be easy to implement, however accuracy is affected significantly by the

back-EMF which varies with rotor speed and position.

Another method uses the change in slope of the current as the rotor passes the aligned

position and enters the falling inductance region. This method is easy to implement, but is

only suitable for low speed operation and can produce significant negative torque. A

combined representation of these two methods can be seen in figure 6.1. Other methods exist

that fall under this category but due to complexity or incompatibility with the current

controller or motor were not considered.

Page 59: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

51

Figure 6.1: Combined figure showing rise/fall time and change of slope methods.

6.1.3 Active Probing

Active probing methods use measurement pulses injected into one or both of the

phases that are not used for torque production in order to determine the position. To minimise

the effect of back-EMF, negative torque and saturation, the signal injected is of a low voltage

and short duration. The use of the existing power electronic circuit to inject these pulses

reduces the need for external circuits and makes the implementation of these methods simple.

Alcarnley et al [20] first suggested the use of a low current waveform in a non-torque

producing phase. The pulses are injected using the power circuit at a high frequency with the

peak of the current in the order of 10% of the rated current. This helps reduce the production

of negative torque and the effect of saturation and back-EMF. Using equation 1 and assuming

a low current level for a short period of time, eliminating the first and third term we have:

it

VLti

LV∆∆

≈⇒∆∆

≈ )()( θθ eq 6.1

The most significant problem with this method is the mutual coupling between the

phase producing torque and the phase or phases used for measurement particularly if the

torque producing phase is undergoing high frequency chopping. Eddy current effects also

impact on the accuracy of this method. The method is suitable only at low speeds where there

is sufficient time to inject these pulses. Accurate inductance profiles are also needed, as well

as the capacity to store the data, however this can be eliminated by identifying one inductance

value every stroke. Other variations of this method that use the same principles exist

including using the flux-linkage method presented earlier. An ideal application of this method

is presented in figure 6.2.

Page 60: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

52

Figure 6.2: Active probing in an unexcited phase.

6.2 Investigation into Active Probing

The active probing method of determining the position of the shaft was chosen for

further work. The choice was made due to the ease of implementation and the possible

difficulties in achieving suitable performance using the flux calculation method at low speeds

and the limitations of the M16C [19]. For this method to be successful, the inductance profile

of the SRM needs to be known. The measurement of this profile at various positions and

current levels is presented next. The implementation of the probing software is also discussed,

followed by the results and finally suggestions that could benefit any future work conducted

in this area.

6.2.1 Measurement of the Inductance Profile

The measurement of the inductance at various rotor positions and levels of current

was achieved by locking the shaft in a fixed position, applying pulses of varying width and

measuring the change in current using a current probe and an oscilloscope. A small vice was

used to hold the shaft in place and a protractor was used to measure the angles from the

aligned position. The pulses were applied using the converter circuit in the present

arrangement with the M16C applying a train of pulses to the phase being measured. The rise

time and the change in current were recorded for increasing pulse widths until the current was

reached. Measurements were taken at five mechanical degree increments or 40 electrical

degrees. The results were entered into an Excel spreadsheet and the inductance calculated

using equation 6.1. Due to the large amount of data generated, the results have been included

Page 61: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

53

in an excel file located on the accompanying CD. The resulting curves for phase A can be

seen in figure 6.3.

Figure 6.3: Inductance curves at various mechanical angles and currents.

As expected the inductance has a higher value when the stator and rotor poles are

aligned, compared to the inductance when the poles are not aligned. Although not many

curves at different positions were obtained, the overall trend can still be seen with the large

gap between 5 and 15 degrees and 15 and 20 degrees suggesting a sharp change in the slope

of the inductance at a fixed current level (see figure2.2). The reason some of the curves do not

extend out to 2.5A is due to concerns about the safety of the motor and the vice holding the

shaft. Due to the measurement technique (the protractor could only provide an approximate

position) the curves are not smooth and the graph is not completely accurate. Ideally due to

the symmetrical nature of these motors, the curves measured for phase A should be the same

as the other phases. Obviously this is not always the case, but in this case the assumption was

made. The inductance in phase C was measured to confirm this assumption, and the results

were very similar.

6.2.2 Implementation of Active Probing

The method used to measure the inductance profiles above was implemented into the

working speed controller code with appropriate modifications and no overlapping of the

current waveforms. The phase to be energised next was selected as the measurement phase

Page 62: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

54

and enabled at the required time by the commutator. The injection of pulses was performed in

the On state. A simple flow chart in figure 6.4 outlines the method.

To apply the pulses to the measurement phase, the FET switches were enabled,

supplying 30V to the phase windings. After a small period of time (0.6ms to 6ms were

trialled) the phase was turned off and the current measured. Ideally this current would have a

direct relationship to the position of the rotor. Figure 6.5 shows the current in phase A, with

the thin pulses being the result of the measurement routine. The plot was obtained using

Matlab and a serial connection to a digital oscilloscope. Please excuse the axes, which in this

case are not important.

While other variations on this method were tried, including fixing the current and

measuring the rise time, the basics principles remained the same. The results obtained are

explained next.

Enter On state

Turn on Hi and Lo switches

Is phase A the measurement phase?

Continue to rest of On state

Wait a small time

Turn off switchsMeasure current and

send to serial port

No

Yes

Figure 6.4: Active probing method.

Page 63: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

55

500 550 600 650 700 750 800 850 900 950 1000-110

-100

-90

-80

-70

-60

-50

-40

-30

-20

Time (Samples)

Cur

rent

(no

uni

ts)

Figure 6.5: Active probing of phase A.

6.2.3 Results and Issues

As shown in figure 6.5, the pulses were successfully injected into the phase under

measurement. During operation the drive was able to function normally and the probing only

had a small effect on the performance of the motor, with a slightly higher (5-10%) set-point

required. However closer inspection of figure 6.5 reveals that the assumption of the current

being proportional to the position is invalid. Ideally we would like to see the currents increase

continuously throughout the measurement period.

Figure 6.6: Results of active probing method.

Page 64: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

56

Figure 6.6 shows the inductance measured by the sensor-less routine for three cases.

The required data was passed to a PC using the M16C’s serial port and the inductance

computed in Excel. An accurate online routine had not been designed as the method was still

under testing. Clearly there is a large amount of inaccuracy present. The result is typical of

what was achieved, however occasionally a number of measurements coincided, suggesting

that this method still has merit.

The most likely reason for the errors is mutual coupling and switching interference

between the phase that is producing torque and the phase that is used for measurement.

Enough time was not available before the completion of this report to reliably measure the

effect of the mutual coupling. One possible method would be to lock the rotor down and

energise one phase in the normal manner while measuring its affect on another phase.

A solution to this problem involving co-ordination between the measurement and

torque producing phases that only injects a pulse when an ‘ideal’ time, for instance when the

current is at a minimum, was trialled. However a reliable solution was not obtained.

Page 65: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

57

7. Conclusion

7.1 Work Before Open Day

The time before open day will be spent mainly on the presentation of the enclosure.

Labels will be added to the controls and the wiring and connections tidied up. A more

permanent method of mounting the LCD also will be achieved as well as a power supply for

the position encoder and finalisation of the connections. The drive may be tested at its

original voltage using a 240V to 120V transformer, but it is likely that the lower voltage of

30V will be used on open day. Any further time that may arise will be spent on the sensor-less

work, but this is unlikely.

7.2 Future Work

The next step in this project addresses the position sensor-less problem. There are

various methods that can be used and a complete investigation into a number of these

methods could be a further project. The replacement of the mechanical position encoder with

a reliable and accurate sensor-less method is an important step along the way to increasing the

competitiveness of the SRM in the variable speed drives marketplace.

Further extensions could see the development of an accurate model of the SRM and

controllers. This would enable easier tuning and investigation into advanced methods of

torque, current or speed control.

7.2 Conclusions

The primary aim of this project was to design and implement a speed controller for a

Switched Reluctance Motor. Further to this aim, work has been done to research methods of

advanced control using sensor-less control. Finally the drive has been packaged in a user

friendly arrangement to ease further work on the motor.

The speed controller and its supporting functions have been completed. The PI speed

controller was tuned using empirical methods, and the tuning of the gains is an ongoing

process. The speed controller was built around the previously designed current controller and

acceptable results were achieved, provided the load was not too great. In order to gain greater

control over the turn on and turn off angles, a method of estimating the position of the shaft

between encoder updates was devised. The turn on angle is now variable and calculated

online. The estimation proved to be accurate enough for the purpose and the ability to vary

Page 66: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

58

the commutation angles increased the speed envelope. The top speed (above 3000RPM) of

the motor is much greater than was previously possible with fixed commutation angles (about

1800RPM). An overlapped commutation of current was also implemented to eliminate gaps

in the production of torque. This also has the benefit of increasing the torque during situations

such as start-up and operation with a high load. Features such as the filtering of speed, stall

protection, reversing and ramping of the speed set-point add reliability and improve the

performance of the motor.

The installation of the drive circuit and various interfacing electronics inside an

enclosure increased the safety of the user and also reduced occasional breakages that occurred

while setting up each day. It also increases the ease of use in demonstrations and for future

use by people that do not have an intimate understanding of the circuits and connections.

The further work undertaken into removing the need for a mechanical position sensor

by investigating position sensor-less control was motivated by one of the main advantages of

the SRM, its ruggedness and reliability. The inductance of the phases at various currents and

positions was obtained through an experiment. The results were to be used to determine the

position of the rotor using pulses injected into one of the unused phases. While an attempt

was made, the results show that large errors can occur. However this method still has merit

and requires more knowledge of the coupling between the phases.

Page 67: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

59

References [1] A. F. Anderson, "Development history," in Electronic Control of Switched

Reluctance Machines, T. J. E. Miller, Ed.: Newnes, 2001. [2] M. Tildesley, "Switched Reluctance Motor Drive," in Department of Electrical &

Computer Engineering. Newcastle: The University of Newcastle, 2003, pp. 56 + Appendices.

[3] T. J. E. Miller, "Introduction," in Electronic Control of Switched Reluctance Machines, T. J. E. Miller, Ed.: Newnes, 2001.

[4] T. Perl, I. Husain, and M. Elbuluk, "Design trends and trade-offs for sensorless operation of switched reluctance motor drives," presented at Industry Applications Conference, 1995. Thirtieth IAS Annual Meeting, IAS '95., Conference Record of the 1995 IEEE, 1995.

[5] S. Drives. http://www.srdrives.co.uk/fr_index.htm [6] D. A. Torrey and J. M. Kokernak, "Power Steering: Brushless DC or Switched-

Reluctance?," in Power Electronics Technology, 2002. [7] A. Mychael, Electric Circuits and Machines, 2nd ed. Sydney: McGraw-Hill Book

Company, 1977. [8] T. J. E. Miller, "Optimal design of switched reluctance motors," IEEE Transactions

on Industrial Electronics, vol. 49, pp. 15-27, 2002. [9] R. Krishnan, Switched Reluctance Motor Drives: CRC Press, 2001. [10] T. Sawata, "The switched reluctance generator," in Electronic Control of Switched

Reluctance Machines, T. J. E. Miller, Ed. Oxford: Newnes, 2001. [11] T. J. E. Miller, "Average Torque Control," in Electronic Control of Switched

Reluctance Machines, T. J. E. Miller, Ed.: Newnes, 2001. [12] F. Blaabjerg, P. C. Kjaer, P. O. Rasmussen, and C. Cossar, "Improved digital current

control methods in switched reluctance motor drives," Power Electronics, IEEE Transactions on, vol. 14, pp. 563-572, 1999.

[13] M. T. DiRenzo, "Switched Reluctance Motor Control – Basic Operation and Example Using the TMS320F240, Texas Instruments Application Note," 2000.

[14] R. C. Becerra, M. Ehsani, and T. J. E. Miller, "Commutation of SR motors," Power Electronics, IEEE Transactions on, vol. 8, pp. 257-263, 1993.

[15] J. J. Gribble, P. C. Kjaer, C. Cossar, and T. J. E. Miller, "Optimal commutation angles for current controlled switched reluctance motors," presented at Power Electronics and Variable Speed Drives, 1996. Sixth International Conference on (Conf. Publ. No. 429), 1996.

[16] Mitsubishi, "M16C/62 Family Datasheet," 2000. [17] G. C. Goddwin, S. F. Graebe, and M. E. Salgado, Control System Design, 1st ed.

New Jersey: Prentice Hall, 2001. [18] J. P. Lyons, S. R. MacMinn, and M. A. Preston, "Flux/current methods for SRM rotor

position estimation," IEEE IAS Annual meeting, pp. 483-487, 1991. [19] G. Gallegos-Lopez, "Sensorless control," in Electronic Control of Switched

Reluctance Machines, T. J. E. Miller, Ed.: Newnes, 2001, pp. 133-170. [20] P. P. Acarnley, R. J. Hill, and C. W. Hooper, "Detection of rotor position in stepping

and switched reluctance motors by monitoring of current waveforms," IEEE Transactions, vol. IE-32, pp. 215-222, 1985.

Page 68: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-1

Appendix Appendix A Software in C code

Appendix B Ports and connections

Appendix C Speed calculation errors

Appendix D Current setpoint

Appendix E Speed controller tuning

Appendix F Circuit diagrams

Appendix G Photos

Page 69: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-2

Appendix A Software in C code

The source files are included on the CD. The most up to date version will be available on the website by open day. The code was too long to include and was difficult to read.

Three versions are included on the CD. • -Speed Control- This is the most up to date snapshot of the software. Does

not include any sensorless code. • Sensorless 1 and Sensorles 2 are examples of my attempts to eliminate the

shaft encoder. They are not well commented, but may be of use in the future.

Page 70: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-3

Appendix B Ports and connections

Note that the wiring is likely to change by open day due to the installation of the LCD in a more permanent manner. An updated list of connections will be available on the day.

Page 71: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-4

Appendix C Speed calculation errors

rps rpm real rps real rpm %error 2 120 2.48 148.5149 19.20 4 240 4.31 258.6207 7.20 6 360 6.41 384.6154 6.40 8 480 7.87 472.4409 -1.60

10 600 10.31 618.5567 3.00 12 720 11.63 697.6744 -3.20 14 840 13.89 833.3333 -0.80 16 960 15.87 952.381 -0.80 18 1080 18.02 1081.081 0.10 20 1200 20.00 1200 0.00 22 1320 21.51 1290.323 -2.30 24 1440 23.26 1395.349 -3.20 26 1560 25.64 1538.462 -1.40 28 1680 27.62 1657.459 -1.36 30 1800 29.85 1791.045 -0.50 32 1920 31.25 1875 -2.40

Page 72: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-5

Appendix D Current setpoint

Page 73: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-6

Appendix E Speed controller tuning

0 200 400 600 800 1000 1200 1400 1600 1800 2000-40

-30

-20

-10

0

10

20

30

40

Time (samples)

Vol

ts (

repr

esen

ts s

peed

)Reaction curve

Above is the waveform capture from a Tektronix TDS220 DSO using Matlab. Due to the setup at the time the capture was not of the best quality and another DSO was not available. The plant inputs, outputs and time constants were recorded using the DSO and the information on the LCD display. The following is my working calculation of the gains using the Ziegler-Nichols reaction curve method.

Yinitial = 5 RPS Yfinal = 29RPS Uinitial = 546 (10-bit number) Ufinal = 563 (10-bit number) t0 = 0s t1 = 600ms t2 = 9.2s Parameters computed as follows

41.11724

5465635290 ==

−−

=−−

=∞

oo uu

yyK

mstt 600010 =−=τ

Page 74: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-7

stt 6.8120 =−=υ Therefore

15.96.041.1

6.89.09.0

00

0 =×

==τ

υK

K p

8.16.033 =×=⋅= orT τ

From section 4.11.1, we have the final gains:

08.58.115.9

15.9

===

=

r

PI

p

TK

K

K

Page 75: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-8

Appendix F Circuit diagrams

Scan of Mathew Tildsley’s Inverter circuit diagram Scan of Mathew Tildsley’s Power circuit diagram

Page 76: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-9

Page 77: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-10

Page 78: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-11

Appendix G Photos

Project setup

Original setup

Page 79: Speed Control of a Switched Reluctance Motor Benjamin Pilley...Switched Reluctance Motor. Further workis to be done to researchmethods of advanced control using sensor-less control

A-12

Front User Interface

Inside the enclosure