104
/If Ii Sensorless Starting of a Brushless D.C. Motor by Ramit Ghosh Thesis submitted to the Faculty of the Virginia Polytechnic Institute and State University in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering APPROVED: Dr. Rrishnan Ramu, Chairman Decem ber, 1988 Blacksburg, Virginia

If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

  • Upload
    domien

  • View
    232

  • Download
    1

Embed Size (px)

Citation preview

Page 1: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

/If Ii

Sensorless Starting of a Brushless D.C. Motor

by

Ramit Ghosh

Thesis submitted to the Faculty of the

Virginia Polytechnic Institute and State University

in partial fulfillment of the requirements for the degree of

Master of Science

in

Electrical Engineering

APPROVED:

Dr. Rrishnan Ramu, Chairman

Decem ber, 1988

Blacksburg, Virginia

Page 2: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

LO 5~SS

V<fJSS I '1 &~ G41(P

C'.~

Page 3: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Sensorless Starting of a Brushless D.C. Motor

by

Ramit Ghosh

Dr. Krishnan Ramu, Chairman

Electrical Engineering

(ABSTRACT)

Permanent magnet brushless DC motors that have found wide application in high

performance servo drives need absolute rotor position sensors. However, the cost

of the position sensor limits the use of brush less DC motors for low performance

applications such as automotive and home appliances. A sensorless starting scheme

for brushless DC motors is studied in this thesis. A hardware implementation of the

starting scheme has been instrumented. The modeling and simulation of the

sensorless starting performance of brushless DC motors have been accomplished to

gain the insight into the process. The experimental results confirm the theoretical

prediction that the permanent magnet brush less DC motor can be started without a

position sensor. The experimental setup with individual subsystems are described in

detail.

Page 4: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Acknowledgements

I am grateful to my advisor, Dr. Krishnan Ramu for guiding my thesis and for giving

me an excellent training. I would also like to thank Dr. C.E. Nunnally and Dr. H.F.

Vanlandingham to be in my committee amidst their busy schedule. My thanks are

also due to N.S.F for funding this research. I would like to thank Mr. Mang Xuesi for

writing the microcontroller software. I also appreciate the help provided by Mr. G.

Chandramouli and Mr. Aravind S. Bharadwaj in implementing microcontroller hard­

ware circuit. Finally I would like to thank all my colleagues for always being very

helpfu I.

Acknowledgements iii

Page 5: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Table of Contents

1.0 Introduction ...••...........•.••......••••...........•••...•..•...•• 1

1.1 Overview .......................................................... 1

1.2 Literature Survey .................................................... 2

1.3 Organization of the Thesis ............................................. 4

2.0 PERMANENT MAGNET BRUSH LESS D.C. MOTOR •.•••.•..•••••..••••.....•• 5

2.1 Introduction ........................................................ 5

2.2 Description of Permanent Magnet Brushless Motor .......................... 6

2.3 Operation of Brushless DC Motors ....................................... 6

2.4 Model of PMDC Brushless Motor ........................................ 8

2.5 Modeling of a PMDC Motor with Star Connected Stator Winding ............... 12

3.0 Starting Algorithm and Implementation •........••.••..••.....••......... 17

3.1 Introduction ....................................................... 17

3.2 Problem of Starting without a Position Sensor ............................. 17

3.3 Starting Scheme ................................................... 18

3.4 Implementation of the Starting Scheme .................................. 19

Table of Contents iv

Page 6: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

4.0 Description of the Drive Circuit .•••.•••.•••.....•.••••..•••..•..••••••• 21

4.1 Introduction ....................................................... 21

4.2 Power Circuit ...................................................... 21

4.3 Base Drive Circuit .................................................. 23

4.4 PWM Circuit ....................................................... 26

4.5 Commanded Current Generator ........................................ 32

4.6 Latching Circuit .................................................... 41

4.7 Current Sensor .................................................... 41

4.8 Programmed Frequency Generator ..................................... 45

5.0 Simulation of the Drive System ..•.•••......••.•••••..........••.....•• 47

5.1 Introduction ....................................................... 47

5.2 Algorithm for the Simulation Program ................................... 48

5.3 Simulation Results .................................................. 51

6.0 Experimental Results .•.•.•...••••.•.••.•.•.•••..•••••..••••.•..•••.• 58

6.1 Introduction ....................................................... 58

6.2 Induced EMF of the Motor ............................................ 58

6.3 Starting Performance ................................................ 59

6.4 Commanded and actual currents ....................................... 61

7.0 Conclusions and scope for future research •....•..•...•........•....••.•. 67

7.1 Introduction ....................................................... 67

7.2 Contributions ...................................................... 68

7.3 Scope for future research ............................................ 68

8.0 Bibliography .....••.......•..••.•...•....•.•.•••......•...••..••.• 70

Table of Contents v

Page 7: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Appendix A. LIST OF SYMBOLS ..••••.••..•..•..•••...••...•••.•...•..•.•• 73

Appendix B. MOTOR PARAMETERS •...••...•••..••..••..•.•..•.•.••..••••.• 75

Appendix C. LISTING OF THE SIMULATION PROGRAM •....••..••.......••••...• 76

Appendix D. ROTOR POSITION FEEDBACK LOGIC ..••.•.••...•.•...••..•.•.... 92

Vita ..................................................... « ............ 95

Table of Contents vi

Page 8: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

List of Illustrations

Figure 1. Torque generation in brushless DC motor with ideal current waveform 7

Figure 2. Normalized flux linkage profile of the phases. . ................. 10

Figure 3. Six Switch Transistor inverter .............................. 13

Figure 4. Combinations of Phase Currents when Three Phases are Conducting 14

Figure 5. Block Diagram of the Implemented scheme .................... 20

Figure 6. Power Circuit Diagram .................................... 22

Figure 7. Base Drive Circuit ....................................... 24

Figure 8. Voltage Waveforms of the gate drive circuit. ................... 27

Figure 9. PWM Current controller Circuit ............................. 28

Figure 10. PWM Voltage Waveforms. . ................................ 29

Figure 11. Carrier Wave Generator Circu it. ............................. 31

Figure 12. Commanded Current Profile ................................ 33

Figure 13. Circuit for Commanded Current Generator (part 1) ............... 34

Figure 14. Circuit for Commanded Current Generator (part 2) ............... 35

Figure 15. Counter Output and Phase Reversing Logic .................... 37

Figure 16. Commanded Current from Decoder Output .................... 39

Figure 17. Digital Switch ........................................... 40

Figure 18. Latching Circuit ......................................... 42

Figure 19. Circuit for Phase Current Sensing ........................... 44

List of Illustrations vii

Page 9: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Figure 20. Microcontroller circu it for programmed frequency generator ....... 46

Figure 21. Commanded and actual speed (in mech. rad/sec.) for different starting position ............................................... 52

Figure 22. a) Current in phase A, b) Back EMF in phase A and c) Electrical torque 53

Figure 23. Starting performance with two different commanded speed profile .. 54

Figure 24. Starting performance with the value of moment of inertia increased . 56

Figure 25. Successful starting with different values of moment of inertia ...... 57

Figure 26. Recorded line to line induced emf at the terminal of the motor while running as a generator .................................... 60

Figure 27. Starting performance with different initial positions as measured from the experimental setup. . .................................. 62

Figure 28. Commanded frequency signal and the commanded current ........ 63

Figure 29. Commanded and actual current in a phase after starting ........... 65

Figure 30. Actual current in a phase while starting. . ..................... 66

Figure 31. Commanded current signals (80 to 85) for six switches and the induced emfs .................................................. 93

List of Illustrations viii

Page 10: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

1.0 Introduction

1.1 Overview

Permanent magnet motor drive systems constitute a large section of the ac servo

family because of their high power density and low rotor inertia. A permanent mag­

net brushless DC (BLOC) motor is distinguished from it's synchronous counterpart

by the waveform of the induced emf and the feed current. BLOC motors need an

absolute rotor position sensor for high performance servo applications. Nevertheless,

the need for the position sensor restricts the use of the motors for low performance

applications such as fans, pumps and compressors. To make BLOC motors econom­

ically viable for low performance applications, sensorless operation of the motor is

important. However, the most critical aspect of sensorless operation is the starting

of the motor from standstill to a speed at which the induced emf can be sensed reli­

ably. The motor can be synchronized by extracting the position information from in­

duced emfs. Sensorless starting of a BLOC motor has been attempted in this thesis.

A six-switch transistor inverter has been built for feeding the individual phases with

Introduction

Page 11: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

rectangular currents of increasing frequency. PWM current controllers have been

employed for the three individual phases.

A simu lation program has been developed to study the starting performance of the

motor with different load and inertia. The model used for the simulation has also been

described in the text.

1.2 Literature Survey

A wide range of literature exists in various aspects of BLOC motors, such as torque

production [1-5], design [6,7], modelling [8-11] and applications [12-16].

A detailed study of the torque production of BLOC motors has been done [1]. The lit­

erature shows the interaction of current and flux harmonics and also the effect of

non-ideal flux linkage. Possible ways to reduce the torque ripples by controlling the

harmonics of the feed current has been reported [3]. The effect of the current

waveform on torque production has also been discussed [2]. The causes of torque

pulsation at very low and high speed ranges of operaUon has been considered care­

fully [4]. An analytical method for calculating the cogging torque has been developed

[5].

The design considerations of BLOC machines along with the necessary power con­

ditioning circuits have been discussed [6]. Performance of a BLOC motor with high

efficiency has been reported in the same paper. Design and construction of BLOC

Introduction 2

Page 12: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

motors with high power rating and rotor damper has been reported [7]. The effect of

design parameters on motor performance and instantaneous torque production has

been dealt with [8].

Detailed modeling and simulation of both permanent magnet DC and synchronous

