Bachelor of Engineering (Hons) Electrical Engineering Thesis

Evaluation of the transient response of a DC motor using MATLAB/SIMULINK
By Tan Kiong Howe
Department of Electrical Engineering University of Queensland Supervisor: Dr. Allan Walton and Dr. Geoffrey Walker

May 2003

23rd May 2003 40/2 Waverley Rd Queensland 4068 Australia

Professor Simon Kaplan Head of School School of Information Technology and Electrical Engineering University of Queensland St. Lucia, Queensland 4072

Dear Sir,

As partial fulfilment of the requirements for the Bachelor of Engineering (Electrical) Degree (Honors), I hereby submit for your considerations this thesis entitled:

“Evaluation of the Transient Response of a DC motor using MATLAB/SIMULINK” I declare that the work submitted in this thesis is my own, and any work that is not my own has been quoted and acknowledged in the bibliography. This work has not been previously submitted for a degree at the University of Queensland or any other institutes.

Yours faithfully, Tan Kiong Howe (38037250)

i

Acknowledgement
I would like to extend my sincere gratitude to my research supervisors, Dr. Allan Walton and Dr. Geoffrey Walker, for their assistance and guidance towards the progress of this thesis project. Throughout the year, Dr Walton has been patiently monitoring my progress and guided me in the right direction and offering encouragement. Obviously the progress I had now will be uncertain without their assistance.

Special thanks must also go to the laboratory supervisor, Mr Graeme Saunders for his advice and help on the thesis.

My special appreciation and thanks to my fellow classmates Mr. Ang Tien Wee, Joshua and Mr. Neo Ming Chern, Raymond for their invaluable assistances towards this thesis project.

Most of all, I am very grateful to my family for their unfailing encouragement and financial support they have given me over the years.

Last but not least, also to Miss Magdalene Tan for her constant encouragement during the duration of the project.

ii

iii .Abstract Electric machines play an important role in industry as well as our day-to-day life. simulation is often chosen by engineers to study transient and control performance or to test conceptual designs. This will demonstrate the advantages of using MATLAB for analysing power system steadystate behaviour and its capabilities for simulating trans ients in power systems and power electronics. its wide distribution. MATLAB/SIMULINK is used because of the short learning curve that most students require to start using it. Next to having an actual system to experiment on. They are used to generate electrical power in power plants and provide mechanical work in industries. They are also an indispensable part of our daily lives. Electric machines are very important pieces of equipment in our everyday lives. Simulation can be very helpful in gaining insights to the dynamic behaviour and interactions that are often not readily apparent from reading theory. including control system dynamic behaviour. The aim of this thesis is to introduce students to the modelling of power components and to use computer simulation as a tool for conducting transient and control studies. The DC machine is considered to be basic electric machines. An average home in Australia uses a dozen or more electric motors. and its general-purpose nature.

O ia is the armature current. rad/s Vt is the terminal voltage to the motor. A Laq is the armature inductance. is the field current. kg.List of Symbols e i a is the generated voltage corresponding to the field current. O R is the resistance. A i f f ? m is the rotor speed.m2 B is the total equivalent damping TL is the load torque. O Z is the impedance. Nm/A T is the developed torque.m J is the total equivalent inertia. r/min iv . N. V Ra is the armature resistance. H Km = Kf if is the torque constant.m τ τ e is the electrical time constant of the armature is the mechanical time constant of the system m X is the reactance. O ? is the speed of rotation. N.

........1: Faraday’s experiment on the conversion of electrical energy into motion......................................5: DC motor block diagram..........27 Figure 4................................................2: Actual DC motor in the laboratory.....14 Figure 2....................................11 Figure 2....................................................10 Figure 2............................. .........................................................................12 Figure 2.................................................. ...............................13 Figure 2.....2: Joseph Henry experimental motor.....................................................22 Figure 4...........29 Figure 4.....................8 Figure 2........................11: Current direction changes as the conductor passes through the neutral zone....................35 Figure 5...................4: Equipment setup for testing the field side of the DC motor..............................................1: Simulated output for the armature current.......................................... ....9 Figure 2........................................ ......................................10 Figure 2.............33 Figure 5. ..25 Figure 4........................................ ..1: DC motor specification tag..................................................7: DC motor stator construction ....39 Figure 5.....................2: Increase in Vt .......12: The direction of magnetic field also changes as the conductor passes through the neutral zone....................List of Figures Figure 2.......6: Concept of the commutator ...................................................... 6 Figure 2.40 v .........................13: Rotor movement of a three-pole design motor..................................14: Schematic diagram of a separately excited dc motor ........3: Equipment setup for testing the armature side of the DC motor........7 Figure 2..........................................15: Block diagram representation of a separately excited DC motor...................................................................14 Figure 2.......15 Figure 2..........................16 Figure 2..........8: DC motor rotor construction ...10: Concept of a DC motor operation........................... torque and rotor speed for initial conditions........................................................................................................5: DC motor construction.26 Figure 4.................... ........19 Figure 3.......9: Commutator of a large DC machine .................................4: Electromechanical energy conversion..............7 Figure 2....................3: First rotary electric motor invented by William Sturgeon ..1: Example of a MATLAB function file................................................3: Decrease in Vt .........

