TRIBHUVAN UNIVERSITY Institute of Engineering Pulchowk Campus Department of Electronics and Computer Engineering A FINAL YEAR REPORT ON “DC Motor Control using Fuzzy Logic” By: Ansu Man Singh (23303) Deep Sherchan (23309) Kabin Shrestha (23315) Shrenik Kothari (23338) Kathmandu, Nepal February, 2008
69
Embed
Pulchowk Campus Department of Electronics and Computer ...
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
TRIBHUVAN UNIVERSITY Institute of Engineering
Pulchowk Campus Department of Electronics and Computer Engineering
A FINAL YEAR REPORT
ON “DC Motor Control using Fuzzy Logic”
By: Ansu Man Singh (23303) Deep Sherchan (23309) Kabin Shrestha (23315) Shrenik Kothari (23338)
Kathmandu, Nepal February, 2008
TRIBHUVAN UNIVERSITY Institute of Engineering
Pulchowk Campus Department of Electronics and Computer Engineering
A FINAL YEAR REPORT
ON “DC Motor Control using Fuzzy Logic”
By:
Ansu Man Singh (23303) Deep Sherchan (23309) Kabin Shrestha (23315) Shrenik Kothari (23338)
A PROJECT WAS SUBMITTED TO THE DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING IN PARTIAL FULLFILLMENT OF THE
REQUIREMENT FOR THE BACHELOR OF ENGINEERING
Kathmandu, Nepal
February, 2008
Department of Electronics and Computer Engineering
i
ACKNOWLEDGEMENT We are highly indebted to the Department of Electronics and Computer Engineering for
providing us an opportunity to employ our theoretical knowledge into practice in form of
our 4th year project.
We are highly thankful to our project co-coordinator, Associate. Prof. Rajendra Lal
Rajbhandari, for his useful suggestions on selection of project. We would also like to
Tamrakar for their continuous support and suggestions regarding the implementation of
the project. We would also like to thank the Department of Electrical Engineering for
allowing us to use the Electrical Machine Lab for our experiment. We also like to thank
Prof. Indra Man Tamrakar, Associate Prof. Uttam Mali and Prof. Sashidhar Ram
Joshi for his valuable suggestion regarding our project.
We would also like to show our gratitude towards Mr. Bijaya Man Sherchan, M.Sc, MD
Of MAILUN KHOLA HYDROPOWER COMPANY, Mr. Ashok Raj Panday, MD of
NEPAL ELECTRIC VEHICLE INDUSTRY, Mr. Bibek Chapagain, M.Sc, Coordinator
of KATHMANDU ELECTRIC VEHICLE ALLIANCE, Mr. Umesh Shrestha and Mr,
Sachendra Dhakwa, Shri Eco Visionary, Dr. Peter Fereer, Reasearch Fellow Monash
University, Australia. We also like to thank Mr Prakash, Mahesh and Sabin of DigiTech
for sharing their know-how in the technical detail of Curtis Controller.
We would also like to thank our particular friends Aashish Poudel, Anjan Narsingh
Rayamajhi, Anup Shrestha, Bikash Sharma, Jeewan Shrestha and Siruja Maharjan for
their support during the development of the project.
Finally, we want to thank the valuable readers for utilizing their time in studying this
document.
ii
ABSTRACT
The Electric Drive technology is not a new technology but it has been gaining interest
due to its capability of contributing in the reduction of green house gas in the
environment. Moreover, it has a promising future in Nepal which can be justified by the
presence of SAFA tempos.
The project deals with the main aspect of the Electric Vehicle (EV) that is controlling the
speed accurately and efficiently. The project focuses itself in designing the high current
driver circuit and an efficient algorithmic based control (Fuzzy Logic) to track the
velocity. The design problem of the project is appropriate for a motor of 0.75 KW. The
necessary parameter of the motor was calculated and used for designing the system.
The motor driver circuit has been constructed using the MOSFET and employing the H-
bridge circuit due to its simplicity. The MOSFET implemented was chosen considering
the maximum current it can draw.
The control system uses the concept of FUZZY SET to control the error signal fed back
to the system, which is obtained by employing optical encoder as a speed sensor. Unlike
the traditional analog PID control system, where OPAMPs are used, the project utilizes
the concept of the discrete control system by employing the controlling algorithm in the
FPGA. The VHDL has been used to describe the digital system.
In summary, this project hopes to demonstrate the capability of Fuzzy Logic in designing
a control system for speed controller of DC Motor. It also signifies the importance of the
need for further research in the field of DC motor speed controller design in Nepal.
iii
TABLE OF CONTENTS ACKNOWLEDGEMENT ............................................................................................................................... I ABSTRACT ................................................................................................................................................... II LIST OF FIGURES ........................................................................................................................................ V LIST OF ABBREVIATIONS ...................................................................................................................... VI 1 ................................................................................................................................ 1 INTRODUCTION
1.2 ......................................................................................................................... 1 LITERATURE REVIEW1.3 .............................................................................................................................. 2 PRESENT SYSTEM
2.1 ......................................................................................................... 4 FUNDAMENTALS OF DC MOTOR
................................................................................................... 6 Separately excited dc motor ............................................................. 9 Analysis of the Starting of Separately Excited Motor ....................................................................................... 11 Speed Control of Excited DC motor ........................................................................................... 12 Mode of Operation of DC motor
2.2 ...................................................................................................................... 13 SWITCHING ELEMENT
............................................... 13 Metal oxide semiconductor field effect transistor (MOSFET) ............................................................................... 14 Insulated Gate bipolar transistor (IGBT) ......................................................................................... 15 Comparison of IGBT and MOSFET .................................................................................................................. 16 Gate Drive Circuit
3 ................................................................................................ 18 DESIGN AND IMPLEMENTATION
3.1 ......................................................................................................... 18 PROPOSED SYSTEM OVERVIEW
3.2 ............................................................................................................................. 19 DRIVER CIRCUIT3.3 ............................................................................................ 21 FUZZY IMPLEMENTATION IN THE PROJECT
3.4 .............................................................................. 23 IMPLEMENTATION OF FUZZY CONTROLLER IN VHDL3.5 ................................................................................................................. 29 PWM IMPLEMENTATION
4.1 ................................................................................................. 33 RESULT FOR THE GATE DRIVE CIRCUIT.4.2 .............................................................................................................. 35 RESULT FOR SPEED SENSOR.4.3 .............................................................................................. 36 RESULT OF EXPERIMENT ON DC MOTOR
7 ......................................................................................... 44 CONCLUSION AND FUTURE WORKS
7.1 ................................................................................................................................. 44 CONCLUSION7.2 ............................................................................................................................. 45 FUTURE WORKS
REFERENCES: ............................................................................................................................................ 46 APPENDIX A ........................................................................................................................................ XLVII
SPECIFICATION OF LUCAS‐TVS MOTOR ....................................................................................................... XLVII APPENDIX B ................................................................................................................................................. II
IRF540N ..................................................................................................................................................... II APPENDIX C ............................................................................................................................................... IV
iv
IR2110 ....................................................................................................................................................... IV APPENDIX D .............................................................................................................................................. VI
OPTOINTERRUPTER ........................................................................................................................................ VI APPENDIX E ............................................................................................................................................. VIII
XSA BOARD ............................................................................................................................................... VIII APPENDIX F ................................................................................................................................................. X
ASM CHARTS ................................................................................................................................................ X ASMD CHART FOR SPEED SENSOR .................................................................................................................. XIII ASMD CHART FOR DIVIDER ........................................................................................................................... XIV FSM DIAGRAM FOR SYSTEM CONTROLLER .......................................................................................................... XV
v
LIST OF FIGURES FIGURE 2-1COMMONLY USED DC MOTORS ..................................................................................... 4 FIGURE 2-2 STEADY STATE EQUIVALENT CIRCUIT OF THE ARMATURE ........................................... 5 FIGURE 2-3 TORQUE-CURRENT CURVES .......................................................................................... 6 FIGURE 2-4 SPEED-TORQUE CURVES ............................................................................................... 6 FIGURE 2-5 EQUIVALENT CIRCUIT OF THE SEPARATELY EXCITED DC MOTOR ................................ 7 FIGURE 2-6 SECOND ORDER MODEL .............................................................................................. 10 FIGURE 2-7 FIRST ORDER MODEL .................................................................................................. 10 FIGURE 2-8 ARMATURE VOLTAGE CONTROL................................................................................ 11 FIGURE 2-9 BRIDGE CIRCUIT ......................................................................................................... 12 FIGURE 2-10 POWER MOSFET (A) SYMBOL (B) VERTICAL CROSS SECTION ................................ 13 FIGURE 2-11 CHARACTERISTICS CURVE OF THE MOSFET (SOURCE INTERNATIONAL RECTIFIER
.............................................................................................................................................. 14 FIGURE 2-13 CHARACTERISTICS CURVE OF THE IGBT (SOURCE FAIRCHILD SEMICONDUCTOR
FMG2G100US60) ................................................................................................................ 15 FIGURE 2-14 COMPARISON OF THE IGBT AND MOSFET (SOURCE INTERNATIONAL RECTIFIER
APPLICATION NOTES) ............................................................................................................ 16 FIGURE 2-15 SIMPLE GATE DRIVE CIRCUIT ................................................................................... 16 FIGURE 2-16 BOOTSTRAP CIRCUIT ................................................................................................ 17 FIGURE 3-1 BLOCK DIAGRAM OF THE WHOLE SYSTEM ................................................................. 18 FIGURE 3-3 MEMBERSHIP FUNCTIONS OF INPUTS .......................................................................... 22 FIGURE 3-4 MEMBERSHIP FUNCTION OF OUTPUT .......................................................................... 22 FIGURE 3-5 SIMULINK MODEL OF FUZZY CONTROLLER ................................................................ 23 FIGURE 3-6 SPEED SET BY FUZZY CONTROLLER (TOP) REFERENCE SPEED (BOTTOM) ACTUAL
SPEED .................................................................................................................................... 23 FIGURE 3-7 REPRESENTATION OF THE TRIANGULAR MEMBERSHIP FUNCTION ............................. 24 FIGURE 3-8 FLOWCHART OF FUZZIFICATION ........................................................................... 25 FIGURE 3-9 THE DIGITAL IMPLEMENTATION OF FUZZY RULE INFERENCE SYSTEM ..................... 27 FIGURE 3-10 MEMBERSHIP FUNCTION OF OUTPUT ........................................................................ 28 FIGURE 3-11 SAMPLE OF OUTPUT OF THE FUZZY RULE INFERENCE FOR OUTPUT MEMBERSHIP
INPUT ..................................................................................................................................... 33 FIGURE 4-2 VOLTAGE ACROSS MOTOR (SINGLE MOSFET) .......................................................... 34 FIGURE 4-3 VOLTAGE ACROSS MOTOR (PARALLEL MOSFET) IN UPPER WAVEFORM .................. 34 FIGURE 4-4 OUTPUT OF OPTO-INTERRUPTER ................................................................................. 35 FIGURE 0-1 ASMD CHART OF SPEED SENSOR ............................................................................ XIII FIGURE 0-2 ASMD FOR DIVIDER ................................................................................................ XIV FIGURE 0-3 FSM FOR SYSTEM CONTROLLER ................................................................................ XV
vi
List of abbreviations
EV Electric Vehicle PID Proportional – Integral – Derivative Hp Horse Power (1 Hp = 746 Watt)
MOSFET Metal Oxide Semiconductor Field Effect Transistor IGBT Insulated Gate Bipolar Transistor FPGA Field Programmable Gate Array VHDL Very high integrated circuit Hardware Description Language
mmf magneto – motive force PWM Pulse Width Modulation RPM Revolution Per Minute FSM Finite State Machine
FSMD FSM with Datapath ASM Algorithmic State Machine
ASMD ASM with Datapath FIS Fuzzy Inference System
1
1 Introduction 1.1 Objectives The main objectives of the projects are:
• to design driver circuit for a DC motor of 1 Hp
• to implement fuzzy logic in the speed control system
The project is mainly concerned with designing a working prototype of the controller. It
does not tend to claim itself superior to the Curtis Controller but it purposes an alternative
to the Curtis that can be employed if a further research on the system is made. The design
is not the alteration of the Curtis but instead is based on a completely new technology. It
employs the latest control system technology called the FUZZY Logic. Also, the
principle of project is targeted not only for the EV but for all the control of the DC motor.
The system is different in the sense that it abandons the traditional analog design and uses
the latest buzz in the embedded system- FPGA- to realize the discrete system.
1.2 Literature Review
The burgeoning interest in the environmental awareness has led to the different policy
amendments. It has largely affected the way engineers are designing their product. One of
the most important environmental issue concerning is the use of fossil fuels in the
Internal Combustion Engine Vehicle (ICEV). The ICEV plays the major role in the
production of green house gases resulting in the Global Warming. This technology has
been transforming the society in a negative way. But the problem can be only solved by
the use of new technologies. One of the technologies is the Electric Vehicle (EV).
In contrast to the ICEV, EV uses the electric motor to drive the vehicle. In EV, the motor
is powered by the array of batteries. Also some vehicle like trolley bus, get their power
directly from the power lines. The motor can be either be AC motor or DC motor. Due to
the zero emission of any gas, the system is very environment friendly and depends on the
renewable energy sources. But is this technology feasible in Nepal?
2
Nepal has experienced this technology since 1977 by the introduction of the trolley bus in
the roads of Kathmandu Valley. In mid – 1990s, the government and the public became
increasing aware of the fact that the air quality of the Kathmandu valley was degrading.
This led to the introduction of SAFA tempos and other hybrid three wheelers.
1.3 Present system SAFA tempo is motored by the Prestolite Motor which is a DC motor running in series
configuration. The motor is controlled by the controller named the Curtis Controller,
manufactured in the USA. The SAFA tempo consists of other electronic equipment like
DC-DC converter and display system. It is powered by the array of 6 Torjan Batteries.
But among all the other system, the main core unit is the dc motor controller that actually
controls the flow of current from the battery to the motor.
Different SAFA tempo stations had been visited during the project time for studying the
feasibility of the technology. During the visits, it was found that the SAFA tempos,
usually fails due to the overflow of the current causing the MOSFET to blow out. The
maintenance cost of the controller is very high because the components used in the
controller are all custom-made, making them unavailable in the usual market. Therefore
most of the component has to be purchased directly from the manufacturer. The other
component that undergoes usual failure is power diode used for carrying the current away
from the MOSFET. Due to this, the future of the SAFA tempos is declining but the
SAFA tempo industries have been struggling hard to maintain the status of the system.
The controllers are repaired locally by substituting the original component by the
appropriate components. This alters the design and hence the system undergoes frequent
failure. The reason of this failure is also due to the rough construction of the roads. The
controller was not designed for the SAFA tempos but instead for the all common electric
drive purpose. This makes the controller overrated for the purpose.
The only research in the controller was carried out by the group of Electrical and
Electronic engineering students of Kathmandu University under the supervision of Mr.
3
Peter Ferrer. The entire necessary manual, concerning the maintenance of the battery and
the operation of the controller had been generated by the group. The group was
undergoing a research on the alternative controller for the SAFA tempo. But due to
certain reasons the research was aborted. Since then no development has been seen
except for the fact that the Curtis controller has been thoroughly studied and an effective
repair and maintenance technique has been developed by the group of engineers of SAFA
tempo industry.
Due to findings of these situations of EV system in Nepal, this project focuses in
designing a new controller system that can control the current running SAFA tempos. As
already mentioned, the SAFA tempos is powered by the Prestolite Motor. The
specification of the motor is 48V, 4KW, Max current 106A. The design of system for this
specification requires high end power transistors which are very costly. Therefore, an
appropriate model of motor has been chosen whose specification can be found in the
Appendix. The motor used for the purpose is the LUCAS dynamo motor of
approximately 1 Hp.
The project has been the result of months of field visits to the different SAFA tempos
stations and talks with different technical experts. Many literatures concerning the
Electric drive have been studied extensively. The problem has been carefully analyzed
for the design of the efficient solution.
The project does not guarantee that the design is the most efficient of all the other design.
It might take more research on the topic for the finalization of the design. This is only a
prototype of the basic design carried out by the group. It covers all the necessary aspect
of the Electric drive.
The project hopes to illustrate the capability of the design in order to manufacture a
controller that can drive any Electric Vehicle running under the DC motor. It also hopes
to encourage future research on the topic and aware the concerning bodies of the
government for the necessity of the research.
4
2 Theoretical background 2.1 Fundamentals of DC Motor
The commonly used configuration of the dc motors is shown below in figure . In a
separately excited motor, the armature and the field coil are connected to different dc
source. This gives the configuration total control over the armature and the field voltage
separately. In the shunt motor, both coils have a common source. In case of the series
motor, both the armature and the field current are the same. In the cumulatively
compound motor, the magneto-motive force of the series field is a function of armature
current and is in the same direction as mmf of the shunt field.
Figure 2-1Commonly used DC motors
5
The steady state equivalent circuit of armature of a dc machine is shown in the figure 2-2.
Resistance Ra is the resistance of the armature circuit. In shunt and separate excited
motor it is the resistance of the armature coil whereas for series it is the sum of the field
and the armature coil. The basic equation of the system is as follows:
E = KeФwm [1.1]
V = E + RaIa [1.2]
T = KeФIa [1.3]
where,
E(V) = the back emf produced by the motor
Ф (Tesla,T) = the flux created by the field coil
and is dependent upon the field current
wm (rads-1) = the angular velocity of the motor
V(V) = supplied dc voltage
RRa (Ω)= the equivalent resistance of the
armature circuit
Ia (A) = armature current
Ke = the motor constant Figure 2-2 Steady state equivalent circuit of the armature
From these general mathematical equations of the dc motor, we can come to various
important conclusions. It can be seen that as the speed increases the back e.m.f also
increase. The torque provided by the motor is directly proportional to the field flux and
the armature current. In case of the shunt and separately excited motor, the field current
remains constant. Where as in series motor, the armature current and the field current are
equal and can be controlled by different mechanism. The series motor is usually used
when high starting torque is required.
The two most important characteristics of the dc motors are the Speed-torque
characteristics and the Torque-current characteristics. They play vital role during the
process of motor selection for a particular application. These are the dictionary of the
6
motor through which engineers can compare between different motors and make an
appropriate selection. The profile for the different types of motors is different. The
characteristic curves are shown in the figure 2-3 and 2-4.
Appendix F ASM Charts Algorithmic State Machine is an alternative way of representing a Finite State Machine (FSM). Any FSM can be first illustrated through the use of state diagram and the Truth Table. The ASM approach is a better representation of FSM then any normal flow chart because it incorporates the timing information. The ASM block consists of the following elements as shown in the figure F1.
Figure F1 ASM Chart
An ASM chart is constructed of a network of ASM blocks. An ASM block consists of one state box and an optional network of decision boxes and conditional output boxes. The state box, as its name indicates, represents a state in an FSM. It is identified by a symbolic state name on the top left corner of the state box. The action or output listed inside the box describes the desired output signal values when the FSM enters this state. This output is known as Moore output as it only depends upon the state. The output will assume default value if it is not asserted inside the box. The notation for asserted output signal is:
Signal-name <= asserted value; (in VHDL code) A decision box tests an input condition to determine the exit path of the current ASM block. It contains a Boolean expression composed of input signals and plays a similar role to the logic expression in the transition arc of a state diagram. Because of the flexibility of the Boolean expression, it can describe more complex conditions, such as (a > b) and (c /= 1). Depending on the value of the Boolean expression, the FSM can follow either the true path or the false path,
XI
which are labeled as T or F in the exit paths of the decision box. If necessary, we can cascade multiple decision boxes inside an ASM block to describe a complex condition. A conditional output box also lists asserted output signals. However, it can only be placed after an exit path of a decision box. It implies that these output signals can be asserted only if the condition of the previous decision box is met. Since the condition is composed of a Boolean expression of input signals, these output signals' values depend on the current state and input signals, and thus they are Mealy outputs. The output signal assumes the default, unasserted value when there is no conditional output box. Example of State Diagram and ASM Charts
Figure F2 (a) State Diagram (b)ASM Chart
For further information refer to RTL Hardware Design by Pong P. . Page 317. The ASM chart is further generalized into ASMD chart which means Algorithmic State Machine with a Data path. This chart is based on two particular aspect of FSM: Data path and the Control path. Data path: This includes data manipulation circuit, routing Network and the Register. Control path: This includes algorithm to describe the sequence of action. This means the circuit to control when and how Register Transfer (RT) operations should take place
XII
FSMD (Finite State Machine with Data path) is the key to realize RT methodology performed in a state of the FSM inside a state box or in a conditional output box. The example of ASDM is given. in the figure F3.
Figure F3 Basic block diagram of FSMD
This is the box that shows the operation in the data path.
Figure 4 ASMD of repetitive-addition multiplier
XIII
ASMD Chart for speed sensor
Figure 0-1 ASMD Chart of Speed Sensor
XIV
ASMD Chart for divider The unsigned division process shown below, known as the restore method, was used in defuzzification process.
Figure 0-2 ASMD for divider
XV
FSM diagram for system controller System controller generates the control signal for the selection and operation of PWM generator and divider.