motors has been described [9J. A complete model of a vector controlled permanent

magnet synchronous motor drive has been reported [10J.

Robotics application of a permanent magnet DC motor with a digital PWM control has

been reported [11], Discrete time modelling of the same motor has also been used

for its performance estimation.

The selection criteria of an ac servo for any particular application has been discussed

[13]. It throws light upon the strengths and weaknesses of BLOC motors for servo

applications. Guidelines for an appropriate choice of a permanent magnet machine

for a given application is discussed [14]. A sensorless operation of a BLOC motor and

related microcomputer control has been reported [15]. This paper uses filtered ter­

minal voltage of the motor for rotor position sensing. A four quadrant operation of a

BLOC motor for special applications in machine tool movement and robotics has

been presented [12J. Accurate motion control of small robots using brushless DC

motors has been discussed [16].

Introduction 3

Page 13: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

1.3 Organization of the Thesis

Chapter two of the thesis is devoted to the description of BLOC motors. A brief intro­

duction to permanent magnet synchronous motors and torque production of a BLOC

motor are described in the first two sections. The third section discusses the me­

chanical and electrical dynamic equations. The model used for simulation is outlined

in the last section.

Chapter three, in its first section, draws attention to the problem of starting a

brush less DC motor without a position sensor. The proposed scheme to overcome

the problem and an outline of the implementation scheme are given in the subse­

quent sections. Chapter four describes the complete circuit by dividing it into smaller,

more conceptual blocks. The various blocks are, namely, the power circuit, the base

drive circuit, the PWM circuit, the commanded current generator circuit, the latching

circuit and the actual current sensor circuit.

Chapter five discusses simUlation of the starting algorithm. The critical points of the

model discussed in chapter two and the PWM firing logic is recapitulated at the be­

ginning of the chapter. The salient steps of the simulation program have been de­

tailed. The simUlation results have also been included in this chapter.

The experimental results are given in chapter six. Chapter seven discusses the con­

clusions and outlines the scope for future research.

Introduction 4

Page 14: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

2.0 PERMANENT MAGNET BRUSHLESS D.C.

MOTOR

2.1 Introduction

This chapter gives a brief introduction to the permanent magnet brushless motors in

its first section. The second section describes torque production of the motor under

ideal operating conditions. The third section holds the key equations of the perma­

nent magnet DC (PMDC) brush less motor, describing both electrical and mechanical

dynamics of the system. The last section discusses the line to line voltage equations

which are used for simulation when the phase parameters are not known.

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 5

Page 15: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

2.2 Description of Permanent Magnet Brush/ess Motor

In general, Permanent Magnet Brushless Motors come under the category of syn­

chronous motors, with the field excitation being provided by a set of permanent

magnets placed on the rotor. The stators of these motors are provided with three­

phase ac windings. Design aspects of such motors have been reported in literature

[7,8].

Depending upon the shape of the induced emf, these motors can be divided into two

types, namely, Permanent Magnet Synchronous Motors (PMSM) and Brushless DC

Motors (BLDC). The stator induced emf of PMSM is sinusoidal whereas BLDC motors

have trapezoidal induced emf profile. In this study attention is restricted only to the

operation of Brushless DC Motors.

2.3 Operation of Brush/ess DC Motors

As shown in Figure 1 on page 7, the trapezoidal induced emf has 120 ( electrical)

degrees constancy. The induced emfs in the three phases are also separated by 120

( electrical) degrees.

Output power of the motor is proportional to the sum of the products of the phase

currents and respective induced emfs of the phases. Hence, as shown in Figure 1

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 6

Page 16: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

I :" I I L: +-

60 120 "(SO 240 3r 360 60

br--+--~ 7

~ 0 ~

F-l r=:-

b-L-.+=l T

E a

Eb

Ec

Ia

Ib

r c

Figure 1. Torque generation in brushles. DC motor with Ideal current waveform

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 7

Page 17: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

on page 7, for uniform output power generation, it is necessary that the stator phases

be excited by 120 ( electrical) degree wide current pulses [19]. However. pulsation

of the output power at switching instants will be observed in actual operation. The

output power pulsation is attributed to the finite rise and fall times of current in the

inductive circuit.

It is obvious that the control of a BLOC becomes simple when the absolute rotor po ..

sition is known. Knowledge of the rotor position amounts to knowing the induced emf

profile and hence the instants for exciting the appropriate phases.

2.4 Model of PMDC Brushless Motor

In permanent magnet motors, the rotor does not have any external excitation and

hence the electrical dynamic equation of the rotor is not considered. Morever, the

permanent magnets have high resistivity and hence rotor induced currents are neg ..

lected and no damper winding is modeled.

Voltage equations of the stator windings can be written in terms of phase variables

as :

[V] = [R][/] + [L]p[/] + [E] (2.1)

where,

[V]

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 8

Page 18: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

[

Ra 0 0] [RJ = 0 Rb 0

o 0 Rc

With a constant peak value of the air gap flux, the induced emfs of the phases can be

expressed as :

Ea = Kbfa(8r)wm Eb = Kbfb(8r)wm

Ec = KbfcC8r)wm

(2.2)

where, fa(Or), 'b(8r) and 'c(O,) are normalized functions of airgap flux linkage of the re-

spective phases. 'a' 'b and fc are shown in Figure 2 on page 10. Kb is the back emf

constant ( constant, when peak value of airgap flux is constant ). Wm is the mechanical

rotor speed.

Now the mechanical dynamic equation of the rotor can be expressed as :

(2.3)

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 9

Page 19: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

1 [--

+ [-60 --t::cf

-1

::t-f'

Figure 2. Normalized flux linkage profile of the phases.

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 10

Page 20: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

where, B is the friction constant, J is the moment of inertia of the rotor with load, ~

is the load torque and T. is the generated electrical torque of the motor which can be

expressed as :

(2.4)

Substituting equation (2.2) in equation (2.4) electrical torque can also be expressed

as :

(2.5)

Equations (2.1) through (2.5) represent the mechanical and electrical dynamics of the

motor .

.! This model can be used for simulation of BLOC when the phase parameters are

known. However, with a star connected stator winding, if the neutral point is not ex­

ternally available, measurement of the phase parameters becomes difficult. To over­

come this problem, we can express equation (2.1) in the form of line-to-line voltages.

The line-to-line voltage equations are shown in the next section. /

PERMANENT MAGNET BRUSH LESS D.C. MOTOR 11

Page 21: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

2.5 Modeling of a PMDC Motor with Star Connected

Stator Winding

Before getting involved in rewriting the voltage equations, it is necessary to clarify

the operation of the motor in conju nction with the inverter. This inverter is a conven­

tional three-phase, six switch transistor inverter as shown in Figure 3 on page 13. It

is obvious from the Figure 1 on page 7 that most of the time only two phases conduct

simultaneously. However, what is not obvious from this figure is that when a phase

is turned off permanently for a sixty degree period, current in the phase does not die

down to zero immediately. Decreasing phase current continues to flow through a

suitable diode of the same leg for a finite time. Hence, there will be periods when all

three phases will be conducting at the same time.

It is to be noted, that in a three-phase three-wire system, we need to have only two

of the three phase currents as variables. The third current can be constructed from

the other two. This is because at any instant, the vector su m of all the currents is

zero.

Now consider the case when all the phases are conducting at the same time. It is

observed that there can be only two current polarity combinations. Assuming current

going into the phase as positive current, it can be either one phase carrying positive

current and two phases negative or two phases carrying positive current and one

phase negative ( shown in Figure 4 on page 14 ).

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 12

Page 22: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

+

Figure 3. Six Switch Transistor inverter

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 13

Page 23: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

E -x

,/ ~-E ? Ey . z

/ v

y

CASE 1

v y

CASE 2

Figure 4. Combinations of Phase Currents when Three Phases are Conducting

PERMANENT MAGNET BRUSHLESS D.C. MOTOR

v z

14

Page 24: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

The current variables have been chosen in a manner as shown in Figure 4 on page

14. In every 60 ( electrical) degree interval, i1 is chosen as the current that is going

to continue throughout the interval and ;2 is same as the phase current that reduces

to zero. So ;2 will be present only during changeover from one phase to the other.

Referring to Figure 4 on page 14, three phases of the motor have been named as X,

Y and Z. Depending upon the rotor position and direction of movement, XYZ can be

replaced by ABC or BCA or CAB or the reversed phase sequence combinations. The

voltage loop equations ;1 and ;2 loops can be written as :

[V] = [L]p[/] + [R][/] + [E] (2.6)

where,

[L] = (Lp - M) [~ ~]

[R] = Rp [~ ~J

In the above equation Rp and Lp are the resistance and the leakage inductance per

phase respectively ( assumed to be the same for all three phases ).

PERMANENT MAGNET BRUSH LESS D.C. MOTOR 15

Page 25: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

For case (2) of Figure 4 on page 14, we can use the same equation as 2.6 by changing

the [V] and [E] matrices as :

(2.7)

and

(2.8)

It shou Id be noted that for each 60 ( electrical) degree interval, the cu rrent direction

remains the same and hence the expression for [V] and [E] matrices. However

Ex, Ey and Ez will change continuously with the rotor speed. Vx, Vy and Vz will be equal

to either zero or the dc link voltage, depending upon the PWM switching of the re­

spective phase switches.

Now when the outgoing phase commutates and i2 becomes zero, the order of the

voltage equation becomes one. The voltage loop equation for the current i1 can be

written as :

(2.9)

the ± symbol in equation 2.9 covers both the current directions of ;1 as it may arise

from case (1) or (2) in Figure 4 on page 14.

The advantages of writing the voltage equations in terms of line-to- line voltages are,

1. This does not necessitate measurement of leakage inductances of the phases.

2. Reduces the order of the equation in case of a three-phase three-wire system.

PERMANENT MAGNET BRUSHLESS D.C. MOTOR 16

Page 26: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

3.0 Starting Algorithm and Implementation

3.1 Introduction

The starting problem of BLDC without a position sensor has been outlined in the first

subsection. The second section suggests a scheme to overcome this problem and

the last section briefly states the way to implement the starting scheme. However, the

implementation of the scheme is dealt with in greater detail in the subsequent chap­

ter.

3.2 Problem of Starting without a Position Sensor

It was noted earlier that for uniform torque production, the absolute rotor position

sensor is essential in a brushless DC motor drive system. However, low performance

Starting Algorithm and Implementation 17

Page 27: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

applications such as fans and pumps relax the constraints on the torque fluctuation.

Hence this opens up the possibility of doing away with the position selisor and re­

ducing the cost of the PMDC brushless motor drive system.

I n the absence of a position sensor, the rotor position information can be extracted

by sensing the induced emf of a phase which is not excited. However, this scheme

poses a critical problem of starting the motor from standstill to a speed above which

the induced emf can be reliably detected for control purpose.

The following section contains a discussion on how a BLOC motor can be started

from standstill to a particular speed by microstepping. Thereafter, synchronism is

maintained by sensing the induced emfs across the stator windings.

3.3 Starting Scheme

For unidirectional torque production, a particular phase shou Id have positive current

when it experiences the positive flux linkage from the rotor and negative current at

the time of negative flux linkage. When the rotor accelerates, the frequency of the

induced emf ( or flux linkage) of a particular phase goes on increasing and so should

the current pulses in the phase. Hence, accelerating the rotor amounts to increasing

the frequency of firing the phases.

Increasing the switching frequency is best done if tile frequency information is ob­

tained from the rotor position feedback. However, in the absence of a feedback,a

Starting Algorithm and Implementation 18

Page 28: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

BLDC motor can be started with an open loop preprogrammed increasing frequency

profile. It has been observed from the simulation results that if the slope of the fre­

quency profile and the (electrical) angular acceleration of the motor are not very far

out of step, the motor produces an average positive torque.

3.4 Implementation of the Starting Scheme

The starting control strategy is shown in Figure 5 on page 20 in block diagram form.

The speed command, COre" is preprogrammed. The frequency command, the current

magnitude command and reference position all combine to produce the stator current

commands. These current commands are compared to their actual values in the

motor windings to produce the current error. Either PWM or hysteresis current con­

trollers can be used to get the gate drive signals for the phase switches.

PWM and hysteresis controllers each have their advantages and disadvantages. PWM

controllers predetermine the switching frequency and hence power circuit design

becomes easier. In a hysteresis controller, the switching frequency is determined

by the hysteresis window size and the time constant of the load. Hence, extra caution

is needed to limit the maximum switching frequency. However, a hysteresis con­

troller does not have the time lag which is inherent in the PWM controller.

Starting Argorithm and Implementation 19

Page 29: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

\ ... Active at Starting

)

Latching Signal

__ ""","""" Current __ I'...... Transducer 1---.......

'/ Circuit ,.

Latching "---------~ Circuit

Figure 5. Block Diagram of the Implemented scheme

Starting Algorithm and Implementation 20

Page 30: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

4.0 Description of the Drive Circuit

4.1 Introduction

The circuit for implementing the starting method of brushless DC motor is discussed

in this chapter. The complete scheme is shown in block diagram form in Figure 5 on

page 20. In the subsequent sections of this chapter, all the blocks and their actual

circuit diagrams have been discussed separately.

4.2 Power Circuit

The circuit diagram is shown in Figure 6 on page 22. The power circuit used here

consists of a conventional three-phase transistor inverter fed from a constant voltage

Description of the Drive Circuit 21

Page 31: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Circuit Breaker

Figure 6. Power Circuit D' lagram

e rive Circuit Description of th D

To Motor Phases

22

Page 32: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

dc link. The dc link is supplied by a three-phase diode rectifier with a LC link filter.

The input to the rectifier is taken through a circuit breaker.

The input circuit breaker has over-current and low-voltage protection features. The

connection diagram is shown in Figure 6 on page 22. T.he low-voltage coil of the

breaker is connected between line-to-line. The STOP switch which is a NC (normally

closed) type is placed in series with the coil circuit. The START switch, which is also

in the same coil circuit, is shunted by a NO (normally open) switch. This NO switch

is closed once the coil is energized and remains closed until the circuit is caused to

trip. The over-current protection is provided by a set of bimetallic strips.

A commercially available three phase diode rectifier block is used to rectify the ac

input. The inverter configuration is a conventional six switch type, shown in

Figure 6 on page 22. The power switches are 50 ampere and 600 volt darlington

transistors (MJ 1 0016). These transistors are provided with antiparallel diodes and

hence no other external diode has been used.

All the transistors are provided with their individual snubber circuits. Polarized R-O-C

snubbers have been used to protect the devices from the voltage spikes at the time

of turn off.

4.3 Base Drive Circuit

Description of the Drive Circuit 23

Page 33: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

+v s (8 Volt)

E • 04 7~F

WI" .../v'W=:J 2.7M 560K~

+V 5

VVV~J.~7 2 i . B I

3 + 1 lK ~I--f---'IL---·-'VW- 4 1 K

f'. IK r y

-v s

Isolati0n Signal processing

stage.

Figure 7. Base Drive Circuit

Description of the Drive Circuit

t+v 5 (8 Volt)

6.8Q ~ S-Rl

I J 1~Zl2 f

I

I T3 --1 ~IRFZ12

Ie 'J ~ I 6.8\1 ~ J, I R2 I I ,-v (-8 Volt)

s

?L,t .. er ,:mplif ier

stage.

24

Page 34: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

The complete circuit diagram is shown in the Figure 7 on page 24. The circuit can

be divided into three stages namely, isolation stage, signal processing stage and

power amplifier stage.

To explain the operation of the base drive circuit it is best to start from the final power

amplifier stage. This stage contains two MOSFET switches and baker clamp diodes.

The switch T2 in Figure 7 on page 24 turns the power transistor, T1 ON by providing

a positive gate current. This base current is limited by the resistor R1. It should be

mentioned here that the Baker clamp diode [19] diverts a part of the base current

through the collector circuit of T1, when the power transistor T1 goes into saturation.

This stops the transistor T1 from being driven into saturation. Now to turn the device

(T1) OFF the base current is removed by turning T2 OFF. The base of T1 is also con~

nected to a negative voltage by switching T3. This method of negative base current

turn-off along with the baker clamp diode gives a fast turn-off of the power darlington.

From the operation of switches T2 and T3 it is obvious that they require complemen­

tary drive signals. Since the source voltage of T2 varies from positive voltage to

negative voltage, it is also necessary that the gate signal of T2 be bipolar. Switch T3

can be operated by a zero to negative gate signal. However, a bipolar signal has been

used. To obtain the bipolar signal from the unipolar square wave ( obtained from the

output of the opto-isolator ), the signal is compared with a small positive voltage. The

comparator used for this purpose is a dual power supply operational amplifier and

hence the output is bipolar. This bipolar signal is inverted by an inverting amplifier

to get the complementary signal.

The most important feature of a gate drive circuit is its isolation from the preceding

control circuit. Each of the drive circuits here has a separate isolated power supply.

Description of the Drive Circuit 25

Page 35: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

The input to the drive circuit is isolated by an opto-isolator. It should be noted that the

opto-isolator is an inverter by itself and the inversion of the signal is taken care of

by a proper choice of polarity of the comparator stage.

The voltage waveforms at different points, as marked on the circuit, are shown in the

Figure 8 on page 27.

4.4 PWM Circuit

Before getting into the details of the PWM circuit, the intended PWM logic should be

understood properly. Hence the operation of the PWM is outlined in the following

paragraph.

The intention here is to build a PWM current controller. Hence the current error is

calculated from the commanded and actual value of the current. The error is then

compared with a carrier signal. It should be noted that by choosing a unipolar carrier,

the duty cycle can be varied from zero to one. Here the error is defined as the dif­

ference between the commanded current and the actual current. Hence only the up­

per switch of a particular leg is modulated when the current error is positive.

Similarly the lower switch is modulated when the current error is negative. Since

current in the inductive circuit cannot be interrupted when a switch is turned OFF, the

current in the phase is maintained by the antiparallel diode of the other switch.

Description of the Drive Circuit 26

Page 36: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

2.2V

a

5V

a

+v s

-v s

+v s

-v s

o

1.2V a

-v s

I

r I

1 I

1

I

I

I

I I

I I

! I I I

I I I l

I 1

I I

Figura 8. Voltage Waveforms of the gate drive circuit.

Description of the Drive Circuit

Input to Opto-Isolator. (Isolated ground from

rest of the base drive circuit)

A Output of the Opto-Isolator.

B Gate of T2

C Gate of T3.

Base of thepower transistor TI.

27

Page 37: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

1 G) a

* i a -:""

feD +v

$ ~ " 1.8K

G) A3 .,

10K

-v +v s

':J+ ~.8K OK~ A4 W J!of- CD J. -::- -v

S

0 I. ,..

Al and A4 TL082 Gl to G4 4081 (CMOS)

A2 and A3 TL082 Invert:er Buffer : 4049 (CMOS)

Figure 9. PWM Current controller Circuit

Description of the Drive Circuit 28

Page 38: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

f

__ f'l I

I I; DELA Y -+-' t"­---..,..--' I

I i

,I ,! II

II 1\ I

I ~

I,

" I

I' I

I j

,

(0 I !

I I

! I

I 0 I

I I

8

rLhhr-t0 ----------------------------------~--~

Figure 10. PWM Voltage Waveforms.

Description 01 the Drive Circuit 29

Page 39: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

The actual PWM circuit is shown in the Figure 9 on page 28 and the voltage

waveforms at different points are shown in the Figure 10 on page 29. The first stage

of the circuit is the differential amplifier that computes the current error. A back to

back zener combination is used at the output of the amplifier to limit the value of the

current error. Now A2 and A3 are two comparators in the Figure 9 on page 28. A2

and A3 compare the error signal with positive and negative carrier frequencies and

generate PWM pulse trains. The pulse trains are shown in the Figure 10 on page 29

and represented as (D) and (E) respectively. Pulse train (D) is used for the upper

transistor of a leg and (E) is used for the lower one.

When the error signal changes sign there can be a momentary short circuit of that

particular phase. To avoid this, both trains of pulses are inhibited for a short interval

following the zero crossing of the error signal. This can best be explained with the

help of Figure 9 on page 28 and Figure 10 on page 29. The zero crossing of the cur­

rent error is detected by the comparator A4 and the output is shown as (F) in the

Figure 10 on page 29. Now (F) is delayed by the low-pass filter and AND gate (G1)

combination. The output of the AND gate is shown as (H) in the Figure 10 on page

29 The signal at (H) when ANDed with the pulse train (D) provides the necessary

inhibition of pulses. A identical operation is performed for the other pulse train (E),

where it is ANDed with the sig nal (J).

A standard triangular wave generator has been used to obtain the carrier wave. The

circuit is shown in the Figure 11 on page 31. This circuit generates a bipolar trian­

gular wave which is subsequently shifted by a summer amplifier and then inverted to

obtain two opposite polarity unipolar carrier waves.

Description of the Drive Circuit 30

Page 40: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

540 pF

lK 10K

10K loon

loon

Figure 11. Carrier Wave Generator Circuit.

Description of the Drive Circuit 31

Page 41: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

4.5 Commanded Current Generator

Recalling the operation of a brush less dc motor, we know that the commanded cur­

rent in a phase will consist of alternate positive and negative blocks of current. Width

of the current blocks are 120 electrical degrees with intermediate gap of 60 degrees,

when commanded current is zero. The commanded current of three phases are

separated from each other by 120 electrical degrees. In normal operation, the mag­

nitude of the commanded current is decided by the speed loop. However, for the

starting purpose the commanded currents of constant magnitude can be used. The

commanded current profile is shown in the Figure 12 on page 33. The figure shows

the commanded current with respect to the rotor position. In the absence of the rotor

position feedback the motor is started with an arbitrary frequency of the commanded

current while increasing the frequency with time.

As discussed in this section, the commanded currents are generated by starting from

a square wave signal of fifty percent duty cycle. The frequency change of the com­

manded current is actually incorporated by changing the frequency of the input

square wave signal. The circuit also has a feature of reversing the phase sequence

of the commanded currents. The circuits discussed in this section are shown in Fig­

ure 13 on page 34 and Figure 14 on page 35.

The first stage of the circuit is a modulo-six upcounter. The output of the counter is

shown in the Figure 15 on page 37 as OA, Os and Oc. The second stage is the logic

circuit for reversing the phase sequence [17]. The phase sequence can be changed

by applying a high or low voltage to the R input. Let the output of the phase reversing

Description of the Drive Circuit 32

Page 42: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

I a

I c

*

"*

Figure 12. Commanded Current Profile

Description of the Drive Circuit 33

Page 43: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

J1fl

R (Phase sequence reversing signal)

LS193 - Counter.

LS138 - Decoder.

Figure 13. Circuit for Commanded Current Generator (part 1)

Description of the Drive Circuit

Yo

34

Page 44: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

S BUS (Signals synchronised ~ with rotor position.)

! ! L

Yo I I 20R

Y2

Y3 A

Y5

Y2

Y4

Ys B

Yl ~

Y4

Yo

Y1 c

Y3

CL ;0

Y5

DS - Digital Switch.

L - Signal from latching circuit

Figure 14. Circuit for Commanded Current Generator (part 2)

Description of the Drive Circuit 35

Page 45: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

circuit be named as QAA' QBe and Qce . The following logical relation between the input

and the output of the phase reversing circuit is arrarent.

With R = 1

QAA = QA

Q BB = Q B

Qcc = QCAQB

With, R = 0

QAA = QA

Q BB = Q B

Qcc = QBAQC

(4.1)

(4.2)

The logic given in the equations (4.1) and (4.2) are shown pictorially in the Figure 15

on page 37. It is obvious from the figure that when R = 0, QM' Qss and Qcc states

constitute a modulo-six down counter and hence, give a reversal in phase.

The stage following the phase reversing circuit is the decoder. The decoder outputs

are 60 degree wide pulses and shifted from each other by 60 degrees. The decoder

outputs are shown in the Figure 15 on page 37.

The active low output lines of the decoder are inverted and connected to the set and

reset inputs of the following flip-flop stage, as shown in Figure 14 on page 35. 120

degree wide pulses are generated at the output of the flip-flops. Two flip-flops are

used for each phase. Yo and Y2 ( Figure 14 on page 35 ) are used respectively as the

set and reset inputs to a flip-flop and hence the output of the flip-flop is a 120 degree

wide pulse (shown in the Figure 16 on page 39). Another 120 degree pulse is gener-

Description of the Drive Circuit 36

Page 46: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

CLOCK

R

LJl--I~~ 1 r--l r-1 ------1 L--J L--

l_---~--L _____ ____'

1,--

Figure 15. Counter Output and Phase Reversing Logic

Description of the Drive Circuit 37

Page 47: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

ated by using Ya and Y5 as set and reset inputs to the other flip-flop of the same

phase. Now since the rising edges of Y2 and Ya are separated by 60 degree, the two

120 degree pulses discussed above are also separated by 60 degree. Finally to ob­

tain the current command, we use a differential amplifier and subtract the second

output of the flip-flop from the first one. The other two phase currents are generated

in a similar way.

Each of the flip flop outputs is connected to a differential amplifier input through a

digital switch. The digital switch is shown in Figure 17 on page 40. This switch con­

nects the output to one of the two inputs depending upon the signal L. The signal L

comes from the latching circuit that senses the back emf and sends a high signal

when the back emf is above a preset value. At the time of starting, the signal L is low

and the flip flop outputs are connected to the differential amplifier inputs. However,

when L goes high, the inputs of the differential amplifiers are connected to the S bus

( Figure 14 on page 35 ). The S bus carries 120 degree wide signals, similar to those

from the flip flop outputs, but synchronized with the rotor position (Appandix D).

For resetting the whole circuit, the CLEAR pin of the decoder is used along with a

mechanical switch. After the decoder is reset, all the decoder outputs go high. The

signal formed by ANDing Yo through Y5 is used to clock the flip flops ( Figure 14 on

page 35 ). This clock is generated when the decoder is reset. Since the D inputs are

set to low, the clock signal resets the Q outputs. The same clock signal, once in­

verted, is used to load the modulo-six counter with all zero values. This resets the

counter following the resetting of the decoder.

Description of the Drive Circuit 38

Page 48: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

L

Commanded current of Phase A.

Figure 16. Commanded Current from Decoder Output

Description of the Drive Circuit 39

Page 49: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

L

I

TNl ----?>1----------tD-1 : _JD -+-->

IN2------+-C>­! L

Figure 17. Digital Switch

Description of the Drive Circuit

OUT

40

Page 50: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

4.6 Latching Circuit

The function of this circuit is to sense the induced emf between two terminals. The

sensed voltage is compared with a preset value of voltage and a flip flop is set when

the former exceeds the latter. This flip ffop output is used as the L signal of the digital

switches shown in Figure 14 on page 35.

The latching circuit is shown in Figure 18 on page 42. A transformer is provided to

isolate the control circuit from the power circuit. The potential divider and the dif­

ferential amplifier combination is used to scale down the terminal voltage. The fol­

lowing comparator stage gives a high output when the sensed voltage is higher than

the preset voltage. The comparator output is ANDed with the signal P, where,

This is to ensure that the particular phase is not conducting when the induced emf is

sensed. The output of the AND gate is used to set the flip flop. This flip flop is reset

each time the commanded current circu it is reset.

4.7 Current Sensor

For calculating the current error in the PWM circuit it is necessary to measure the

actual currents in three phases. However, in the system discussed here only two

Description of the Drive Circuit 41

Page 51: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

To motor

terminals.

Isolation

Figure 18. Latching Circuit

Description of the Drive Circuit

390K

;0 .

LOK

+v s

\-----45 4 Q o 1

L 3

o R

L (Latching

signal)

42

Page 52: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

current sensors have been used. The third current is constructed from the other two

measured values of the phase currents. The current sensing circuit for all the three

phases are shown in Figure 19 on page 44. The circuit has three elements namely,

the current transducer, the differential amplifier and the inverting gain amplifier.

The current transducer used is a Hall effect device and hence it needs a biasing

current to attain the proper operating point. The transducers are biased from a sep­

arate 10 volt power supply. With 10 milliampere of biasing current, the output voltage

is 50 millivolt for 100 ampere turns enclosed.

The differential amplifier stage has unity gain. However, it is introduced to eliminate

the line noise pick up. This is a single op-amp differential amplifier configuration with

the offset inputs being used for reducing the input voltage offset. The amplifier can

provide line noise rejection because it has a very low common mode voltage gain.

The potentiometer connected to the offset inputs are used for zero current adjust­

ment.

The output voltage of the current transducer is of the order of millivolt and hence the

gain amplifier stage is used to step the voltage up. The gain of this amplifier is

changed by changing the potentiometer in the feedback path. The maximum output

voltage is clamped to a particular value by the zener diode connected at the output

of the amplifier.

When two of the phase current are being measured directly, the third one is can ..

structed by inverting the su m of the first two currents. The circuit for the inverting

summer is also shown in Figure 19 on page 44

Description of the Drive Circuit 43

Page 53: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Pf-IASE 3 ,- - - - - - - - --- - - - - - - - - - - -- -,

I

'_.- ' I ?1~a5e 3 ·.:'Jrrent.

I I

I

~--------------------------~

Figure 19. Circuit for Phase Current Sensing

Description of the Drive Circuit

---0

Phase current.

44

Page 54: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

4.8 Programmed Frequency Generator

This part of the circuit generates a train of pulses of increasing frequency. This signal

is used as the clock input to the commanded current generator circuit. Hence the

frequency of the signal dictates the frequency of the commanded current, which in

turn decides the frequency of the rotating magnetic field in the motor. Obviously the

frequency of the signal (in electrical radians per second) is the commanded speed

at the time of the starting.

A microcontroller (SAB80535) has been used to program the desired frequency pro­

file. The program resides on a EPROM. The EPROM is interfaced with the microcon­

troller by a latch. The related circuit is shown in Figure 20 on page 46.

Description of the Drive Circuit 45

Page 55: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

2864AP EEPROM

AO:7 AD LS

373

PS.

Micro-Controller SAB80S35

RESETTING I::\PUT.

OUTPUT

Figure 20. Mlcrocontroller circuit for programmed frequency generator

Description of the Drive Circuit 46

Page 56: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

5.0 Simulation of the Drive System

5.1 Introduction

The most critical aspect of starting a brushless dc motor, without a position sensor,

is starting from standstill to a speed at which the induced emf can be reliably de­

tected for control purposes. The starting performance of the motor depends upon

different parameters such as inertia of the rotor, type of load on the motor and most

importantly, the initial rotor position. So the simulation of the starting strategy was felt

to be essential for studying the effect of these parameters on the starting perform­

ance. The flow chart of the simulation program is detailed in this chapter. The results

of the simulation have been included and the difference in starting performance with

change of rotor position has been discussed.

Simulation of the Drive System 47

Page 57: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

5.2 Algorithm for the Simulation Program

Before going into the stepwise algorithm it is necessary to recapitulate the model of

the motor and the switching logic of the converter. Some of the critical points in

simulating the model of the motor are discussed below.

In the model used for simulation, the current variables are not the actual phase cur­

rents. Hence in every 60 degree interval, when the direction of currents in the phases

change, the current variables have to be reinitialized.

In the equations 2.6 through 2.9, the subscripts X, Y and Z assume different values in

every 60 degree interval and hence they are redefined every time. This of course

does not mean that the applied voltage and the induced emf values remain the same

over the whole 60 degree interval. The induced emf values change in every iteration

with the change in speed of the rotor. The applied voltage values are also changed

according to the switching logic decided by the current controller. The switching logic

can be briefed in three key statements as follows:

• The upper or lower switch is driven depending upon the polarity of the current

error.

• At any instant only two phase switches are modulated, where the modulation is

dictated by the current error and the carrier frequency. However, three phases

can conduct simultaneously, the third phase current being supported by a diode.

SimUlation of the Drive System 48

Page 58: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

• After a switch is turned off, the current in the particular phase continues to flow

for a finite time through the anti-parallel diode of the opposite switch of the same

phase.

The algorithm of the simulation program is outlined below:

STEP 1 Declaration of the variables. Reading of the motor parameters or defining

their defau It values.

STEP 2 Initialization of different variables and flags. Calculation of various con­

stants used in the program.

STEP 3 Starti ng of the iteration loop.

STEP 3.1 Calculation of the commanded position from the desired fre­

quency profile.

STEP 3.2 Determination of the switching logic from commanded the posi­

tion, current error and the generated carrier wave. The current

error is calcu lated by calling subroutine ERROR. Comparison of

the current error with the carrier wave and accordingly deter­

mining the applied voltage values are done by the subroutine

GETC. The induced emf vector of equation 2.6 or 2.9 is also as­

signed values depending upon the commanded position.

STEP 3.3 Calcu lation of the actual position of the rotor from the solution of

the previous iteration.

Simulation of the Drive System 49

Page 59: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

STEP 3.4 Calculation of the normalized flux-linkage profile, FA' Fe and Fe

STEP 3.5 Calculation of the electrical torque from FA' Fe, Fe and the actual

currents in the phases.

STEP 3.6 Calculation of the back emf of the phases from FA' Fe, Fe and the

actual speed.

STEP 3.7 Calculation of the load torque.

STEP 3.8 Use of Runge Kutta subroutine for solving the set of differential

equations.

STEP 3.9 Calcu lation of phase currents from the solved values of current

variables. The relation between solved currents and the phase

currents is decided by the rotor position and the direction of ro­

tation.

STEP 3.10 Writing the solved values in the output file and assigning the

values to the plotting arguments.

STEP 4 Plotting of the parameters like phase currents, speed, torque and induced

emfs.

STEP 5 End of the main program.

Simulation of the Drive System 50

Page 60: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

5.3 Simulation Results

The simulation program discussed in the previous section has been used to generate

the results shown in Figure 21 on page 52. Three plots in the above mentioned figure

show the commanded and the actual speed of the motor with different values of initial

rotor position. The rotor positions shown are in mechanical degrees and with respect

to the aligned position with phase A.

It can be observed that for the particular commanded speed, the actual speed oscil­

lates around the commanded value. For the starting position of 120 degrees ( 240

electrical degrees) the actual speed follows the commanded speed after a delay.

Another set of results has been shown in Figure 22 on page 53 for 0 degree position.

The current and the back emf of phase A have been shown together. It can be ob­

served that the current in the phase is not pu Ised when the emf in that phase is of the

same polarity. The same phenomenon occurs for other two phases too and hence the

large pulsation in the generated electrical torque is observed.

Figure 23 on page 54 shows the starting performance with two different types of fre­

quency profile. The first plot is generated with a frequency profile of constant slope

and one break point. In the second plot, the slope of frequency profile is increasing.

No difference is observed in the starting performance at low commanded speed val­

ues.

The simulation results obtained with different values of the moment of inertia (J)

gives insight into the effect of the commanded frequency profile on the starting per-

Simulation of the Drive System 51

Page 61: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

STARTiNG POS. 0 eEG g £T.o------------------------~

o o o N; _____ ~------~----~----~ 10 .00 1'.2S 2.50 3.75 5.00

o o

o~ W· w~ CL (J)

o o

SEC

STARTJNG POS. 60 DEG

~+-----~------~----~------~ '0.00 1 .25 2 .50 3. 75 5 . 00

SEC STRRTING POS. 120 OEG

8 g~----~--------------~--~

8 ~ --- +-H·.j.+-14-H..j.H4~

o~ wo w­CL' (J)

8 ~+-----~----------~----~ '0.00 1.25 2.50 3.7S 5.00

SEC

X COHo

~ ACT.

x COt1

ACT

X COM

~ ACT

Figure 21. Commanded and actual speed (In mech. rad/sec.) for different starting position

Simulation of the Drive System 52

Page 62: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

STARTING PQS. 0 DEG

g ~~---------------------------.

iD

I­Zr-­Wi.D Q::' a:::-::J' u

8

-f---f-·----t

~+-----~ ----~------~----~ '0.00 a 0.50 0.75 1.00

8 m.----------------------------,

r-­_lO (f)":' I­..J o >f' -lO

LL-1:

1

W

o a m~----~r_----_r------._----~

10 . 00 0.25 O.SO 0.75 1.00 SEC

8 N.---------------------~-----.

a a N+-____ ~~-----~------~----~

10 .00 a . 25 a . so O. 7S 1 .00 SEC

Figure 22. a) Current In phase A, b) Back EMF in phase A and c) Electrical torque

Simulation of the Drive System 53

Page 63: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

STRRTING POS. 120 OEG 8 ~~----------------~--~

1.25 2.50 3.75 5.00 SEC

STARTING POS. 120 OEG 8 gr---~----------------~

1'.25 2'.50 SEC

5.00

X COM

¢ ACT

X COM

¢ r~CT

Figure 23. Starting performance with two different commanded speed profile

Simulation of the Drive System 54

Page 64: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

formance of the motor. Figure 24 on page 56 shows that a similar commanded fre­

quency profile which can start the motor with low moment of inertia, fails to do the

same when the moment of inertia is increased considerably. However, Figure 25 on

page 57 shows that a low starting value of commanded frequency is necessary for

higher values of moment of inertia. It is also obvious from Figure 25 on page 57 that

with a low value of J the rotor follows the commanded speed with higher accuracy.

It can be concluded from these simulation results that the moment of inertia plays an

important role in deciding the slope of the commanded frequency for successful

starting of the motor.

Simulation of the Drive System 55

Page 65: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

STARTING ros. a DEG 8 0 U)