.....3: DC machine workbench.........................................4: Increase in Ra ...................0236 kgm2 ) ..............44 Figure 8..............5: Decrease in Ra ...................................................6: Constant torque load applied to the motor .............................41 Figure 5...........52 vi ................1: Data sheet of DC motor................................................................2: Schematic of a typical motor ...... (J = 0...........50 Figure 8.......42 Figure 5................................................ .....................................................................................Figure 5....51 Figure 8.......

..............List of Tables Table 4..2: Measured parameters values for the armature side of the DC motor.............................................3: Calculated parameters values for the armature side of the DC motor.............30 Table 4......4: 5 different readings of rotor speed and armature voltage........28 Table 4.................. .....1: Specifications of DC motor........5: Simulated readings Vs....28 Table 4.... Measured readings .45 vii .......... ........ .............. ....25 Table 4.......

.........21 Scripts File .............................................................9 PRINCIPLES OF OPERATION ......................................................................................................................2 3.IV LIST OF FIGURES .....................2 2..........................................................................................................................................VIII 1 INTRODUCTION..................................................................................................................5 CONSTRUCTION OF A DC MOTOR ........................................................................................................................4 HISTORY OF DC MOTOR ........................................................2 1.....................................1 1.............................Table of contents LETTER TO DEAN ................................................................................ III LIST OF SYMBOLS .2 MODELLING AND SIMULATION ..21 M-File................5 AREA OF THE THESIS ............2 AIM OF THESIS ..............................................................................3................................................................4 1............................................................................................1 WHAT IS MATLAB? ....3 1....21 3..........................................................1 viii ................................................................................. V LIST OF TABLES .................................................16 3 INTRODUCTION TO MATLAB/SIMULINK ...II ABSTRACT................... VII TABLE OF CONTENTS ..............2 OVERVIEW OF THESIS ....................................................................3 3........................................3.................20 3.......................................13 MOTOR MODELLING AND SIMULATION ...................................................................................................5 GENERAL MACHINE BACKGROUND ...........................20 WHAT IS SIMULINK?.........................1 3.......4 2.............................3 2....1 2............................................................................................4 2..........................................I ACKNOWLEDGEMENT......................................................1.............................................................................................................1 1........................................................2 DC MOTOR /G ENERATOR .............20 APPLICATION PROGRAMMING I NTERFACE .....3 2 MACHINE BACKGROUND ....................................................................................................

..........3 5.........................................................52 APPENDIX D – MATLAB TEST P ROGRAM .....DATA SHEET OF DC MOTOR ............35 TORQUE – SPEED CHARACTERISTICS ........................................................36 ARMATURE VOLTAGE CONTROL................48 8 APPENDICES ................................1 5.....................2 5.............................2...........................................24 5 SIMULATION AND RESULTS .................51 APPENDIX C – DC MACHINE WORKBENCH ....2 Functions Files....................................................45 6 CONCLUSION AND FUTURE WORK ...................................................................................................................................3.......4 SIMULATION RESULTS .............................47 7 BIBLIOGRAPHY........38 ARMATURE RESISTANCE CONTROL .......2 CONCLUSION ............................................................53 ix .......................................1.....................................2..............................50 APPENDIX A ....................................................................................43 SIMULATED RESULTS VS M EASURED RESULTS ...1 MODELLING .......................................................24 4..........................46 FUTURE W ORK ....35 5.....................................1 6...........43 CHANGE IN M ECHANICAL LOAD ...............................50 APPENDIX B ..................................................................2.........41 FIELD CONTROL................................................................................................3..........................................................2 5..............................................3 5................22 4 DESIGN METHOD ..........................46 6..........................................................................SCHEMATIC OF A TYPICAL MOTOR .........................................................................................................................................................1 5...........................................

1 Introduction The theory of electrical circuits represents one of most important parts of any electrical engineering education. reliability. The combination of analysis capabilities. The main aim of this thesis project is to obtain the knowledge of circuit analysis and synthesis and to experience the actual behaviour of a DC motor. This requires a powerful software mathematical tool. systems easily and efficiently. A theory is a general statement of principle abstracted from observation. MATLAB has been enhanced by the very powerful SIMULINK program. 1 . as well as nonlinear. And a model is a representation of a theory that can be used for control and prediction. For a model to be useful. MATLAB is software package for high performance numerical computation and visualization. Features or behaviour that is relevant must be included in the model and those that are not can be ignored. These requirements are not easily fulfilled as realistic models are seldom simple and simple models are seldom realistic. and powerful graphics makes MATLAB the premier software package for all electrical engineers. Modelling refers to the process of analysis and synthesis to arrive at a mathematical description that contains the relevant dynamic characteristics of the particular model [9]. It enables the user to simulate linear. flexibility. SIMULINK is a graphical mouse-driven program for the simulation of dynamic systems. The scope of a model is defined by what is considered relevant. it must be realistic and yet simple enough to understand and manipulate.

4 and 5. These can be achieved by changing the settings in MATLAB/SIMULINK to investigate the motor responds to these changes.2 Modelling and Simulation The modelling and simulation of this thesis helped to generate expected outcomes of the project design. More details on the modelling and simulation designs. This software is used to provide simulation design and results for evaluation of the transient response of a DC motor. there are a number of different tasks that needs to be addressed to lead towards the completion of this thesis project.1. 1. The program used was called SIMULINK.1 Area of the Thesis In this project. 2 . a sub program of the mathematical and simulation software MATLAB. The properties of the DC motor are given in Table 4.3 DC Motor/Generator The DC motor to be used for this thesis is the GEC ELECTROMOTORS LTD DC machine. This would allow future students to use this SIMULINK program to evaluate the transient response of a DC motor without having to go to the laboratory to use the actual DC motor. These tasks are discussed briefly in the following sections with more in depth information provided in later chapters as indicated. code and results are given in chapters 2. 1.4 Aim of thesis The main goal of this project is to evaluate the transient response of a DC motor using MATLAB/SIMULINK.1. 1.

• Chapter 6 gives a summary and conclusions of the project and suggests future work that could be done to expand on the final design specified in this thesis . • Chapter 1 gives an introduction to this thesis and a brief description of the different areas that make up the project.5 Overview of thesis The structure of this thesis is set out into six sections. including simulation and practical data. The implementation of the motor and software used for the project is also discussed. construction and principles of operation of the DC motor. • Chapter 2 will focus on the history. • • Chapter 3 will introduce the reader to MATLAB/SIMULINK Chapter 4 will focus on the modelling of the DC motor using MATLAB/SIMULINK. 3 . • Chapter 5 reveals the results obtained and gives an analysis of the outcome of the project.1.

hoists. conveyors. Thus there is little need for large DC generators. Large DC motors are used in machine tools. Yet there remain important fields of application when the DC machines can offer economic and technical advantage.1 General Machine Background In today’s world. The wonderful thing about DC machines is its versatility. paper mills. printing presses. The DC machine definitely plays an important role in industry. DC motors still dominate as traction motors used in transit cars and locomotives as the torque-speed characteristics of DC motor can be varied over a wide range while retaining high efficiency. fans. 4 . A DC machine can operate as either a generator or a motor but at present its use as a generator is limited because of the widespread use of AC power. transformation.2 Machine Background 2. transmission and distribution. cranes. Furthermore. pumps. almost all land-based electrical power supply networks are AC systems of generation. AC motors are used in industries wherever they are suitable or can give appropriate characteristics by means of power electronic devices. Small DC machines (in fractional horsepower rating) are used primarily as control devices such as tacho-generators for speed sensing and servomotors for positioning and tracking. textile mills and so forth.

are easy to miniaturize. the current-carrying wire circled around the magnet. A number of men were involved in the work. This is done by two interacting magnetic fields -. Below are 3 of the most famous people to have experimented about DC motor [10]. leading finally to a simple DC rotary motor. DC motors have the potential for very high torque capabilities (although this is generally a function of the physical size of the motor). Gauss. Again the free part circled around the fixed part. In 1819. Faraday took a dish of mercury and placed a fixed magnet in the middle. and can be "throttled" via adjusting their supply voltage. The basic principles of electromagnetic induction were discovered in the early 1800's by Oersted. This was the 5 .2 History of DC motor Electric motors exist to convert electrical energy into mechanical energy. He set to work devising an experiment to demonstrate whether or not a current-carrying wire produced a circular magnetic field around it.2. Michael Faraday (U. he dangled a freely moving wire (the free end of the wire was long enough to dip into the mercury). but the oldest electric motors. When he connected a battery to form a circuit. The next 15 years saw a flurry of cross-Atlantic experimentation and innovation. Faraday then reversed the setup. DC motors are also not only the simplest.K. and in October of 1821. Above this. Hans Christian Oersted and Andie Marie Ampere discovered that an electric current produces a magnetic field. this time with a fixed wire and a dangling magnet. and Faraday. he succeeded in demonstrating this.) Fabled experimenter Michael Faraday decided to confirm or refute a number of speculations surrounding Oersted's and Ampere's results.one stationary. and another attached to a part that can move.

" but nevertheless believed it was important as the first demonstration of continuous motion produced by magnetic attraction and repulsion. While being more mechanically useful than Faraday's motor.1: Faraday’s experiment on the conversio n of electrical energy into motion. Henry considered his little machine to be merely a "philosophical toy. Figure 2. 6 . and being the first real use of electromagnets in a motor. Its polarity was reversed automatically by its motion as pairs of wires projecting from its ends made connections alternately with two electrochemical cells. On the basis of his experiments. making it rock back and forth at 75 cycles per minute [11]. Two vertical permanent magnets alternately attracted and repelled the ends of the electromagnet. but by the summer of 1831 Joseph Henry had improved on Faraday's experimental motor. Joseph Henry (U. Faraday is often credited with the invention of the electric motor [11].S.first demonstration of the conversion of electrical energy into motion. and as a result. it was still by and large a lab experiment.) It took ten years. it was feasible to design both electric generators and electric motors [10]. Henry built a simple device whose moving part was a straight electromagnet rocking on a horizontal axis.

In many ways. and with it the first rotary electric motor.2: Joseph Henry experimental motor. a rotary analogue of Henry's oscillating motor.Figure 2. Sturgeon's motor. while still simple. Figure 2.) Just a year after Henry's motor was demonstrated. was the first to provide continuous rotary motion and contained essentially all the elements of a modern DC motor [11].3: First rotary electric motor invented by William Sturgeon 7 .K. William Sturgeon invented the commutator. William Sturgeon (U.

