Upload
bobby846
View
225
Download
0
Embed Size (px)
Citation preview
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 1/24
i
LABVIEW PID SPEED CONTROLLER FOR DC MOTOR
EFFIZUL SYAFRIN BIN ABU BAKAR
This project is submitted as partial fulfillment of the requirements for the award of the
Degree of Bachelor of Electrical Engineering (Electronics)
Faculty of Electrical & Electronics Engineering
Universiti Malaysia Pahang
17 NOVEMBER 2008
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 2/24
ii
“All the trademark and copyrights use are property of their respective owner.
References of information from other sources are quoted accordingly; otherwise
the information presented in this report is solely work of the author.”
Signature : ………………………………..
Author : EFFIZUL SYAFRIN BIN ABU BAKAR
Date : 17 NOVEMBER 2008
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 3/24
iii
To my beloved parents, sister and brothers who has encouraged me along thejourney of my study
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 4/24
iv
ACKNOWLEDGMENT
Million of thanks I express to my supervisor, Ms. Haszuraidah Binti Ishak
for all the advices and guidance throughout my project. Without her continued
support and interest, the project may be not as best as it is done.
I also would like to thank all the UMP’s lecturers and staffs for their
corporation in assisting me at various occasions. Their views and tips are useful
indeed.
Not forget to mention the gratitude toward my colleagues, Mohd Aizuddin
Bin Abu Bakar for helping me through the whole two semesters working on this
project.
Lastly, I wish to acknowledge to the people who give the support I needed
whether direct or indirectly. I also would like to thanks to my beloved family for
hoping the best of me. Thank you very, very much.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 5/24
v
ABSTRACT
This project is about developing a PID (proportional-integration-
derivation) controller to control the speed of DC motor. The software used to
design the controller is LabVIEW 8.5. The methodology is divided into two parts
which is software development and hardware implementation. The works insoftware development are calculation of DC motor transfer function, simulation to
determine the parameter value of PID and developing the software controller.
Ziegler-Nichols Closed-Loop Method is used to obtain the value for K p, Ki and
Kd. The last part is to interface the controller with the hardware. After finish both
parts, this system can be tune by using the PID value to do the analysis on it
response.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 6/24
vi
ABSTRAK
Tujuan utama projek ini adalah untuk membangunkan sebuah pengawal
PID (proportional-integration-derivation) untuk mengawal kelajuan DC motor.
Perisian yang digunakan adalah LabVIEW 8.5. Metodologi projek ini terbahagi
kepada dua bahagian iaitu pembangunan perisian dan perlaksanaan perkakasan.
Antara kerja-kerja yang dilakukan untuk pembangunan perisian adalah pengiraan
fungsi pindah bagi DC motor simulasi untuk menetukan parameter PID dan
membangunkan pengawal perisian. Kaedah Ziegler-Nicoles Closed-Loop
digunakan untuk menentukan nilai Kp, Ki dan Kd. Bahagian terakhir adalah untuk
berantaramuka antara perisian dan perkakasan. Selepas kedua-dua bahagian ini
selesai, sistem ini akan ditetapkan mengunakan nilai PID untuk menganalisis graf
respon.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 7/24
vii
TABLE OF CONTENTS
CHAPTER TITLE
TITLE PAGE
DECLARATION
DEDICATION
ACKNOWLEDGEMENT
ABSTRACT
ABSTRAK
TABLE OF CONTENTS
LIST OF TABLES
LIST OF FIGURES
LIST OF GRAPH
LIST OF SYMBOLS
LIST OF ABBREVIATION
LIST OF APPENDICES
1 INTRODUCTION
1.1Background
1.2 Problem Statement
1.3 Objective
1.4 Scope of project
1.5 Thesis Organization
2 LITERATURE REVIEW 7
2.1 Proportional-Integration-Derivation Controller (PID Controller) 7
2.2 Ziegler-Nichols Method
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 8/24
viii
2.3 DC Motor
2.4 Data Acquisition (DAQ) Card
2.5 Laboratory Virtual Instrumentation Engineering Workbench
(LabVIEW)
3 METHODOLOGY
3.1 Introduction
3.2 System Flowchart
3.3 Software Development
3.3.1 DC Motor Modeling
3.3.2 Ziegler-Nichols Closed Loop Method
3.3.3 Simulation 3.3.4 LabVIEW Programming
3.4 Hardware Development
3.4.1 DC Motor
3.4.2 DAQ Card
3.4.3 Motor Driver G340
4 RESULTS AND ANALYSIS 40
4.1 Introduction
4.2 Simulation
4.2.1 Result and Analysis of Uncontrolled System
4.2.2 Result and Analysis of Proportional Mode System
4.2.3 Result and Analysis of Proportional-Integration Mode
System
4.2.4 Result and Analysis of
Proportional-Integration-Derivation Mode System
4.3 Summary
5 CONCLUSION AND RECOMMENDATION
5.1 Introduction
5.2 Recommendations
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 9/24
ix
5.3 Cost and Commercialization
REFERENCES
Appendices A – C
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 10/24
x
LIST OF TABLES
TABLE NO. TITLE
2.1 Closed-Loop Calculatioc, Ti and Td 132.2 Open-Loop Calculation c, Ti and Td 14
3.1 Physical Parameter of D
3.2 General Ziegler-Nichols3.3 Tuned PID Controller V
4.1 Analysis of the Respons
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 11/24
xi
LIST OF FIGURE
FIGURE NO. TITLE
2.1 A Block Diagr
2.2 Block Diagram
3.1 Basic Block D
3.2 Flowchart of S
3.3 DC Motor Mod
3.4 LabVIEW Sim
3.5 LabVIEW PID
3.6 Servo Motor
3.7 USB DAQ Car
3.8 Motor Driver G
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 12/24
xii
LIST OF GRAPH
GRAPH NO. TITLE
2.1 System Tuned Using the Ziegler-Nichols Closed-Loop
Tuning Method
3.1 Sustain Oscillation Response
4.1 Graph Response without Controller
4.2 Graph Response with P Mode
4.3 Graph Response with PI Mode
4.4 Graph Response with PID Mode
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 13/24
xiii
LIST OF SYMBOLS
Ku - Gain Value
Pu - Period of OscillationTi,Ki - Integral Time
Td,Kd - Derivative Controller
Kp - Proportional Gain
Kcr - Critical Gain
Pcr - Critical Period
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 14/24
xiv
LIST OF ABBREVIATION
PID - proportional-integration-derivationDAQ - data acquisition card
USB - universal serial bus
DC - direct current
EMF - electromagnetic force
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 15/24
xv
LIST OF APPENDICES
APPENDIX TITLE
A
B
C
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 16/24
1
Chapter 1
Introduction
1.1 Background
This project basically is about designing PID controller using LabView
8.5 to control a DC motor speed. PID stands for proportional-integration-
derivative.
The chosen of PID controller is because it is the simplest controller
available. It used three element; proportional part, integration part and derivative
part. Easy to say, this controller is basically an element of mathematical
expression. In simple language, the controller willis collects the data from the
output of the applications or it is called feedback. Then, it will compare the
feedback with the setpoint (setpoint is a value of a user set initially or desired
output user want). If there is different between the two of them, even it is merely
slightest, the PID controller will try to reduce the error as best as possible to zero
Because there are no perfect controller invented yet, thus to reduce the error
completely is impossible.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 17/24
2
The motor model is Cliffton Percission. There are two things of this
motor that can be controlled; speed and angular movement. This project as it
state before is about controlling the speed. For example, if 12 volts is appointed
to the motor, and it is common sense the output is also 12 volts. However it
doesn’t go that way. The output maybe less, let say 10 volts. The different 2 volts
is what is called error. This error is sends or feedback to the summing point
(some of the part in PID). Then, the PID will do its job.
Before discuss further about the job that the PID done, it is time to
explain about the software needed to develop the PID controller. LabVIEW
version 8.5 is chosen. This software, developed by National Instrument is a
platform and development environment for a visual programming language. The
graphical language is named ―G‖. This programming software used graphical
method rather than coding or whatever language. This made this software is more
understandable to use.
The purpose to design this project is to overcome the problem in industry
like to avoid machines damages and to avoid slow rise time and high overshoot.
This is because when the starting voltage is high, it is not suitable for machine
and can make machine damages. So, a controller likes PID is developed to
overcome this problem.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 18/24
3
1.2 Problem Statement
There are problems when trying to run any application or plant such as to
run DC motor speed, water tank level or others. The problems are or known
better as error; lag of efficiency, loss in terms of speed, rpm or anything regards
to the output of that applications. Thus, in order to eliminate or reduce these
errors, certain controller must be constructed. This controller will try to minimize
the error to get the best output possible.
Application or plant likes machines are tending to damage without
implementation of control methodology in it system. It is known that the
characteristic of control system is specified in term of transient response. The
transient response of a practical control system usually exhibits damped
oscillation before reaching steady state. As for machines, having a high
overshoot is an undesired condition since the starting current is very high. Thus,
control methodology such as PID controller is used to limit the maximumovershoot as well as to reduce the starting current of the machine. Therefore, the
power used can be reduced as well as avoid machine from damaged due to bad
system performance.
A DC motor can be control by computer (any software available) even
without applying the controller. However, it is ineffective and inefficient because
of the slow response system as the desired output is hardly to achieve. So, PID
controller is implemented as a control system to obtain precise numerical
information input, and yet capable of highly adaptive control.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 19/24
4
1.3 Objective(s)
The objectives of the project are:
i. to develop the PID controller to control the speed of DC motor using
LabVIEW,
ii. to evaluate and analyze the performance of the controller.
1.4 Project Scope(s)
The scopes of the project are:
i.
to derive mathematical model of DC motor and develop PID controller
for the motor,
ii. to develop LabVIEW program to applied as the PID controller for the
motor,
iii. perform computer simulation of the PID controller to investigate the
effectiveness of the PID controller.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 20/24
5
1.5 Thesis Organization
This thesis is composed of five chapters consisting introduction, literature
review, methodology, analysis and result and the last chapter is a conclusion and
recommendation in future work.
Chapter 1 explains the background and a simple overview of a
proportional-integration-derivation controller or known as PID controller, and
also LabVIEW. It also consists of the problem statement, objectives and also
scopes of the project.
Chapter 2 discusses recent literature reviews on PID controller, Ziegler-
Nichols method, DC motor, motor driver, DAQ card and LabVIEW. All the
journals and the books that have some attachment to this project are used as areference to guide and help completing this project. Each of this part is explain
based on this finding.
Chapter 3 explains about the methodologies that have been used in order
to complete this project. The methodology consists two part; software and
hardware. The parameters of the PID controller and the tuning methods were
including in this chapter.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 21/24
6
Chapter 4 gives a detail result and analysis on the design aspects for the
systems, which consists the simulation of DC motor and also discussion on PID
controller development using LabVIEW.
Chapter 5 presents the overall conclusion of development of the project.
This chapter also discuss on the suggestion and recommendation for future work
or modification.
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 22/24
7
Chapter 2
Literature Review
2.1 Proportional-Integration-Derivative Controller (PID Controller).
A proportional– integral– derivative controller (PID controller) is a generic
control loop feedback mechanism (controller) widely used in industrial control
systems. A PID controller attempts to correct the error between a measured
process variable and a desired setpoint by calculating and then outputting a
corrective action that can adjust the process accordingly.[1][2][4]
Figure 2.1: A block diagram of a PID controller
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 23/24
8
The PID controller calculation (algorithm) involves three separate
parameters; the Proportional, the Integral and Derivative values. The
Proportional value determines the reaction to the current error, the Integral value
determines the reaction based on the sum of recent errors, and the Derivative
value determines the reaction based on the rate at which the error has been
changing. The weighted sum of these three actions is used to adjust the process
via a control; the motor speed
The PID control scheme is named after its three correcting terms, whose
sum constitutes the manipulated variable (MV). Hence:
(2.1)
where Pout, Iout, and Dout are the contributions to the output from the PID
controller from each of the three terms, as defined below.[3]
i. Proportional
The proportional term makes a change to the output that is
proportional to the current error value. The proportional response can
be adjusted by multiplying the error by a constant Kp, called the
proportional gain. The proportional term is given by:
Pout = Kp e(t) (2.2)
8/7/2019 EFFIZUL_SYAFRIN_BIN_ABU_BAKAR [EDocFind.com]
http://slidepdf.com/reader/full/effizulsyafrinbinabubakar-edocfindcom 24/24
Where
Pout: Proportional term of output
Kp: Proportional gain, a tuning parameter
e: Error = SP − PV
t: Time or instantaneous time (the present)
ii. Integration
The contribution from the integral term is proportional to both the
magnitude of the error and the duration of the error. Summing the
instantaneous error over time (integrating the error) gives the
accumulated offset that should have been corrected previously. The
accumulated error is then multiplied by the integral gain and added to
the controller output. The magnitude of the contribution of the
integral term to the overall control action is determined by the integral
gain, Ki. The integral term is given by:
Where
Iout: Integral term of output
Ki: Integral gain, a tuning parameter
e: Error = SP − PV
τ: Time in the past contributing to the integral response
Iout= Ki ∫ e(τ) dτ (2.3)