I r--' x COI1,

-3 2 tTl

J = 2.2 x ~ nCT. 10 Kg.1n m ¢ (Tl

Time Freq1.lency 0 Sec. 3.33 Hz 2.5 Sec. 4.8 Hz c .... 5.0 Sec. 8.33 Hz

W(;) ldu; o. (.r)

Q Q

0 N

'0.00 1.25 2.50 3.75 5.00 SEC

x COM

Time Frequency

o Sec. 3.33 Hz 2.5 Sec. 4.8 Hz 5.0 Sec. 8.33 Hz

Figure 24. Starting performance with the value of moment of Inertia Increased

Simulation of the Drive System 56

Page 66: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

-2 2 J = 2.2 x 10 Kg.m

Time a Sec. 2.5 Sec. 5.0 Sec.

Frequency 1. 33 Hz 2.0 Hz 4.0 Hz

J = 2.2 x 10-4 Kg.m2

Time Frequency O. Sec. u.O Hz 2.5 Sec. 6.0 Hz 5.0 Sec. 10.0 Hz

STRRTING POS. a OEG 8 ~~----~------~------~-----~

o o l') N

08 W· !J..i~ 0... 1,))

a o

I ! I

u;' ----. .,----i---0.00 1.2S

SEC 3.75 5.00