8 . The major parts of any machine are the stationary component.4: Electromechanical energy conversion DC machines may also work as brakes. thus developing a mechanical braking effect. the rotor. It also converts some electrical or mechanical energy to heat. DC machines are one of the most commonly used machines for electromechanical energy conversion. the conversion is reversible. Therefore. The brake mode is a generator action but with the electrical power either regenerated or dissipated within the machine system. but this is undesired. If the conversion is from electrical to mechanical. In these machines.Because of the work of these people. Converters which are used continuously to convert electrical input to mechanical output or vice versa are called electric machines. The major advantages of DC machines are easy speed and torque regulation. Figure 2. the stator. the same electric machine can be made to operate as a generator as well as a motor [6]. the machine is said to act as a generator. the machine is said to act as a motor. An electric machine is therefore a link between an electrical system and a mechanical system. If the conversion is from mechanical to electrical. and the rotating component.

3 Construction of a DC motor The stator of the DC motor has poles. a split-ring device called a commutator is used to reverse the current at that point.5: DC motor construction The coils are connected in series. The rotor has a ring-shaped laminated iron-core with slots. Two brushes are pressed to the commutator to permit current flow.2. Modern motors normally use spring. The electrical contacts to the rotating ring are called "brushes" since copper brush contacts were used in early motors.6 consists of insulated copper segments mounted in a cylinder. The brushes are placed in the neutral zone (magnetic field is close to zero) to reduce arcing. which are excited by DC current to produce magnetic fields. 9 . To keep the torque on a DC motor from reversing every time the coil moves through the plane perpendicular to the magnetic field. Coils with several turns are placed in the slots. The distance between the two legs of the coil is about 180 electric degrees. Figure 2.loaded carbon contacts. but the historical name for the contacts has persisted. The commutator shown in Figure 2.

