Upload
duonghanh
View
228
Download
1
Embed Size (px)
Citation preview
000005986 1 Fuzzy logic controller for an autonornus parallel self- parking system using labview / Oon Kar Weng.
FUZZY LOGIC CONTROLLER FOR AN AUTONOMOUS
PARALLEL SELF-PARKING SYSTEM USING LABMEW
OON KAR WENG
MAY 2008
"I hereby declared that I have read through this report and found that it has comply the partial fulfillment for awarding the degree of Bachelor of Electrical Engineering
(Power Electronic and Drives)"
Signature
Supervisor's Name
Date :&
FUZZY LOGIC CONTROLLER FOR AN AUTONOMOUS PARALLEL SELF- PARKING SYSTEM USING LABVIEW
OON KAR WENG
This Report is Submitted In Partial Fulfillment Of Requirements For The Degree of Bachelor In Electrical Engineering (Power Electronics and Drives)
Fakulti Kejuruteraan Elektrik
Universiti Teknikal Kebangsaan Malaysia Melaka
MAY 2008
"I hereby declared that this report is a result of my own work except for the excerpts
that have been cited clearly in the references."
Signature
Name
Date
O N KAR WENG
')<- (1s. , o i 3 $
For my beloved Family
ACKNOWLEDGEMENT
Firstly, I would like to express my sincerest appreciation to Puan Aliza Che
Amran, my Final Year Project supervisor, for her guidance and advice throughout
my project. She is the ones who guided, inspired, assisted, encouraged, and most
importantly given of herself, her time, her knowledge and her energies to assists me
while doing my project.
Taking this opportunity, I would like to extend my utmost gratitude to all
friends and people who have given me support and confidence while doing this
project proposal. They have given me a lot of useful information to complete my
task.
Lastly, not forget to express a special appreciation to the Miss Teoh Wen Xin
that given me support and advised in the way of doing the project.
Thank you for your all useful advices to make my project a successful one.
ABSTRACT
This project is to design and develop a hardware and software of an
autonomous parallel self-parking system by using Fuzzy Logic controller. When a
parking place is found, it can perform parallel parking with minimum error. The
hardware is the car prototype, which built in with DC motor and servo motor to
control the movement of the vehicle. An external driver circuit is used to generate a
Pulse Width modulator Signal (PWM) to control the angle of the servomotor.
Ultrasonic sensor is used to measure distances between two cars so that the car
manages to park in line between two cars. The software used is LabVIEW 7.1 and an
additional, PID toolkit, to designs a Fuzzy Logic Controller that controls the car via
USB DAQ card. When a suitable park space is found, a signal will be triggered and
the controller will now control the car to be maneuvered safety into the parkiig space
with minimum error and less time. In the first and second chapters is discuss about
the previous work had be done about this project. Then methodology is described the
method that trying use in this project. The result is about the software and hardware
design, and also the setting for the overall system. Lastly discussion and conclusion
are discussed about the future review.
ABSTRAK
Projek ini adalah untuk mereka dan membentuk satu perkakasan dan perisian
untuk menletak kereta dengan sendiri dengan mengunakan pengawal Fuzzy Logic.
Apabila satu tempat letak kereta dijumpai kereta akan letak kereta dengan kesilapan
yang minimum. Dalam projek ini perkakasan adalah kereta prototaip yang
mempunyai motor DC dan motor Servo untuk mengawal pergerakan kereta prototaip
tersebut. Satu litar pemandu luar digunakan untuk menjanakan PWM dan mengawal
sudut motor Servo. Sensor ultrasonic digunakan untuk mengukur jarak di antara dua
kereta supaya kereta dapat diletak selari diantara dua kereta. Perisian yang digunakan
adalah LabView 7.1, dan perisian tambahan PID Toolkit, digunakan untuk mereka
pengawal Fuzzy Logic untuk mengawal kereta prototaip melalui National Instrument
USB DAQ card. Apabila satu tempat letak kereta yang sesuai dijumpai, pengawal
akan mengawal kereta prototaip letak kereta ke dalam ruang letak kereta dengan
selamat dan menjimatkan masa. Dalam bad satu dan bad dua membincang tentang
kerja yang terdahulu untuk projek ini. Seterusnya perkaedahan menbincangkan
kaedah yang rancang digunakan dalam projek ini. Keputusan adalah tentang
perkakasan dan perisian, dan juga cara yang digunakan dalam projek ini. Dalam bad
terakhir, perbincangan dan kesimpulan dibincang untuk kajian masa depan.
vii
CONTENT
Chapter Title Page
DECLARATION
DEDICATION
ACKNOWLEDGEMENT
ABSTRACT
CONTENT
LIST OF TABLES
LIST OF FIGURES
LIST OF ABBREVIATIONS
LIST OF APPENDIX
I INTRODUCTION
1 .l. Project objective
1.2. Scope of project
1.3. Problem statement
I1 LITERATURE REVIEW
2.1. Background of An Autonomous Parallel Self-parking
System
2.2. Current Technology
2.3. Literature Survey and Previous Research
I11 METHODOLOGY
3.1. Project Description
3.2. Fundamental of Project
3.3. Introduction of Fuzzy Logic
3.3.1. Structure of Fuzzy Logic Controller
3.3.1.1. Preprocessing
3.3.1.2. Fuzzification
3.3.1 -3. Rule base
3.3.1.4. Inference engine
v - vi
vii - ix
X
xi -xiii
Xiv
xv
Chapter Title
3.3.1.5. Dekification
3.3.1.5.1 Centre of Gravity (COG)
3.3.1.5.2 Centre of Gravity Method
for Singletons (COGS)
3.3.1.5.3 Mean or Maxima (MOM)
3.3.1.5.4 Leftmost maxima (LM),
and Rightmost Maxima
(RM) 3.3.1.6. Postprocessing
3.3.2. Why Using Fuzzy Logic?
3.3.2.1. Fuzzy Logic As an Alternative
Designing Methodology Which Is
Simpler and Faster
3.3.2.2. Fuzzy Logic Simplifies Design
Complexity
3.3.2.3. A Better Alternative Solution To Non-
Linear Control
3.3.2.4. Fuzzy Logic Reduces Hardware Costs
3.4. Fuzzy Logic Controller Design
3.5 Hardware
3.5.1. National Instrument USB 6009 DAQ card
3.5.2. Servo Motor Driver Circuit
3.5.2.1. Voltage Regulator Circuit
3.5.2.2. PWM Generation Circuit
3.5.3 Operation of MOSFET H-Bridge
3.5.4. Ultrasonic Sensor
3.5.4.1. Advantages of Ultrasonic Sensors
3.5.4.2. Ultrasonic Sensor Circuit
3.5.5 Servomotor
3.5.6 Dc motor
3.6. Software
3.6.1. Labview
Page
18
18
Chapter Title
3.6.2 Virtual Instruments (VI)
3.6.3 Front Panel
3.6.4 Block Diagram
3.6.5 Advantages of LabView
3.6.5.1 Graphical Programming Language
3.6.5.2 High-Level, Application-Specific
Development Tools and Libraries
3.6.6 Servomotor Controlling VI
IV RESULTS
4.1. Overview
4.2. Hardware Design
4.2.1 Servo Motor Driver Circuit Construction
4.2.2. Dc Motor H-Bridge Driver Circuit
4.2.3. Dc Motor Speed Controller
4.2.4 Ultrasonic Sensors Circuit Construction
4.3 Software Design
V DISCUSSION, SUGGESTION AND CONCLUSION
5.1. Discussion and Problem Analysis
5.2. Suggestion
5.3. Conclusion
REFERENCES
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
Page
40
41
41-42
42
42
LIST OF TABLES
Title
The 1 6F877 ultrasonic sensors testing data
Connection of the terminal of DAQ cards to the circuits
Dc voltage regulator component
PWM generation component
Measuring result of servomotor driver from car prototype
Measuring result of PWM generation circuit
Fuzzy set of the Fuzzy logic controller
Output Fuzzy set of the Fuzzy logic controller
Analog output Fuzzy set of the Fuzzy logic Controller
Page
9
47
48
48
49
49
57
5 8
59
LIST OF FIGURES
Title
Lexus LS 460L control panel in park assist mode
Page
4
Range of ultrasonic sensor 4
How the parking system works. Sensors measure space size,
and then the car backs into spot.
Configuration of the ultrasonic transducer units
Layout of the ultrasonic sensors
Flowchart of the parallel parking algorithm
ATRV-jr mobile robot
Photograph of the system
Flowchart of self-parking overflow
Project system overall
Block of Fuzzy Logic Controller
Conventional Design Methodology
Fuzzy Logic based Design Methodology
Look up table versus rules and membership function
Basic block diagram of the fuzzy logic controller
Hard ware arrangement
National Instrument USB 6009 DAQ card
Voltage regulator circuit
Simulation of the voltage regulator
Servomotor driver circuit
Simulation result of PWM signal for input 1V from NI USB
DAQ card
Simulation result of PWM signal for input 10V from NI USB 30
DAQ card
MOSFET H-bridge control circuit 3 1
Air Ultrasonic ceramic transducer 400SR160 32
Ultrasonic principle operation 32
Part of ultrasonic sensors 33
Ultrasonic sensor circuit 35
Servo motor 36
Title
Small servo mechanism
Output shaft angle with different PWM signal
Servo motor connecter
Dc motor
Operation of a DC motor
Front panel and block diagram in LabView
Servomotor controlling VI block diagram
Servomotor controlling VI front panel
Top view and side view of car prototype
Servo motor driver circuit
Dc converter measuring using LabView
Servo motor driver circuit output using OV voltage control
Servo motor driver circuit output using 5V voltage control
Dc motor H-Bridge circuit
Dc motor speed controller
Ultrasonic sensor circuits
Ultrasonic sensor circuits constructed in PCB board
Transmitter signal measure by NI 6009 DAQ card
Output signal measure by NI 6009 DAQ card
Front panel of fuzzy Logic controller
Fuzzy set editor
Output fuzzy set
Rule base Editor
Parallel self parking process flow
Block diagram in Labview
Case 0 for servomotor
Case 1 for servomotor
Case 2 for servomotor
Case 0 for dc motor
Case 1 for dc motor
Case 2 for dc motor
Dc motor speed control
Page
36
4.25 Initial state of the Fuzzy logic controller
4.26 Case 1 of the Fuzzy logic controller
4.27 Case 2 of the Fuzzy logic controller
4.28 Case 3 of the fbzzy logic controller
xiv
LIST OF ABBREVIATIONS
ADC - CMOS - DAC - DAQ - DC - DDR - FIR - GND - VO - IS0 - LabVIEW - LVDS -
NI - OEM - *-amp - OrcAD - PC - PC1 - PXI - PID - PWM - PV - RC - SP - TTL - USB - VI -
Analogue to Digital Converter
Complementary metal-oxid~semiconductor
Digital to Analogue Converter
Data Acquisition
Direct Current
Double Data Rate
Finite Impulse Response
Ground
Input and Output
Industry Standard(s) Architecture
Laboratory Virtual Instrument Engineering Workbench
Low-Voltage Differential Signaling
National Instruments
Original Equipment Manufacturer
Operational Amplifier
Oregon Computer Aided Design
Personal Computer
Peripheral Component Interconnect
PC1 Extensions for Instrumentation
Proportional Integral Derivative
Pulse Width Modulation
Process Variable
Radio-Controlled
Setpoint
Transistor-Transistor Logic
Universal Serial Bus
Virtual Instrumentation
LIST OF APPENDICES
APPENDIX TITLE
A NI USB 6009 Data Acquisition Deice specification
B Ultrasonic sensors specification
C HEF 4017B MSI 5-stage Johnson counter datasheet
D Ultrasonic Sensor Circuit
PAGE
CHAPTER I
INTRODUCTION
1.1 Project Objective
The objectives of this project are:
To generate control signals controlling signals to DC motor and servo
motor to navigate the car prototype from LabView via USB DAQ card.
To investigate and design the ultrasonic sensors ranging arrangement on
the car prototype.
To design and develop a Fuzzy Logic Controller using LabView to
perform parallel self-parking with minimum error.
1.2 Scope of Project
Design a Servo motor and DC motor controller.
Build a Virtual Instrumentation (VI) on LabView to control the DC motor
and Servomotor.
Build an ultrasonic sensor circuit and examine the ranging system.
Design a Fuzzy Logic Controller using LabView.
Construct of car prototype with the combination of hardware and
software.
1 3 Problem Statement
Nowadays parallel parking is an ordeal for many drivers, but with parking
space limited in big cities, squeezing your car into a tiny space is a vital skill and it
can lead to tmflic tie-ups. But fortunately, technology gave a solution to us -
autonomous parallel self-parking system. Imagine if you find a perfect parking spot
then simply press a button, sit back, and relax, the car can perform parallel parking
automatically.
Self-parking cars can also help to solve some of the M i c problem in dense
urban areas. When someone wants to parking the car in to a parallel parking space,
they often block a lane of trafic for a least a few seconds. If they have problems
getting into the spot, this can last for several minute and seriously disrupt traffic. So
self-parking technology would prevent many of these mishaps.
CHAPTER I1
LITERATURE REVIEW
2.1 Background of Autonomous Parallel Self-parking
Autonomous parallel self-parking system is an autonomous car maneuvering
from a traffic of lane into a parking space to perform parallel parking. The automatic
parking aims to enhance the comfort and safety of driving in constrained
environments where much attention and experience is required to steer the car. The
parking maneuver is achieved by means of coordinated control of the steering angle
and speed which takes into account the actual situation in the environment to ensure
collision-free motion within the available space.
2.2 Current Technology
On the Lexus LS, the Advanced Parking Guidance System uses computer
processors which are tied to the Lexus Intuitive Park Assist (sonar warning system)
feature, backup camera, and two additional forward sensors on the front side fenders.
The Intuitive Park Assist feature includes multiple sensors on the forward and rear
bumpers which detect obstacles, allowing the system to sound warnings and
calculate optimum steering angles during regular parking. These sensors plus the two
additional APGS sensors are tied to a central computer processor, which in turn is
integrated with the backup camera system to provide the driver parking information.
When the Intuitive Park Assist feature is used, the processor(s) calculate steering
angle data which are displayed on the navigation/camera touch screen along with
obstacle information. The Advanced Parking Guidance System expands on this
capability and is accessible when the vehicle is shifted to reverse (which
automatically activates the backup camera). When in reverse, the backup camera
screen features APGS buttons which can be used to activate automated parking
procedures. When the Advanced Parking Guidance System is activated, the central
processor calculates the optimum parallel or reverse park steering angles and then
interfaces with the Electric Power Steering systems of the vehicle to guide the car
into the parking spot. 111
Figure 2.1 : Lexus LS 460L control panel in park assist mode [I]
Figure 2.2 : Range of ultrasonic sensor [I]
Figure 2.3 : How the parking system works. Sensors measure space size, and then the
car backs into spot. [2]
In 1992, Volkswagen employed self-parking technology in its IRVW (Integrated
Research Volkswagen) Futura concept car. The IRVW parked with full autonomy - the driver could get out of the car and watch as it parked itself. A PC-sized computer
in the trunk controlled the system. Volkswagen estimated that this feature would've
added about $3,000 to the price of a car, and it was never offered on a production
model
In 2003, Toyota began offering a self-parking option, called Intelligent Parking
Assist, on its Japanese Prius hybrid. Three years later, British drivers had the option
of adding self-parking to the Prius for the equivalent of $700. So far, seventy percent
of British Prius buyers have chosen this feature. Toyota plans to introduce the self-
parking Prius to the United States in the near future, but no date has been set. [2]
23 Literature Survey and Previous Research
Nowadays by the help of improvements in computer technology, automatic
control of local vehicle maneuvers to obtain a self-parking action is no more a
fantasy. There are many researcher doing studies and develop a self parking strategy.
The studies about self-navigating cars and mobile robots is important because of the
similar control techniques that are used.
One of the studies about this project is perform in Tottori University of Japan
by Ohkita. In this study fuzzy control theory is used for controlling an autonomous
mobile robot with four wheels for parallel parking and fuzzy rules are derived by
modeling driving actions of the conventional car. Six ultrasonic transducers are used
for recognizing the position and attitude of the robot. A stepper motor is also
employed to control and move the sensors to keep the suitable angle to the wall for
preventing the occurrence of dead angles. The configuration of the supersonic
transducer units of this study is presented in Figure 2.4
#1 #2
Figure 2.4 : Configuration of the ultrasonic transducer units [3]
In the study of Ohkita, three microprocessors are used for calculations and peripheral
access. This kind of architecture seems bulky when combined with the number of the
sensors. But using so many sensors has an advantage of an increase in sampling rate
of the input data when compared to a positioned single sensor system. The fuzzy
reasoning of the system is composed of three fuzzy rule group searches with three,
five and seven rules respectively. The active rule group is 4 determined according to
the current state of the mobile robot. The performance of this system is satisfactory
except the behaviors of the system during the absence of the walls. To overcome this
problem, utilization of gyro-sensors and a CCD camera is recommended by the
authors. PI
Another study is the study of Fraichard and Gamier a motion control architecture for
a car-like vehicle intended to move in dynamic and partially known environments is
presented. The system is designed as a f izzy controller and it is implemented and
tested on a real computer-controlled car, equipped with sensors of limited precision
and reliability. A Motorola VME bus with an MVME 162 CPU board (68040
processor) is employed as the controller of the vehicle. Three servo-motors and a
three-phase controller are driven with this board. The steering wheel is controlled
with one of the servo-motors, the other two are used for the brakes. The three-phase
5 controller is used to drive the electric motor of the car for traction. The steering
angle is measured with an optical encoder and two optical encoders are also mounted
on the rear wheels to obtain the longitudinal velocity of the car and a motion
estimation. The system is equipped with a range measurement system of 14 Polaroid
9000 ultrasonic sensors whose layout is presented in Figure 2.5 PI
Vehicle t
Figure 2.5 : Layout of the ultrasonic sensors [4]