Figure 25. Successful starting with different values of moment of inertia

Simulation of the Drive System

X COM

ACT

x C011

ACT

57

Page 67: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

6.0 Experimental Results

6.1 Introduction

The results obtained from the experimental setup are shown in this chapter. The re­

sults have been analyzed and they are found to be conforming with the theoretical

predictions. In the first section of this chapter the induced emf profile of the motor

has been discussed. The starting performance has been dealt with in the second

section. The commanded and actual currents are shown in the last section.

6.2 Induced EMF of the Motor

Figure 26 on page 60 shows the induced emf as measured across two terminals of

the brushless DC motor when it is driven by an external prime-mover. It should be

Experimental Results 58

Page 68: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

noted that for the particu lar motor IJ nder consideration the stator phases are star­

connected. Hence the induced emf measured at the external terminals is the line to

line induced emf. For a BLDC motor the line to line induced emf is trapezoidal with

60 degrees of electrical constancy. This constant 60 degree portion is marked on

Figure 26 on page 60 by two vertical lines. However, a small hump is observed at the

middle of the marked period, which can be attributed to the slot harmonics present

in the motor.

6.3 Starting Performance

Figure 27 on page 62 shows the starting performance of the motor from different

starting positions. The upper waveform in each of the displays is the output of a

tacho-generator and hence the measure of the speed. The lower waveform is the