7: DC motor stator construction 10 . The inter poles reduces the field in the neutral zone and eliminate arcing of the commutator. A compensation winding is placed on the main poles to increase field during high load.7 below shows the stator of a large DC machine with several poles.Figure 2. The iron core is supported by a cast iron frame. Figure 2.6: Concept of the commutator Figure 2.

11 . The commutator mounted on the shaft consists of several copper segments. The rotor iron core is mounted on the shaft.8 shows the rotor of a DC machine.The following Figure 2. An insulated ring is placed on the coil ends to assure proper mechanical strength. Figure 2. separated by insulation. Coils are placed in the slots.8: DC motor rotor construction Figure 2. The segments are made out of copper and mica insulation and placed between the segments.9 shows the commutator of a large DC machine. The coil endings are welded to these flags. The ends of the coils are bent and tied together to assure mechanical strength. The end of each segment has a flag attached.

a DC shunt motor excited from a single source is often satisfactory and provides a reasonable range of adjustable speed and torque [7]. since an AC induction motor perfo rms such duties satisfactorily. costs only a fraction of the price of a DC machine of equal power and speed and requires minimal maintenance. Many simple variable-speed systems are inherently stable in operation.Figure 2. For simple systems. so that the steady-state behaviour of a DC motor is frequently all that an engineer needs to take into consideration. 12 .9: Commutator of a large DC machine A DC motor is rarely installed in a situation where it is required to run at constant speed under constant load.

2. the brushes move to the next commutator contacts. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. the polarities of the energized winding and the stator magnet(s) are misaligned.10: Concept of a DC motor operation. The geometry of the brushes. 13 . As the rotor reaches alignment. it will experience a force proportiona l to the current in the conductor and to the strength of the external magnetic field. and energize the next winding. operation is based on simple electromagnetism. A currentcarrying conductor generates a magnetic field which when placed in an external magnetic field. and the rotor will rotate until it is almost aligned with the stator's field magnets. and rotor windings are such that when power is applied. commutator contacts.4 Principles of Operation In any electric motor. Figure 2.

Figure 2. 14 .11: Current direction changes as the conductor passes through the neutral zone. Figure 2.12: The direction of magnetic field also changes as the conductor passes through the neutral zone.

waste energy. In particular. Meanwhile. DC motors will always have more than two poles (three is a very common number).e. this avoids "dead spots" in the commutator. with a two-pole motor. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount of torque it could produce is cyclic with the position of the rotor). both brushes touch both commutator contacts simultaneously). it will get "stuck" there.13: Rotor movement of a three-pole design motor 15 .In real life. there is a moment where the commutator shorts out the power supply (i. If the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets). Rotors Field Magnets Figure 2.. This would be bad for the power supply. and damage the motor components as well.

motor specifications needs to be obtained.13. a model based on the Figure 2. one pole is fully energized at a time (but two others are "partially" energized). one coil's field will rapidly collapse. the system contains a DC motor. an appropriate model needs to be established. As each brush transitions from one commutator contact to the next.From Figure 2.14: Schematic diagram of a separately excited dc motor Assuming magnetic linearity. which is also the ratio e a e m 16 .1 e =K i ω = K ω m m Equation 2. as the next coil's field will rapidly charge up (this occurs within a few microsecond). 2.2 Where K m = K f i f is a constant. For this thesis. the basic motor equations are = T a K i i =K i f f a m f f m a Equation 2. Therefore.5 Motor Modelling and Simulation To perform the simulation of a system.

V = ea + R i + L t a a aq di dt a Equation 2. a 17 .5 From Equation 2.5 V t = K ω m m + Ra ia + Laq dia dt Equation 2.4 Let the switch SW be closed at t = 0. After the switch is closed.2 are T (s) = K i m a (s) Equation 2.7 V Where t (s) = K ω m m ( s) + I a ( s ) Ra (1 + sτ a ) Equation 2.1 and 2.8 τ a = L aq R is the electrical time constant of the armature.3 E =K ω a m m (s ) Equation 2.2 and 2.6 The Laplace transform of Equation 2.The Laplace transforms of Equation 2.6 for zero initial conditions is (s) = V Or t K ω m m ( s ) + Ra I a ( s) + L aq s I a ( s) Equation 2.