actual current in a phase. The phase current has been included to show the increase

in the commanded frequency of the current and hence the increase in the com­

manded speed. The actual speed of the motor, while starting, is found to oscillate

around the commanded value. This conforms with the starting performance predicted

by the simulation program.

I n the experimental setup the motor is finally synchronized with the rotor position

signals when a certain latching criterion is satisfied. This latching up is observed in

all three cases shown in Figure 27 on page 62 by a steady increase in the speed.

Comparing the three different cases in Figure 27 on page 62, it can be concluded that

Experimental Results 59

Page 69: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Figure 26. Recorded line to line induced emf at the terminal of the motor while running as a generator

Experimental Results 60

Page 70: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

the starting time is dependent upon the initial rotor position. As predicted, the starting

time is small when the actual rotor position is not far away from the commanded rotor

position.

The commanded frequency profile that has been used for generating the simulation

resu Its shown in Figure 21 on page 52 has also been used for the experimental

setup. It is found that the frequency profile, as predicted by the simulation result, can

start the motor from any initial position.

6.4 Commanded and actual currents

Figure 28 on page 63 shows the input clock and the commanded current. It is shown

that the commanded current is synchronized with the input clock and the time period

of the commanded current is six times that of the input clock. So it is established that

the frequency of the commanded current can be changed by changing the frequency

of the input clock.

Figure 29 on page 65 shows the commanded current and the actual phase current.

It is obvious from this figure that the actual current follows the same profile as the

commanded current. However the magnitude of the actual current is less than the

commanded value. This is because the motor is driven with a light load and the ap­

plied voltage on a phase is balanced by the induced emf. At the time of starting when

the induced emf is low and the switching of the phases are not synchronized with the

Experimental Results 61

Page 71: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Speed (650 rpm / div)

Phase current (5 amp / div)

Starting position is 0 degree .

Speed (650 rpm / div)

Phase current (5 amp / div)

Starting position is 120 degree.

Speed (650 rpm / div)

Phase current (5 amp / div)

Starting position is 240 degree.

Figure 27. Starting performance with different initial positions as measured from the exper­imental setup.

Experimental Results 62

Page 72: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Figure 28. Commanded frequency signal and the commanded current

Experimental Results 63

Page 73: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

rotor position, a higher magnitude of the phase current is observed. The phase cur­

rent while starting is shown in Figure 30 on page 66

Experimental Results 64

Page 74: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Scale: 2 amp/div

Figure 29. Commanded and actual current in a phase after starting.

Experimental Results

* i a

,i a

65

Page 75: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Scale 2 amp/dive

Figure 30. Actual current in a phase while starting.

Experimental Results 66

Page 76: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

7.0 Conclusions and scope for future research

7.1 Introduction

The sensor less starting of a brushless DC motor has been achieved. The results

obtained from the simulation program and the experimental setup has been dis­

cussed in previous chapters. The contribution of this thesis and the scope for future

research are outlined in this chapter.

Conclusions and scope for future research 67

Page 77: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

7.2 Contributions

This thesis research has the following achievements:

1. A simulation program has been developed to study the performance of the start­

ing strategy. The salient features of the software are:

• The software is user friendly and can be run with default values of the motor

parameters.

• The software can be used on a PC.

• Starting performance with different values of initial position and initial speed

can be obtained.

• The software can handle no-load, fan load and constant load conditions.

2. An experimental setup has been built to demonstrate the sensorless starting of

a brush less DC motor. A step by step design procedure for the development of

the prototype drive system is described.

3. The experimental resu Its are shown to confirm the theoretical predictions.

7.3 Scope for future research

In the present setup the motor is synchronized with the rotor position sensor follow­

ing a successful starting. However, for sensorless operation of the BLOC motor, it is

Conclusions and scope for future research 68

Page 78: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

necessary to develop a circuit for extracting the position information from the induced

emf of the phases.

A microcontroller based system design for sensorless operation of a brushless dc

motor is very challenging. The single chip microcontroller can take care of PWM

signal generation directly from the commanded frequency profile. In such a system

the intermediate commanded current generation will not be necessary and hence the

control circu it will be compact.

Conclusions and scope for future research 69

Page 79: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

8.0 Bibliography

[1] P. Pillay and R. Krishnan, fI An investigation into the torque behavior of a

brushless DC motor drive," lAS Annual Meeting, Oct. 1988 pp. .

[2] V.K. Garg, N.A. Demerdash and J. Whited, "Effect of SCR complex waveforms

on torque ratings of permanent magnet DC servo motors used for digital control

in machine tool industries," lAS Annual Meeting, 1977, pp. 466-70.

[3] H. Le-Huy, R. Perret and R. Feuillet, "Minimization of torque ripple in brushless

DC motor drives/' lAS Annual Meeting, 1985, pp. 790-97.

[4] Thomas M. Jahns, "Torque production in permanent-magnet synchronous mo­

tor drives with rectangular current excitation," IEEE Trans., vol. IA-20, No.4,

July/August 1984, pp. 803-13.

[5] J.A. Wagner, "Numerical analysis of cogging torque in a brushless DC motor,"

lAS Annual Meeting, 1975, pp.669-74.

Bibliography 70

Page 80: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

[6] R.H. Miller, T.W. Nehl, N.A. Demerdash, B.P. Overton and C.J. Ford, "An Elec­

tronically controlled permanent magnet synchronous machine conditioner sys­

tem for electric passenger vehicle propulsion," lAS Annual Meeting, 1982, pp.

506-10.

[7] P. Viarouge, M. Lajoie-Mazenc and C. Andrieux, "Design and construction of a

brush less permanent magnet servo motor for direct drive applications," IEEE

lAS Annual Meeting, 1986, pp. 781-86.

[8] H.R. Bolton, Y.D. Liu and N.M. Mallison, "Investigation into a class of brushless

DC motor with quasisquare voltage and currents," Proc. lEE, vol. 133, Pt. B, No.

2, March 1986, pp. 103-11.

[9] P. Pillay, "Modeling simulation and analysis of permanent magnet synchronous

and brushless DC motor drives," Ph.D. Thesis, VPI & SU, Nov 10, 1987.

[10] P. Pillay and R. Krishnan, "Modeling analysis and simulation of a high per­

formance, vector controlled, permanent magnet synchronous motor drive," lAS

Annual Meeting, 1987.

[11] P.F. Muir and C.P. Neumann, "Pulsewidth modulation control of brush less DC

motors for robotic applications," IEEE Trans. vol. I E-32, No.3, August, 1985, pp.

222-29.

[12] B.V. Murthy, "Fast response brushless DC drive with regenerative braking,'; lAS

Annual Meeting, 1984, pp. 445-50.

Bibliography 71

Page 81: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

[13] R. Krishnan, "Selection criteria for servo motor drives," IEEE Trans. vol. IA-23,

No.2, MarchI April, 1987, pp. 270-75.

[14] P. Pillay and R. Krishnan, "Application characteristics of permanent magnet

synchronous and brushless de motor for servo drives," IEEE lAS Annual Meet­

ing. 1987.

[15] K. lizuka and H. Uzuhashi, "Microcomputer computer control for sensorless

brushless motor," lAS Annual Meeting, 1984, pp. 618-624.

[16] S. Williams, "Direct drive system for an industrial robot using a brushless DC

motor," Proc. lEE, vol. 132, Pt. B, No.1, Jan. 1985, pp.53-56.

[17] R. Krishnan, "Speed reversal logic circuitry for inverter-fed induction motor

drives," IEEE Trans. vol. IECI-24. No.4, November, 1977, pp. 332-33.

[18] R. Krishnan, II Analysis of electronically controlled motor drives," Class notes,

VPI & SU, 1987.

[19] K. Thorborg, "Power electronics," Prentice-Hall International (UK) Ltd., 1988.

Bibliography 72

Page 82: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Appendix A. LIST OF SYMBOLS

The symbols which are used in the equations and their definitions are explained in

this section.

B

Ea, Eb, Ee

fa' fb' fe

J

Kb

Laa, Lbb• Lee

Lab' Lba

Lbe , Leb

Lea' Lae

Coefficient of friction.

Induced emf in A, 8 and C phases respectively.

Normalized flux linkage profile

of A, Band C phases respectively.

Phase currents in A, Band C.

Moment of inertia.

Back emf constant.

Self inductance of A, Band C phases respectively.

Mutual inductance between phases A and B.

Mutual inductance between phases Band C.

Mutual inductance between phases C and A.

Per phase leakage inductance.

Mutual inductance between any two phases.

Appendix A. LIST OF SYMBOLS 73

Page 83: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

P

R.,Rb,Rc

Rp

T.

~

Or

V., Vb' Vc

Derivative operator.

Resistance of phase A, Band C respectively.

Per phase value of resistance.

Generated electrical torque.

Load torque.

Rotor position in electrical degrees.

Voltage applied to A, Band C phases respectively.

Rotor speed in mechanical degrees per second.

Appendix A. LIST OF SYMBOLS 74

Page 84: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Appendix B. MOTOR PARAMETERS

The brushless de motor parameters are listed below:

Rp = 0.7 Ohms.

Lp - M = 0.00521 H

Rated Speed = 4000 rpm

No. of poles = 4

Kb = 0.0143 Volts/rpm

J 0.0022 Kgm2

Friction and windage losses

Rated current = 8.5 Amp

Rated voltage = 100 Volts

Appendix B. MOTOR PARAMETERS

187.6 Watt

75

Page 85: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Appendix C. LISTING OF THE SIMULATIOl'J

PROGRAM

The simulation program to study the sensorless starting performance of a brush less

dc motor is listed in this section.

Appendix C. LISTING OF THE SIMULATION PROGRAM 16

Page 86: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

FINALI FORTRAN Al 12/17/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE

*****MMMMMMMMMMMM************MMMMMMMMMM******MMMMMMMMMMMMMMMMKMMKM MMMMMMMMXM*MKMMKXXKX***********MXXXXXX****XXMMMXXXXXXXXXMXXXXXXXXX ** PROGRAM FOR SIMULATION OF THE SENSORLESS STARTING ** ** ** ** OF A BRUSHLESS DC HOTOR. H **************************H********************H*H************* H************************************H************H************ REAL X(4),B(2),C(2)

REAL NH,KB,Ml,M2,KL REAL LLS,HH,MAG REAL IA,IB,IC,IREF,IMAX,IHIN,EPSL INTEGER FLAG,NN,INN,FF CHARACTER*1 RESPON

c*************************XXXXXXX*XX***XXXXXXXXX****************** C PLOTTING ARGUMENTS C********X*****X*************X***************XXXXXXXMMXXXXXXXXXXX*

REAL XX(200),YY1(200,2),YY2(200,2),YY3(200,2) REAL YY4(200,2),YY5(200,3) INTEGER*4 IY,NP,MP,LITVP1(2),LITYP2tl),LITVP3(3),LINFRQ,IGRPH,IER CHARACTER*20 XLBL,YLBL

CM***********X*********MMXXXXX***************H********************* EXTERNAL AUX

COMMON TE,BB,DJ,POLE,TL,B,C,RS,LLS,FLAG * OPEN(21,FILE='Fl.DAT',STATUS='NEW') x OPENlI4,FILE='F2.DAT',STATUS='NEH') x OPEN(8,FILE='F3.DAT',STATUS='NEW') C***********x*****XXXXXXM**********************MMXXXMMMXX************