From Equation 2. The Laplace transform of Equation 2.3. (s) − E a (s) (1 + sτ a ) a ( s) − K m ω m ( s ) I a ( s) = V t R =Vt R (1 + sτ a) a Equation 2.4 and 2.8.12 18 .The dynamic equation for the mechanical system is T = dω K i =J d m a t m + Bω m + T L Equation 2.6 is ( s ) = K m ia ( s ) = T J sω m ( s) + Bω m ( s ) + T L ( s ) Equation 2.10 From Equation 2.10 and 2.11 where τ m = J B is the mechanical time constant of the system. T ( s ) − T L ( s) B (1 + s J B ) ( s ) − T L ( s) ω m (s) = = K I m B(1 + sτ m ) a Equation 2.9 The term Bω m represents the rotational loss torque of the system.

More details on the MATLAB/SIMULINK program will be discussed in the following chapter.11 is shown below in Figure 2.10 and 2.A block diagram representation of Equation 2. Figure 2. a sub program of simulation is called MATLAB. 19 .15: Block diagram representation of a separately excited DC motor The program used to complete the modelling and SIMULINK.15.

simulating. It supports linear and nonlinear systems. i. And because MATLAB and SIMULINK are incorporated together. so user can change parameters on the spot and immediately see what happens. or take an existing model and modify it. analyse. visualization. SIMULINK has become the most widely used software package in academia and industry for modelling and simulating dynamic systems. or a hybrid of the two. modelled in continuous time.e. user can simulate.1 What is MATLAB? The name MATLAB stands for matrix laboratory. and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation [1]. sampled time. and revise the models in either environment at any point [3]. SIMULINK is a software package for modelling. 3. and analysing dynamic systems. 20 .. Systems can also be multi-rate.3 Introduction to MATLAB/SIMULINK 3. It integrates computation. MATLAB® is a high-performance language for technical computing. have different parts that are sampled or updated at different rates [3]. Simulations are interactive. SIMULINK encourages the user to try things out. User can easily build models from scratch.2 What is SIMULINK? In the last few years.

which will be discussed in the following section [5]. the dynamics of a predator-prey model. There are two types of Mfiles. The file is called an M-file because of its file extension of ‘. user can move beyond idealized linear models to explore more realistic nonlinear models.1 M-File M-files are normal text files written in MATLAB programming language. script files and function files. 3. It can be executed by typing the name of the script file excluding the file extension. hard stops.3. to be used in subsequent computations. and the other things that describe real-world phenomena. Knowledge of this software will serve the user well throughout his/her professional career [3].With SIMULINK. The file can be created using the MATLAB editor or another text editor. gear slippage. the flutter of an airplane wing. SIMULINK is so practical that thousands of engineers around the world are using it to model and solve real problems. It allows the user to write a series of codes into a file and execute them with a single command. factoring in friction.3 Application Programming Interface 3.3. or the effect of the monetary supply on the economy [3].1. SIMULINK turns the user computer into a lab for modelling and analysing systems that simply wouldn't be possible or practical.1 Scripts File The scripts files are the simplest kind of M-file which contains a set of valid MATLAB commands. 3.m’. air resistance. The file does not have any input or output arguments and any variables that they create remain in the workspace. Be it the behaviour of an automotive clutch system. It has the same effect of typing all the individual commands stored in 21 .

files that can accept input arguments and return output arguments.1: Example of a MATLAB function file. Therefore it can operate on existing data in the workspace. separate from the workspace you access at the MATLAB command prompt.the script file at the command line. The function file consists of the following components: • • • • The function definition line The help text The H1 line The body of the function Figure 3. 3. 22 .2 Functions Files Functions are M. or they can create new data on which to operate [5]. Script files work on global variables [4]. Functions operate on variables within their own workspace.1.3. The name of the M-file and of the function should be the same.

comment lines and functions. up to the first blank or executable line. there are up to two input arguments and two output arguments. are comment lines that provide the help text. All texts or comments after the ‘%’ sign will be ignored by MATLAB as a non-executable statement. The first line of the help text is the H1 line. Output argument can also be assigned. The function name must be the same as the filename of the function file excluding the file extension. The next several lines. These codes can consist of calculations.The first line of a function M-file starts with the keyword function. . It gives the function name and order of arguments. The file becomes a script file without the function definition line [5]. These can also be place anywhere within the file [5]. In this case. which MATLAB displays when you use the LOOKFOR command or request help on a directory [5]. 23 . The rest of the file is the executable MATLAB code defining the function.