WRITE(X,901) 901 FORMAT(//,5X,'DO YOU HANT TO USE DEFAULT MACHINE VALUES YIN')

READ(X,902)RESPON 902 FORMAT( AI)

IF((RESPON.NE.'Y').OR.(RESPON.NE.'Y'» THEN HRITE(*,911)

911 FORMAT(//,5X,'GIVE INTEGRATION TIHE INTERVAL IN SECONDS') READ(X,*)H HRITE(X,913)

913 FORMAT(//,5X,IGIVE NUMBER OF POLES OF THE MACHINE') READ (X,X) POLE HRITE( *,914)

914 FORMAT(//,5X,'GIVE RATED SPEED IN RPM') READ(X,X}NH HRITE(*,915)

915 FORMAT(//,5X,'GIVE FRICTIONAL AND HINDAGE LOSSES IN HATTS') REAO(*,X)PFH HRITE(x,917)

917 FORMAT(//,5X,'GIVE EMF CONSTANTS IN VOLTS/RATED SPEED IN RPM') READ( x,x )vPT HRITE(*,919)

919 FORMAT(//,5X,'GIVE NET MOMENT OF INERTIA IN KG-SQUARE METER') READ(*,*)DJ HRITE(X,920)

920 FORMAT(//,5X,'GIVE BATTERY VOLTAGE IN VOLTS') REAO(X,*lVL

__ WRITE(X,922) _ 922 FQRMAT(//,5X,'GIVE STATOR RES. PER PHASE IN OHMS')

II

Appendix C. LISTING OF THE SIMULATION PROGRAM

1

77

Page 87: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

-

FINALI FORTRAN Al 12/17/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE

C

READ Of ,* lRS HRITE( *,923)

923 FORMAT(//,5X, 'GIVE INDUCTANCE PER PHASE IN HENRY') READ(*,*lLLS HRITE( *,925)

925 FORMATI//,5X,'GIVE RATED CURRENT IN AMP') READ(*,*)COMI HRITE( *,926)

926 FORMAT(//,5X,'GIVE FREQUENCY OF PHH CARRIER') READ 1*,*lFSL HRITE(*,927)

927 FORMAT(//,5X,'GIVE MAGNITUDE OF PHM CARRIER') READ(*,*)MAG ELSE

C****************** H=STEP LENGTH ************* •••• x •• x*****.x •••• x H=O.050E-3

C C****************** POLE= POLE NUMBERS ** •• xx •• *xx******************

POLE=4. C C***************.** NH= RATED SPEED REV/MIN **x*.x •• *x •••• * ••••••••

NM=4000. C C****************** PFH= FRICTION AND HINDAGE LOSSES * ••••••••••••••

PFH=187.6 C C ••••••• ****** •• *** VPT=EMF CONSTANT IN VOLTS PER RATED SPEED IN RPM

VPT=S7.39 C C****************** DJ= MOMENT OF INERTIA ** •••• *.******************

DJ=2.2E-4 C C****************** VDC= DC INPUT VOTAGE IN VOLTS *******x ••••••• x**

VL=90. C C.***************** VSS= SHITCHING VOTAGE IN VOLTS ** •• xx*x.********

VSS=O.8 C C****************** COMI= RATED CURRENT AMPERES ************ •••• ****

COMI=8.5 C C******************

FSL=2000. MAG=lO. EPSL=O.OOOI

C*****************************************.************ •• XX ••• ******** C MACHINE PARAMETER DEFINED HERE C********************************x*.x*x.x****.***.********************

RS=O.7 LLS=S.21E-3

C _C

ENDIF

It

Appendix C. LISTING OF THE SIMULATION PROGRAM

2

78

Page 88: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

FINAL1 FORTRAN Al 12/17/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE

C

C

C

C

c

C

C

C

HRITE(*,127) 127 FORMATf//,5X,'GIVE LOAD TYPE,l=NOLOAD,Z=FAN LOAD,3=CONST.LOAO')

READ(*,*)FF IF(FF.EQ.3)THEN HRITE( *,12S)

12S FORMAT(//,5X,'GIVE LOAD TORQUE AS FRAC. OF RATED TORQUE') READ Of,* )FRAC ELSE ENDIF HRITE(*,IZ9)

129 FORMAT(//,5X,'GIVE INITIAL POSITION H.R.T. PHASE AI) READ(*,*)THO HRITE(*,130)

130 FORMATC//,5X,'GIVE INITIAL SPEED IN RPS.') REAO(*,*) SPO XD=D.DDD

HRITE(*,*) , GIVE NO. OF PTS TO BE PLOTTED' READ(*,*)NN

HRITE(*,113) 113 FORMAT(lX,'INITIAL STARTING FREQUENCY=')

READ(*,*)YO

WRITE ( *,114) 114 FORMAT(IX,'TIME FOR FIRST KNEE POINT=')

READ(*,*) Xl

HRITE( *,115) 115 FORMAT(lX,'FREQUENCY AT FIRST KNEE POINT=')

READ(*,*) Yl

HRITE( *,116) 116 FORMATlIX,'TIME FOR SECOND KNEE POINT=')

READ(*,*) XZ

HRITE(*,117) 117 FORMAT(lX, 'FREQUENCY AT SECOND KNEE POINT=')

READ(*,*)Y2

HRITEl*,llS) 118 FORMAT'lX,'TOTAL SIMULATION TIME=')

READ(*,*JFINTIM

HRITE(*,89S)H,FINTIM,POLE,NM,PFH,VPT,TOR'DJ,VL,VSS,RS,LLS .. S98 FORMAT(//

*5X,'********************************************************',/,

.. •

II

*5X, , MACHINE PARAMETERS ' ,/, *5X,' 1.Integration time interval, H =',F9.6,· sec ',/, *5X,' 2.Final time for start of process,FINTIM =',F9.6,' sec ',/, *5X,' 3.Number of poles, POLE =',F8.2,' ',/, *5X,' 4.Rated speed, Nm =' ,FS.2,' rpm ',/, *5X,' 5.Frictional and windage losses, Pfw =',FS.2,' H ',/, *5X,' 6.EMF constant in volt/rated speed, vpt =',FS.Z,' rpm ',/, *5X,' 7.Rated torque, Tor =',FS.2,' N.m ',/,

Appendix C. LISTING OF THE SIMULATION PROGRAM

3

79

Page 89: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINALI FORTRAN Al 12117/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE

C C

*5X,' 8.Moment of inertia of motor & load, OJ *5X,' 9.Battery voltage, Ydc *5X,'10.Switching voltage, *5X,'11.Armature resistance per phase, *5X,'12.Inductance per phase,

HRITE(*,899)COMI,CH,YO,Xl,Y1,X2,Y2 899 FORMAT(

Yss Rs

LLS

=',F9.6,'kgm2 ' ,I, =',F8.2,' V ',1, =',F8.2,· Y ',1, =',F9.6,'Ohms ',I, =1,F9.6,' H ')

*5X,'14.Rated current, Comi =',F8.2,' A ',I, *5X,'15.Current window in % rated current, CH =',F8.2,' A ',1, *5X, '16.Starting frequency VO =' ,F8.2,' Hz' ,I, *5X,'17.Time at knee point, Xl =',F8.2,' sec ',1, *5X, '18. Frequency at knee point, V1 =',F8.2,· Hz ',I, *5X,'19.Final time for starting, X2 =',F8.2,' sec ',I, *5X,'20.Final stator frequency for starting,Y2 =',F8.2,· Hz ',1, *5X,'********************************************************',/)

PAUSE

C¢¢¢¢¢¢¢¢¢¢¢¢¢¢ N=NUMBER OF POINTS ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ N=INTfFINTIM/H+O.S) INN=INT( N/NN )

C SIMULATED INPUT DATA C

PI=4.*ATAN(1.) PT=O.O T=O.O

C¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ HM=RATEO MECHANICAL SPEED IN RAO/SEC ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ HM=NM*{2.*PI/60.)

C¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ HR= ELECTRICAL ROTOR SPEED (RATED) IN RAD/SEC ¢¢¢¢¢¢¢ HR=( POLE/2. )*HM

C¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ KB=BACK EMF CONSTANT ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ KB=YPTIWR

C¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ PKL= LOAD TORQUE CONSTANT ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ PKL=POLE*KB*COMI/(HM**2)

C¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ BB= DAMPING CONSTANT ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ BB=PFHlHM**2

C THO=THO*(POLE/2. )*(PI/l80.) SPO=SPO*(2.*PI)*(POLE/2.J X(1)=SPO X(21=THO X(3)=0. X(4)=0. IA=O. IB=O. IC=O. POS=O. COMPOS=O.O 11=0 12=0 I3=0 14=0 15=0 16=0

Appendix C. LISTING OF THE SIMULATrON PROGRAM 80

Page 90: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

FINAL1 FORTRAN A1 12/17/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE

C**************************************************************MMMMMMM C IN "rHIS SECTION THE SLOP OF ROTOR FREQ IS CALCULATED * C********************************************************************* C

C

M1=(Y1-YO)/(X1-XO) H2=(Y2-Y1)/(X2-X1} II=1 TSL=1./FSL TT=TSL/2. MM=MAG/TT

DO 30 I=1,N C**************************************MMMMMMMMM********************* C COMMANDED STATOR FREQ HITH THO SLOPE IS CALCULATED HERE * C****************XMMMMMXXX*******************MXXXXXX***************** C

TM=AMODlT,TSL} IFlTM.LE.TT) THEN SL=MM*TM ELSE SL=MM*(TSL-TM) ENDIF ACPOS=O. FR1=M1*lT-XO)+YO FRZ=M2*(T-X1)+Yl IF(T.lT.Xl)THEN FR=FR1 ELSE IF(T.GE.Xl.AND.T.LT.FINTIM1THEN FR=FRZ ELSE ENDIF ENDIF

C------------------------------------------------------------------C¢¢¢¢¢¢¢¢¢¢ HR= COMMANDED ROTOR SPEED RAD/SEC ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢

HR=2*PI*FR C C¢¢¢¢¢¢¢¢¢¢ COMPOS= COMMANDED POSITION DEGREE ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢

COMPOS=(HR*H*(360./(2*PI»)}+COMPOS C

IFlCOMPOS.GE.360. )COMPOS=COMPOS-360. C***********************XXXM xx xxx********************************** C * C COMMANDED CURRENT FOR THE GIVEN POSITION * C IA=? 18=? IC=? *

.. C AND VOLTAGE FOR EACH POSITION IS CALCULATED HERE. *

.. •

JI

C VA=? VB=? VC=? C*************XXMXXXX*************xxxxxxxxx************************ C

IF(COMPOS.LT.60.) THEN I2=O 16=O I1=I1+1 IF(I1.EQ.1} THEN X(4)=X(3)

Appendix C. LISTING OF THE SIMULATION PROGRAM

5

81

Page 91: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINAll FORTRAN Al 12/17/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE 6

X(3)=0. ELSE ENDIF B(I)=EA-EB CALL EROR(IA,ERA,COHI,HAG) CALL EROR(IB,ERB,COMI,MAG) 1F(ABS(IC}).LE.EPSL) THEN MARK=1 CALL GETC(C,I,ERA,ERB,SL,I,VL) FLAG=1 ELSE1F(IC.GT.EPSL) THEN CALL GETC(C,I,ERA,ERB,SL,O,VL) B(2)=EC-EB MARK=1 FLAG=O ELSE CALL GETC(C,O,ERA,ERB,SL,O,VL) B(2)=EA-EC MARK=2 FLAG=O END1F

C C

ELSE1F(COMPOS.LT.120.) THEN 11=0 13=0 12=12+1 1F(12.EQ.l) THEN X(4)=X(3) X(3)=0. ELSE ENDIF B(I)=EA-EC CALL EROR(1A,ERA,COHI,HAG) CALL EROR(1C,ERC,COM1,HAG) 1F«ABS(IB».LE.EPSL) THEN MARK=! CALL GETC(C,O,ERA,ERC,Sl,I,VL) FLAG=l ELSEIF(1B.GT.EPSL) THEN CALL GETC(C,l,ERA,ERC,SL,O,VL) FLAG=O B(2)=EB-EC MARK=3 ELSE CALL GETC(C,O,ERA,ERC,SL,O,VLl FlAG=O B( 2 )=EA-EB MARK=4 END1F

C C

ELSEIF(COMPOS.LT.180.) THEN

- 12=0 14=0

II

Appendix C. LISTING OF THE SIMULATION PROGRAM 82

Page 92: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINAL1 FORTRAN A1 12/17/88 16:16

C C

_C .C

II

13=13+1 IF(I3.EQ.1) THEN X(4)=XI3) X(3)=0. ELSE ENDIF B(1)=EB-EC CALL EROR(IC,ERC,COM1,MAG) CALL ERORI1B,ERB,COM1,MAG) 1F«ABS(IA)).LE.EPSL) THEN MARK=5 CALL GETC(C,1,ERB,ERC,SL,1,VL) FLAG=1 ELSE1F(1A.GT.EPSL) THEN CALL GETC(C,1,ERB,ERC,SL,O,VL) FLAG=O B(2)=EA-EC MARK=5 ELSE CALL GETC(C,O,ERB,ERC,SL,O,VL) FLAG=O B(2)=EB-EA MARK=6 ENDIF

ELSEIF(COMPOS.LT.240.) THEN 13=0 15=0 14=14+1 IF(I4.EQ.1) THEN X(4)=X(3) XI31=0. ELSE ENDIF B(1)=EB-EA CALL ERORIIA,ERA,COMI,MAG) CALL EROR(IB,ERB,COMI,MAG) IF«ABSIIC)).LE.EPSL) THEN MARK=7 CALL GETC(C,0,ERB,ERA,SL,1,VL) FLAG=1 ELSEIF(IC.GT.EPSL) THEN CALL GETC(C,1,ERB,ERA,SL,0,VL)· FLAG=O B(2)=EC-EA MARK=7 ELSE CALL GETCIC,O,ERB,ERA,SL,O,VL) FLAG=O B(2)=EB-EC MARK=8 ENDIF

V 71 791 RECS 12/17/88 16:17 PAGE

Appendix C. LISTING OF THE SIMULATION PROGRAM

7

83

Page 93: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINAL1 FORTRAN A1 12/11/88 16:16

C C

-

-

II

ELSEIF(COMPOS.LT.300.} THEN 14=0 16=0 15=15+1 IF(I5.EQ.1) THEN X(4)=X(3} X(3)=0. ELSE ENDIF 8(1)=EC-EA CALL EROR'IA~ERA,COMI,MAG) CALL EROR(IC,ERC,COMI,MAG) IF((A8S(I8).LE.EPSL) THEN MARK=9 CALL GETC(C,1,ERC,ERA,SL,1,VL) FLAG=1 ELSE1F(IC.GT.EPSL) THEN CALL GETC(C,1,ERC,ERA,SL,0,VL) FlAG=O 8(2)=EC-EA MARK=9 ELSE CALL GETC(C,O,ERC,ERA,SL,O,VL) FLAG=O 8(2)=EC-E8 MARK=10 ENDIF

ELSEIF(COMPOS.LT.360.) THEN 11=0 15=0 16=16+1 IFCI6.EQ.1) THEN X( 4 )=X( 3) X(3)=O. ELSE END1F 8(11=EC-E8 CALL ERORC1C,ERC,COMI,MAG) CALL EROR(I8,ERB,COMI,MAG) IF(lA8S(IA)).LE.EPSL) THEN MARK=11 CALL GETC(C,0,ERC,ER8,SL,1,VL) FLAG=1 ELSEIF(IC.GT.EPSL) THEN CALL GETC(C,1,ERC,ERB,SL,0,VL) FLAG=O 8(2)=EA-E8 MARK=11 ELSE CALL GETC(C,0,ERC,ER8,SL,0,VL) FLAG=O 8(2)=EC-EA MARK=12

V 11 791 RECS 12/17/88 16:17 PAGE

Appendix C. LISTING OF THE SIMULATION PROGRAM

8

84

Page 94: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINALI FORTRAN Al 12/17/88 16:16

ENDIF ENDIF

V 71 791 RECS 12/17/88 16:17 PAGE

C¢¢¢¢¢¢¢¢ ACPOS= ACTUAL POSITION IN DEGREE ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ ACPOS=(X(2))*(360./C2*PI))

C

C

IFC(ACPOS.lT.O. ).AND.(ACPOS.GT.-360))ACPOS=ACPOS+360. IF(ACPOS.LE.-360.) ACPOS=ACPOS +C360.*(I.+A8S(INT(ACPOS/360. )))) IFCACPOS.GT.360.) ACPOS=AMODCACPOS,360.) POS=ACPOS

C****************************************************************** C THE TRAPOZOIDAl 8ACK EMF PERIOD HAS BEEN DIVIDED TO * C TWELVE EQUAL POSITION HERE. * C******************************************MMMMX*X******XX*XXXX**** C

C

TTl=30. TT2=2.*TT1 TT3=3.*TTI TT4=4.*TTI TT5=5.*TTI TT6=6.*TTI TT7=7.*TTI TT8=8.*TTI TT9=9.*TTI TTlO=lO.*TTl TTll=ll.*TTl TTl2=l2.*TTl

C------------------------------------------------------------------C C*********************************************************M*XXMXXMX C FUNCTION OF BACK EMF ACCORDING TO CALCULATTED POSITION * C IS FIND HERE. * C FA=? FB=? FC=? * CMX*MM*MMMXM*******************************XM*MMMXMMMXMM*********** C

C

IFCPOS.EQ.O. )THEN FA=l. F8=-l. FC=l.

ElSEIFCPOS.LT.TT1)THEN FA=l. F8=-l. FC=(-POS/TTl)+(TTl/TTl)

_C

--

II

C

ELSEIF(POS.LT.TT2)THEN FA=+l. FB=-l. FC=(-POS/TTl)+(TTl/TTl)

ELSEIF(POS.lT.TT3JTHEN FA=1. FB=(POS/TTlJ-(TT3/TTlJ FC=-I.

Appendix C. LISTING OF THE SIMULATION PROGRAM

9

85

Page 95: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

II

FINAll FORTRAN Al 12/17/88 16:16

C

C

C

C

c

C

C

C

C

ElSEIF(POS.lT.TT4)THEN FA=l. FB=(POS/TT1)-(TT3/TTIJ FC=-l.

ElSEIF(POS.LT.TTSJTHEN FA=(-POS/TTIJ+(TTS/TTIJ FB=l. FC=-l.

ELSEIFCPOS.LT.TT61THEN FA=(-POS/TT1)+(TTS/TTl) FB=l. FC=-l.

ELSEIF(POS.LT.TT7)THEN FA=-l. FB=l. FC=(POS/TTIJ-(TT7/TTIJ

ELSEIF(POS.LT.TT8)THEN FA=-l. FB=l. FC=CPOS/TT11-(TT7/TTIJ

ELSEIF(POS.LT.TT9)THEN FA=-l. F8=(-Pos/TTl)+(TT9/TTIJ FC=l.

ELSEIF(POS.lT.TTIO)THEN FA=-l. F8=(-POS/TT1)+(TT9/TTll FC=l.

ELSEIF{POS.LT.TTll)THEN FA=(POS/TTll-(TTll/TTlJ FB=-l. FC=l.

ELSEIF(POS.LE.TTl2)THEN FA=(POS/TTIJ-(TTll/TTl) F8=-l. FC=l. ELSE ENDIF

V 71 791 RECS 12/17/88 16:17 PAGE

C-----------------------------------------------------------------C C¢¢¢¢¢ TE= ELECTRIC TORQUE IN N-M ¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢ C

C

Appendix C. LISTING OF THE SIMULATION PROGRAM

10

86

Page 96: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

II

FINAL1 FORTRAN A1 1Z/17/88 16:16

C C C

BACK EMF VOTAGES CALCULATED HERE EA=? EB=? EC=? *

V 71 791 RECS 1Z/17/88 16:17 PAGE

*

C*************************************** ••••••••••• ···.******······· C

C

EA=KB*X(l)*FA EB=KB*X(lJ*FB EC=KB*X(1)*FC

C-------------------------------------------------------------------C LOAD TORQUE CALCULATION C-------------------------------------------------------------------

C

IF(FF.EQ.11THEN TL=O. ELSEIFCFF.EQ.ZrrHEN TL=CPKL*(CCXC1)/(POLE/Z»**Z») ELSEIFCFF.EQ.3)THEN TL=FRAC*TOR ELSE ENDIF

C------------------------------------------------------------------

C

C

PT=PT+H CALL RKK4(T,X,4,H,AUX)

IF(X(4).LT.O. ) X(4)=O.

IF(MARK.EQ.1) THEN IA=X(3) IB=-( X( 3 )+X{ 4» IC=X(4} ELSEIF(MARK.EQ.Z) THEN IA=( X( 3 )+X( 4} ) IB=-X( 3) IC=-X(4) ELSEIF(MARK.EQ.3) THEN IA=X(3) IB=X(4} IC=-( X( 3 )+X( 4» ELSEIF(MARK.EQ.4) THEN IC=-X( 3) IA=X(3)+X(4) IB=-X(4) ELSEIFCMARK.EQ.S) THEN IC=-( X( 3 )+X( 4» IA=X(4) IB=X(3) ELSEIFCMARK.EQ.6) THEN IA=-X(4) IC=-X(3} IB=X(3}+X(4) ELSEIF(MARK.EQ.7) THEN IA=-( Xl 3 )+X( 4» IB=X( 3) IC=X(4}

Appendix C. LISTING OF THE SIMULATION PROGRAM

11

87

Page 97: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINAL1 FORTRAN Al 12/17/88 16:16

ELSEIF(MARK.EQ.8) THEN IA=-X(3) IB=X( 4 )+X( 3 ) IC=-X(4) ELSEIFlMARK.EQ.9) THEN IA=-( Xl 3 )+X( 4 ) ) IB=X(4 ) IC=X( 3) ELSEIFlMARK.EQ.10} THEN IA=-X(3) IB=-X( 4) IC=X( 3 )+X( 4) ELSEIF(MARK.EQ.111 THEN IA=X(4 ) IB=-( XI 3 )+X( 4) ) IC=X( 3) ELSEIFIMARK.EQ.12) THEN IA=-X(4) IB=-X( 3) IC=X( 3 )+X( 4) ELSE

NRITE(*,*)'MARK ERROR' ENDIF

V 71 791 RECS 12/17/88 16:17 PAGE

crt!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! C

IF(N.LT.NN) GO TO 81 IF(I.EQ.1) GO TO 81 ISKIP=I KK=I/INN IF(ISKIP.NE.(INN*KK)) GO TO 30

81 CONTINUE C C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C * HRITEl11,4) T,FR C

NRITE(21,4) T,COMPOS,HR NRITE(22,4) T ,POS,X(l) NRITE(23,4) T,EA,IA,EAB

C * NRITE(24,4) COMPOS,IA,POS,EA * HRITEC25,4) T,IB,Xl4} * NRITE(26,4) T,IC,X(S) C * NRITEl12,4) T,TE,TL * - NRITE(13,4) T,COMPOS,POS * HRITEC14,4) T ,HR ,Xl 1) , TE , TL C * HRITE(8,4) T,X(3),X(4),X(S),FR C * HRITE(9,4) T,X(1),POS,FC,TE * NRITEIIO,4) T,EA,EB,EC C

- 17 FORHAT(4X,'T=I,F7.S,S(2X,E10.4) .C

II

Appendix C. LISTING OF THE SIMULATION PROGRAM

12

88

Page 98: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

FINALI

4 5 6

C 30

101

C

FORTRAN Al 12/17/88 16:16 V 71 791 RECS 12/17/88 16:17 PAGE

STOP END

FORMAT(S(EI4.6») FORMAT(4X,'T=',F7.S,2(2X,EI0.4}) FORMAT(4X,'T=',F7.5,3(2X,EI0.4»

CONTINUE

C***********************x*xxxx****xxxxxxxxxx**************** C* SU8ROUTINE AUXILLARY HITH EQUATION * C*********************************************xxxxxxxxxxx*** C

SUBROUTINE AUX (T,X,F,NE) REAL X(4), F(4),8{2),C(2),LLS INTEGER FLAG COMMON TE,88,DJ,POLE,TL,8,C,RS,LLS,FLAG

pC Ii C E=T/H

C J=INT(E+O.l) C C IF (J.LT.N) J=J+l C D=J C C******************xxxxxxxxxx**************xxxxxxxxxxxx*x* C EQUATION STARTS HERE x C*******x********xx**************x***x*************xxxxxxx

C

F(I)=((POLE/21x(TE-TL-(88XX(I)/(POLE/2»))/DJ F(2)=X(I)

C DERIVITIVE OF ACTUAL CURRENT IA,I8,IC DEFIENED HERE. C

C

IF(FLAG.EQ.O) THEN F(3)=(RS/(-LLS»)xX(3)+((2./3. )X(B(I)+C(I»)-(I./3.)X(B(2)+C(2)))

1 /f -LLS) F(4)=(RS/(-LLS»*XI4)-«I./3.)x(8(1)+Cll»)-(2./3.)X(8{2)+C(2»)

1 /(-LLS) ELSEIF(FLAG.EQ.l) THEN F(3)=(RS/(-LLS})*X(3)+(B(I)+C(1»/(2.X(-LLS» F(4)=0. X(4)=0. ELSE HRITE(x,X)'AUX FLAG ERROR' ENDIF

-C

RETURN END

-•

cxxxx*xxxx***************xxxxxxxxxxxxxxxxxxxx**xxxxxxxxxxxxx CX SUBROUTINE FOR SOLVING DIFFERENTIAL x c* 8Y * c* RUNGE-KUTTA METHOD x cxxxxxxxxxx*************xx*xxxxx*xx************************* C

SUBROUTINE RKK4IT,X,N,H,AUX) REAL KO(4), Kl(4), KZ(41, K3(4J, Xl(4),X(4),B(2),C(2)

Appendix C. LISTING OF THE SIMULATION PROGRAM

13

89

Page 99: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

FINALI FORTRAN Al lZ/17/88 16:16 V 71 791 RECS 1Z/17/88 16:17 PAGE

REAL llS INTEGER FLAG

COMMON TE,BB,DJ,POlE,TL,8,C,RS,llS,FLAG A=Z.O D=H/6.0 E=.5*H CALL AUX (T,X,KO,N) Tl=T+E DO Z J=l,N

Z X1(J)=X(J)+E*KO(J) CALL AUX (T1,Xl,Kl,N) DO 3 J=l,N

3 Xl(J)=X(J)+E*Kl(J) CAll AUX (T1,X1,KZ,N) T=T+H DO 4 J=l,N

4 X1(J)=X(J)+H*KZlJ) CALL AUX (T,X1,K3,N) DO 5 J=l,N

5 X(J)=X(J)+D*IKO(J)+A*K1(J)+A*KZ(J)+K3(J») RETURN END

C****************************************************************** SUBROUTINE GETClC,OE,X,Y,Z,FlAG,VL)

c****************************************************************** REAL C(Z),X,Y,Z,Vl

C INTEGER OE,FLAG

IF(FLAG.EQ.O) THEN IF(X.lE.Z).AND.(Y.lE.Z) THEN C(l)=VL CU )=VL ElSEIF((X.GT.Z).AND.(Y.GT.Z)) THEN C(l)=-Vl C(Z)=O. ELSEIF«(X.GT.Z).AND.(Y.LE.Z)) THEN IF(OE.EQ.l) THEN Cfl)=O. C(Z)=VL ELSEIF(OE.EQ.O) THEN CI1J=0. C(Z)=O. ELSE

ENDIF ELSE

WRITE (*,*) 'OE ERROR'

IF(OE.EQ.ll THEN C(I)=O. C(Z)=O. ELSEIF(OE.EQ.O) THEN C( 1)=0. C(ZJ=Vl ELSE

-• ENOIF WRITE (*,*J 'OE ERROR'

II

Appendix C. LISTING OF THE SIMULATION PROGRAM

14

90

Page 100: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

II

"

FINALl FORTRAN Al 12/17/88 16:16

ENDIF ELSEIF (FLAG.EQ.l) THEN IF(X.GT.Z) THEN C(l)= -VL C(2)=O. ELSE C(ll=VL C(2J=O. ENDIF ELSE

WRITE (*,*) 'FLAG ERROR' ENDIF RETURN END

V 71 791 RECS 12/17/88 16:17 PAGE

*********************************************************************** SUBROUTINE EROR(X,Y,COMI,MAG) REAL X,y,COMI,MAG Y=COMI-ABS(X) IF(Y.GT.MAG) Y=MAG RETURN END

Appendix C. LISTING OF THE SIMULATION PROGRAM

15

91

Page 101: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Appendix D. ROTOR POSITION FEEDBACK LOGIC

It has been discussed earlier that the commanded current is generated from the

signals on the S bus after the latching circuit senses the induced emf. In this section

it is discussed how SO to S5 are obtained from the outputs of the hall effect position

sensors mounted on the rotor.

Figure 31 on page 93 shows the line to line induced emf and the outputs of the rotor

position sensors with respect to the induced emfs (for a particular direction of rota­

tion). It is easy to construct the commanded current signals for the switches, from

the induced emfs in the phases. The phase induced emfs are drawn from the line to

line induced emfs and the commanded current signals for the switches are shown

as SO to S5 in Figure 31 on page 93.

Three outputs from the rotor position sensors are named as Black (BL), Brown (BR)

and Red (R). From inspection of the Figure 31 on page 93, SO to S5 can be expressed

as:

Appendix D. ROTOR POSITION FEEDBACK LOGIC 92

Page 102: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

~'C7~~H ~~'C7L'2-3

I ~ / 'C7 'C7 3-1

Line to line induced emf.

0 ... _ ...... _____ ...L-_____ 1.-____ :::: Signals from I } I hall effect 1-------'------.L--------l---DRed position sensors.

" '" / \,

7 "'--b~ " / 2 Induced emfs

'" 7 in three phases.

~" 7 / \ 3

"'\ 7 1 I I so

I 1 r 51

I 1 I S2 Commanded current

t=J I 1 . signals for six S3 switches.

I 1 S4

I I I I 55

Figure 31. Commanded current signals (SO to S5) for six switches and the induced emfs

Appendix D. ROTOR POSITION FEEDBACK LOGIC 93

Page 103: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

S1 = BLI\R

S2 = BRI\BL

S3 = BR I\BL

S4 = RI\BR

Appendix D. ROTOR POSITION FEEDBACK LOGIC 94

Page 104: If Ii · writing the microcontroller ... A four quadrant operation of a BLOC motor for special applications in machine ... brush less DC motor without a position

Vita

Ramit Ghosh was born in Calcutta, India in 1963. He obtained his Bachelor's degree

in electrical engineering from the Indian Institute of Technology at Kharagpur, India.

He is enrolled in the M.S. program at the Virginia Polytechnic Institute and State

University, USA. His research interests are in power electronics and motor drives. _

Vita 95