The design methods used are discussed in the following sections. the size. For this thesis project. Each part required research and understanding before being carried out. a number of specifications were needed to be obtained and established. 4.1). The specifications of the DC motor were obtained from the engraving on the metal tag attached onto the motor casing (Figure 4. voltage and current of the armature and field windings. which requires developing individually and combining to produce the final project. power. It included the motor manufacturer company’s name. there needs to be some amount of modelling or simulations done to avoid aimless trial and error techniques with the actual equipment (the DC motor).4 Design Method This thesis involves a number of separate sections.1 Modelling To produce a good design. speed.1. the model number. All of the specifications are given in Table 4. 24 . A schematic picture of a typical motor is given in Append ix B.

8 kW 1500 rpm 320V 18.01 07 4.22 GEC Electromotors LTD MD132MAZ XM145815. 1000 IP22 F 6208.1: DC motor specification tag.Current Wd Duty type (Continuous operation at rated output) Encl (Enclosure IP protection) Ins CL (Enclosure class) BRG DE (bearing size at driving end) BRG NDE (bearing size at non-driving end) Alt. m (altitude above sea level) Table 4. Specifications of DC motor Manufacturer Size Model Number Power Speed Armature – Voltage .1: Specifications of DC motor.5A 360V 1.22 6204.35A Shunt s1 25 .Current Field – Voltage .Figure 4.

The measured results are given in Table 4. The diagram below shows the connections for testing the power (W).2.Figure 4. The variac used has an input voltage of 240V with a frequency (f) of 50Hz. There was other specification that was required for the modelling of the DC motor and it was measured using test equipments in the laboratory and thru mathematical calculations.2: Actual DC motor in the laboratory. voltage (V) and current (A) for the armature of the DC motor. 26 . phase angle (? o ).

The back of the DC motor station Field Armature Common Variact Output DC Motor A1 V1 A2 Volt Meter Ampere Meter Watt Meter V2 Figure 4. 27 .3: Equipment setup for testing the armature side of the DC motor.

79 15.1 lag 24 32.27 2.6375A 15.98 1.3: Calculated parameters values for the armature side of the DC motor.98 O 6.30mH Table 4.35 Table 4.3 lag 82.8 4.30mH 6.30mH 6.8 lag 82.94 15.98 1.2 39 51 47 55 60 69 2.22 2.88 O 2.30mH 6.55W 57.2: Measured parameters values for the armature side of the DC motor.45 3.0 lag 82.30mH = = = = = = = = 28 . Phase angle (? o ) Power (W) Voltage (V) Current (A) Impedance (Z) Resistance (R) Reactance (X) Inductance (L) 82.86 6.95 3.93 15.12 2.98 1. Readings Impedance (Z) z= V I Resistance (R) Reactance (X) Inductance (L) L= X 2Πf R = Z cos Φ 2.75V 3.05o lag 36.98 1 2 3 4 15. By taking the average results from the 4 readings.Readings Phase angle (? o ) Power (W) Voltage (V) Current (A) 1 2 3 4 81.18 X = 2 sin Φ 1.1975 O 1.

4: Equipment setup for testing the field side of the DC motor.The same experiment was also done to obtain the readings for the DC motor field. The back of the DC motor station Field Armature Common Variact Output DC Motor A1 V1 A2 Volt Meter Ampere Meter Watt Meter V2 Figure 4. 29 .

60 68. ωm = 2πN 60 In the model. Next. Using the following formulae to convert to rad/s. Va= E A Torque constant E Km = A ωm 2. By using the average of these five readings. where Km is the torque constant in rad/s. Torque Constant.91 1. there were no results to be obtained due to the field having too high impedance and huge phase change. Ke= Km = EA ωm Readings Speed.81 1. so the unit is rpm.07 89. As the speed is in terms of N.However.18 46. the internal EMF EA=km*ωm.10 1. the DC motor was switched on to take 5 different readings of the rotor speed (N) and the armature voltage (Va ).4: 5 different readings of rotor speed and armature voltage.24 65 98 130 161 189 Table 4.48 2. the torque constant (Km) can be calculated using the following formulae. wm (rad/s) Internal EMF. so K m = E ω A m 30 . N (rpm) Speed.80 1 2 3 4 5 250 445 650 850 1005 26.01 105.

Torque Constant. Km = 2. We need to convert it to rad/s by using the following formulae.02 Looking at the mechanical equation. Km = 1. dω d t m =0 So K i − Bω − T m a m L =0 Since P = 4.78.9: dω K i =J d m a t m + Bω m + T L J dω d t m = K m ia − Bω m − T L At steady state both Ia and ω m stabilized.8kW. n = 1500rpm As the speed is in term of N. equation 2. ωm = 2πN 60 2π 1500 60 ωm = ωm = 157 rad/s 31 . so the unit is rpm.By taking the average results from the above 5 readings. Ia = 18.5A.

93 – B (157) – 30.57 = 0 32.015 For the value of the rotor inertia J (in kgm2 ).57 = B (157) B = 2. refer to the data sheet provided in the Appendix A.8 K 1500rpm L = 4800157 rad / s = 30.93 .57 N.36 / 157 B = 0. T L = PW T T L = 4.30. L (1. a model of the DC motor was developed using SIMULINK.5. 32 . J = 0.Therefore.m T Therefore.78*18. The DC motor was modelled using the characteristics transfer function of the electrical and mechanical of the motor as shown in Figure 4.5) – B (157) .0236 With all the required specifications of the DC motor.TL = 0 32.

33 .5: DC motor block diagram.Figure 4.

giving an output torque which is then fed into the mechanical characteristics transfer function block. The output is the rotor speed (Wm). The result is then fed into the electrical characteristics transfer function block to produce the armature current (Ia). It is then pass thru a torque constant to produce torque. 34 .5 shows the DC motor input armature voltage (Vt) summed with the internal EMF. which is fed back into the speed constant providing the constant EMF. This is then summed with a torque load.Figure 4.

1: Simulated output for the armature current. 35 .1 5.1. torque and rotor speed for initial conditions. Simulation Results The result from the simulation of the motor model in SIMULINK is shown in Figure Figure 5.5 Simulation and Results 5.

a large supply voltage drop and a large transient torque which can damage the mechanical drive train. the internal EMF of the armature is zero. DC motors are used to drive mechanical loads. current. the simulation result shows that by applying the full. the internal EMF will increase along with it.12 T = KΦI a a Equation 2. the large starting current can cause dangerous sparking. From Figure 5.12. The advantages of having a direct-on-line (DOL) starting are low cost and simplicity. overheating of the armature winding. On the other hand.13 From Equation 2. 5. However. and increase complexity in operation of the protection equipment. The voltage. it can cause the starting current to reach 20 or more times its rated value. some applications require that the speed be controlled over a wide range. speed and torque are related as follows: = E a K Φ ω =V − I R a m t a a Equation 2.14 36 .1. the speed is ω m = V −I R KΦ t a a a Equation 2. Some applications require that the speed remain constant as the mechanical load is applied to the motor changes.At standstill. but as the rotor speed increases.2 Torque – Speed Characteristics In many applications.rated voltage to an armature with low resistance at standstill.

and as a result the speed will drop. 2. or Ra increases. speed in a DC machine increases as Vt increases and decreases as ? DC machine will be discussed further in this chapter [6]. Armature resistance control (Ra). The characteristic features of these different methods of speed control of a 37 .14. In an actual machine. The armature reaction therefore improves the speed regulation in a DC motor. Equation 2.From Equation 2. Field control (? ).13 and 2. 3.15 If the terminal voltage (Vt ) and machine flux (? ) are kept constant. providing a good speed regulation. ω m = V KΦ t a − R T (K Φ ) a 2 a Equation 2. the flux (? ) will decrease because of armature reaction as T or Ia increases. the drop in speed as the applied torque increases is small. Therefore. Armature voltage control (Vt ).15 suggests that speed control in a DC machine can be achieved by the following methods: 1.

5.2.1 Armature Voltage Control
In this method of speed control, the armature circuit resistance (Ra) remains unchanged and the field current (If) is kept constant (normally at its rated value), and the armature terminal voltage (Vt ) is varied to change the speed. If armature reaction is neglected, from equation 2.15,

ω

m

= K 1V t − K 2T

Equation 2.16

Where K1 = 1 / Ka? K2 = Ra / (K a? )2 For a constant load torque, the speed will change linearly with (Vt ). The armature voltage control scheme provides a smooth variation of the speed control from zero to the base speed. The base speed is defined as the speed obtained at rated terminal voltage. However, this method of speed control is expensive because it requires a variable DC supply for the armature circuit.

38

Figure 5.2: Increase in Vt In Figure 5.2, the armature terminal voltage was increase to simulate armature voltage control. The output waveform shows a large increase in the armature current, torque and rotor speed when compared to the initial output in Figure 5.1

39

Figure 5.3: Decrease in Vt In Figure 5.3, the armature terminal voltage was decrease to simulate armature voltage control. The output waveform shows a drop in the armature current, torque and rotor speed when compared to the initial output in Figure 5.1

40

2 Armature Resistance Control In this method. Figure 5.2.5. The speed is controlled by changing the resistance in the armature circuit. Armature resistance control is simple to implement but this method is less efficient. The value of the armature resistance can be adjusted to obtain various speeds such that the armature current (Ia) (hence torque T=Ka? Ia) remains constant. the armature terminal voltage (Vt ) and the field current (If) (hence ? ) are kept constant at their rated values.4: Increase in Ra 41 .

5. 42 .4. The output waveform shows a large drop in the armature current.5: Decrease in Ra From Figure 5. Figure 5. torque and rotor speed when compared to the initial output in Figure 5.From Figure 5. And all the output waveforms took a longer time to reach steady state. the armature resistance was decrease to simulate armature resistor control. All 3 output waveforms show an underdamped response. The output waveform shows a large increase in the armature current.1. torque and rotor speed when compared to the initial output in Figure 5. the armature resistance was increase to simulate armature resistor control.1.

TL is suddenly applied to a motor running at speed W0 on no. due to time constraint. This causes the counter EMF to become smaller. To sum it all up.3 Change in Mechanical Load When a change of mechanical load is applied on a motor in operation. the armature circuit resistance (Ra) and the terminal voltage (Vt ) remains fixed and the speed is controlled by varying the current (If) of the field circuit. 43 . then only will the speed remain constant. the armature current rises and the speed drops [12].3 Field Control In this method of control.load. the machine adjusts to the new condition through an electromechanical transient. as mechanical load increases.load current does not produce enough torque to carry the load and the motor starts to slow down. When the torque developed by the motor is equal to the torque imposed by the mechanical load. 5. the small no. resulting in a higher current and a higher torque. Unfortunately. no simulation was done on the field control of the DC motor. If a constant load torque.5.2.

resulting in a higher current and a corresponding higher torque. After the motor has reached steady-state. When the torque deve loped by the motor is exactly equal to the torque imposed by the mechanical load. if a mechanical load is suddenly applied to the shaft.load current does not produce enough torque to carry the load and the motor begins to slow down. it shows the DC motor running at no-load condition at start up.Figure 5. This causes the counter EMF to diminish.6. 44 .6: Constant torque load applied to the motor From the simulation results of the DC motor in Figure 5. and then the speed will remain constant. the small no.

701 3.502 6.637 7. rad/s 119.8 115. The difference could be put down to not having accurate initial parameters for the simulation.81 12.m Rotor Speed.82 5.4 Simulated results Vs Measured results Different torque values were loaded into the block diagram and simulated to get the following. Torque Load.1 1138 1098 1030 945 905 Rotor speed.4 114.17 114.m Rotor speed. rpm 6. N. Refer to Appendix C for the picture of the workbench. A 3 5 8 10 11 2.8 7 11 11.86 98.96 94.794 11.8 3 4 5.1 14.5: Simulated readings Vs. torque and rotor speed readings.9 116.5. The results were placed into Table 4. Tests were also done on the actual DC motor using a workbench to get the armature current.m Armature Current. N.807 6.5.77 Table 4. rad/s 4. 45 .9 107.162 Simulated Torque.2 7 Armature Current. A Measured Torque.75 120. it can be seen that the simulated readings were slightly similar to the measured readings. Measured readings From the results.3 118. N.6 6.799 9.

But simulation offers a fast and inexpensive means to learn more about these components. 46 . a toolbox extension of the MATLAB program. the block diagram of a DC motor was developed and by using SIMULINK. These parameters include the field current.1 Conclusion Actual experimentation on bulky power components can be expensive and timeconsuming. armature circuit resistance and armature voltage. Furthermore. The results from the simulation were never likely to occur in real.life condition due to the response times and condition of the actual motor. the block diagram was simulated with expected waveforms output. In this thesis. the output waveform of the simulation would change accordingly.6 Conclusion and Future Work 6. The simulation and modelling of the DC motor also gave an inside look of the expected output when testing the actual DC motor. by varying certain parameters of the DC motor block diagram.

6. This would allow the user to observe the effect on the speed response of the DC motor speed response by varying the field current 47 . These resistors can either be manually or automatically shorted out as the motor accelerates.2 Future Work There are a number of topics for future work and development related with the simulation model designed in this thesis. This can be achieved by using a field circuit rheostat. • Modifying the block diagram to control the speed of the DC motor by varying the current (If) of the field circuit. These may include: • Inserting external resistors into the armature circuit during start up of the simulation to reduce the large starting current.

The MathWorks. [6] P.7 Bibliography [1] MathWorks. Inc. The MathWorks. John Wiley and Sons Inc. Principles of Electric Machines and Power Electronics (2nd Edition). MATLAB Student Version Learning MATLAB 6 (Release 12).com/access/helpdesk/help/techdoc/learn_MATLAB/ch 1intro. (2001).C. (2001).shtml#12671 [2] MathWorks. Using MATLAB Version 6. What is SIMULINK.mathworks. (2000). 2nd printing.com/access/helpdesk/help/toolbox/SIMULINK/ug/ug. January 2001.pdf [5] The MathWorks.com/access/helpdesk/help/toolbox/SIMULINK /SIMULINK.. Introduction to MATLAB. Inc. Available: http://www. Sen.shtml [3] MathWorks. Available: http://www. 1989 48 .mathworks. Inc.mathworks.s html [4] MathWorks. The MathWorks. The MathWorks. Available:http://www. SIMULINK.com/access/helpdesk/help/pdf_doc/MATLA B/using_ml. Available: http://www.mathworks. (2001). Inc.

Fourth Edition. 1982 [8] D. [10] Peter F.[7] G. 1993. Drives. Prentice Hall. Electric Machines. 1998. 2000.html [12] Theodore Wildi. Prentice Hall International. 49 . (2001) http://www.. Prentice Hall PTR. [11] The Starting Block. [9] Chee-Mun Ong. and Power Systems. Etter. Inc. David Platnick and Joseph A. Engineering Problem Solving with MATLAB. Electrical Machines.solarbotics. Straughen.Karnas.Ryff.R.net/starting/200111_dcmotor/200111_dcmotor. Electrical Machines and Transformers. All about DC motors. M. Inc. Dynamic Simulation of Electric Machinery. Slemon and A. 1987. Addison-Wesley publishing company. Prentice Hall.. Principles and Applications.

1: Data sheet of DC motor.0236 kgm2 ) 50 .Data sheet of DC motor Figure 8. (J = 0.8 Appendices Appendix A .

Schematic of a typical motor Figure 8.Appendix B .2: Schematic of a typical motor 51 .

52 .Appendix C – DC machine workbench Figure 8.3: DC machine workbench.

y(:.0236. clc.1). leaving % the workspace empty.1.1). clf.y(:.1. % damping factor W = 3.3) % plot the rotor speed vs.2).015. subplot (3.0063.'r') title ('Rotor speed') xlabel ('time in sec') ylabel ('wm in rad/sec') 53 .5). time plot (y(:. % Removes all variables.1975.1).4). % terminal voltage in V Ra = 2. functions. time plot (y(:.3). % inductance in H Km = 1. % rotor inertia in KG m2 B = 0. % load torque Nm sim ('dcmotor'. % torque constant in Nm/A J = 0.'b') title ('Torque T') ylabel ('T in N.y(:.1. clear all. 1.'m') title ('Armature current Ia') ylabel ('Ia in A') subplot (3. % deletes all figures whose handles are not hidden. close all. % armature resistance in ohm La = 0.m') % plot the torque vs.1) % plot the armature current vs. and MEX-files from memory.2) plot (y(:. time subplot (3. % clear command window Vt = 220.Appendix D – MATLAB Test Program % Parameters for the DC motor.78.

Sign up to vote on this title
UsefulNot useful