• No results found

Design And Simulation Of Adaptive Cruise Control Using Matlab/Simulink

N/A
N/A
Protected

Academic year: 2019

Share "Design And Simulation Of Adaptive Cruise Control Using Matlab/Simulink"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

i

DESIGN AND SIMULATION OF ADAPTIVE CRUISE CONTROL USING MATLAB/SIMULINK

MOHD FIRDAUS BIN JAHAR

This report is submitted in partial fulfillment of the requirements for the award of Bachelor of Electronic Engineering (Industrial Electronics) With Honours

Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka

(2)

ii

UNIVERS TI TEKNIKAL MALAYS IA MELAKA

FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOM PUTER

BORANG PENGESAHAN STATUS LAPORAN

PROJEK SARJANA MUDA II

Tajuk

Projek :

DESIGN A ND SIM ULATION OF ADA PTIVE CRUISE CONTROL USING MATLAB/SIMULINK

Sesi

Pengaji an : 2008/2009………

Saya _________________MOHD FIRDAUS BIN JAHAR_____________________________ (HURUF BESAR)

mengaku me mbenarkan Laporan Proje k Sa rjana Muda ini d isimpan di Perpustakaan dengan sy arat-syarat kegunaan seperti berikut:

1. Laporan adalah hakmilik Un iversiti Teknika l Ma laysia Melaka .

2. Perpustakaan dibenarkan me mbuat salinan untuk tujuan pengajian sahaja.

3. Perpustakaan dibenarkan me mbuat salinan laporan in i sebagai bahan pertukaran antara in stitusi pengajian tinggi.

4. Sila tandakan ( ) :

SULIT*

(M engandungi maklumat yang berdarjah keselamatan atau kepentingan M alaysia seperti yang termaktub di dalam AKTA RAHSIA RASM I 1972)

TERHAD* (M engandungi maklumat terhad yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD

Disahkan oleh:

__________________________ ___________________________________ (T ANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)

Alamat Tetap: KAMPUNG BARU JALAN PANJANG,

28030 TEMERLOH, PAHANG DARUL MAKMUR.

(3)

iii

―I hereby declare that this report is the result of my own work except for quotes as

cited in the references.‖

(4)

iv

―I hereby declare that I have this report and in my opinion this report is sufficient in

terms of the scope and quality for the award of Bachelor of Electronic Engineering (Industrial Electronics) With Honours. ‖

Signature : ………

Supervisor‘s Name : EN. ZULKARNAIN ZAINUDIN

(5)

v

(6)

vi

ACKNOWLEDGEMENT

First and foremost, I would like to take this opportunity to thank my project supervisor, Zulkarnain bin Zainudin for his invaluable guidance, assistance and support throughout the project. Under his supervision, many aspects regarding on this project has been explored, and with the knowledge, idea and support received from him, this thesis can be presented in the time given.

I also would like to thank all the lecturers at FKEKK for the lessons and guidance given. Not forget to all my friends and course mate for their help and ideas during the course of this study.

(7)

vii

ABSTRACT

(8)

viii

ABSTRAK

(9)

ix

TABLE OF CONTENTS

CHAPTER CONTENT PAGE

PROJECT TITLE i

VERIFICATION FORM ii DECLARATION iii VERIFICATION iv DEDICATION v ACKNOWLEDGEMENT vi

ABSTRACT vii

ABSTRAK viii

TABLE OF CONTENTS ix LIST OF TABLES xiii

LIST OF FIGURES xiv

LIST OF ABBREVIATIONS xvii

LIST OF APPENDICES xviii

I INTRODUCTION 1.1 Background of Project 1 1.2 Objectives of Project 4

(10)

x

II LITERATURE REVIEW

2.1 Signal Builder 8

2.2 ACC Controller 9

2.2.1 Stateflow chart 11

2.2.1.1 Stateflow Debugger 12 2.2.1.2 Stateflow Chart Model Coverage 13

2.2.1.3 Coverage Reports 14

2.2.2 PID Controller 16

2.2.2.1 Zero-Order Hold 17

2.2.2.2 Discrete-Time Integrator 17

2.2.2.3 IC 19

2.2.2.4 Unit Delay 20

2.2.2.5 Proportional 21

2.2.2.6 Integral 22

2.2.2.7 Derivative 23

2.3 Tuning a PID Controller 25

2.4 ACC vehicle dynamics 27

III METHODOLOGY

3.1 Modeling Process of ACC System 29

3.1.1 Defining the System 31

3.1.2 Identifying System Components 31

3.1.3 Modeling the System with Equations 32 3.1.4 Building the Simulink Block Diagram 32

3.1.5 Running the Simulation 32

(11)

xi

3.2 Design Requirements 33

3.2.1 Creating Test Cases 33

3.2.2 Constructing the Test Cases 33

3.2.2.1 Test Case 1 34

3.2.2.2 Test Case 2 35

3.2.2.3 Test Case 3 36

3.2.2.4 Test Case 4 37

3.2.2.5 Test Case 5 38

3.2.2.6 Requirements 5–9 39

3.2.2.7 Custom Signals 42

3.2.3 Command Line API 43

3.2.4 Running the Tests 44

IV SIMULATION RESULT AND DISCUSSION

4.1 Simulation Parameters 45

4.2 Simulation of the Transfer Function 46 4.3 Implementation of the PID Controller 47 4.4 Tuning Results of PID Controller 48

4.5 Simulation of ACC system 54

4.6 Analysis and Discussion of ACC Performances 59

V CONCLUSION AND SUGGESTION FOR FUTURE

DEVELOPMENT

5.1 Conclusion 62

(12)

xii

REFERENCE 64

APPENDIX A 66

APPENDIX B 67

(13)

xiii

LIST OF TABLES

NO. TITLE PAGE

2.1 Effects of each of controllers gain on a closed- loop system 26

2.2 Equation created by Ziegler Nichols 26

3.1 Functional Requirements 5–9 39

4.1 Values of constant and parameter used in the block diagram 46

4.2 Gain value by Ziegler Nichols for each controller 49

(14)

xiv

LIST OF FIGURES

NO. TITLE PAGE

2.1 Signal Builder block 9

2.2 Controller block 10

2.3 Graphical Components of a Stateflow 11

2.4 The Debugger main window 12

2.5 Summary for coverage report 15

2.6 PID Controllers 16

2.7 PID controller subsystem 16

2.8 Zero-Order Hold block 17

2.9 Discrete-Time Integrator 17

2.10 IC block 19

2.11 Unit Delay block 20

2.12 Proportional Gain 21

2.13 Integral Gain 22

2.14 Derivative Gain 23

2.15 Vehicle dynamics 27

2.16 Vehicle dynamics subsystem 27

(15)

xv

2.18 Hills setting values 28

3.1 Flowchart 30

3.2 Test Case 1 34

3.3 Requirement 1/Test Case 2 35

3.4 Requirement 2/Test Case 3 36

3.5 Requirement 4/Test Case 4 37

3.6 Test Case 5 38

3.7 Test Case 6 39

3.8 Test Case 7 40

3.9 Test Case 8 40

3.10 Test Case 9 41

3.11 Test Case 10 41

3.12 Accelerator pedal signal 42

4.1 Simulink block diagram for ACC 46

4.2 Open loop response for ACC 47

4.3 Simulink block diagram for CC with PID Controller 47

4.4 Open-loop poles from Root Locus 48

4.5 Open-loop value for gain and frequency 48

4.6 P Controller step response 50

4.7 PI Controller step response 50

4.8 PID Controller step response 51

4.9 PID Controller step response (after Tuning) 51

4.10 PID Controller step response (after Tuning) 52

4.11 Satisfied open- loop system 53

(16)

xvi

4.13 Simulation results for Test case 1 54

4.14 Simulation results for Test case 2 54

4.15 Simulation results for Test case 3 55

4.16 Simulation results for Test case 4 55

4.17 Simulation results for Test case 5 56

4.18 Simulation results for Test case 6 56

4.19 Simulation results for Test case 7 57

4.20 Simulation results for Test case 8 57

4.21 Simulation results for Test case 9 58

4.22 Simulation results for Test case 10 58

(17)

xvii

LIST OF ABBREVIATION

ACC - Adaptive Cruise Control

ADAS - Advanced Driver Assistance Systems CC - Cruise Control

D - Derivative

I - Integral

P - Proportional

PI - Proportional-Integral

(18)

xviii

LIST OF APPENDICES

NO. NAME PAGE

A ACC system in Simulink 66

B Controller Subsystem 67

(19)

1

CHAPTER I

INTRODUCTION

1.1 Background of Project

The cars of tomorrow [8] will be more and more equipped with Advanced Driver Assistance Systems (ADAS) to support the driver in the driving task. One of the ADAS is the Adaptive Cruise Control (ACC). Pauwelussen and Minderhoud in [8] noted that the ACC could be defined as an extension of the Cruise Control (CC) and maintains, next to a certain set speed, a certain set distance with respect to the lead vehicle.

The conventional CC only has control over the engine, which means that it cannot switch gears and it cannot break. This means that it is only used on roads where the velocity of the car is somewhat constant, for example on highways. The driver cannot relax too much though, since the CC does not care about vehicles in front. This is what the ACC is trying to solve.

(20)

2

because of comfort reasons and by law [8]. This means that the driver has to intervene if the system is not able to achieve the required needs [8]. Ideally, the driver only has to control the steering and only interrupt the ACC at takeovers or situations that might lead to accidents [9].

The ACC is mainly a comfort system that takes over the car-following task, but the driver remains responsible for steering and collision avoidance. If the deceleration of the ACC is not sufficient enough to avoid a collision, the ACC warns the driver with a warning sound [8]. This system is usually used on the highway, where it is common to cruise at a constant velocity for long periods of time, as a relief for the driver [9].

These system [11], use radar to measure the distance from the vehicle they are in to the car ahead and its speed relative to theirs. If a car crosses into the lane ahead, and the distance is now less than the preset minimum, the system applies the brakes, slowing the car with a maximum deceleration until it is following at the desired distance [11]. If the leading car speeds up or moves out of the lane, the system opens the throttle until the trailing car has returned to the cruise control speed set by the driver [11].

The advanced features of ACC systems include the ability to track a car in the lane ahead using forward looking radar. If the distance to a vehicle in front is below a pre-set value, the ACC system is designed to slow the car down, using brakes if required, to track the speed of the vehicle in front, then returning the car to its pre-set speed once the lane ahead is clear. Next, an intelligent lane prediction using steering angle and yaw rate sensors predict curves in the road, and to ensure that any vehicle ahead being tracked is in the same lane as the car itself.

(21)

3

in traffic, re-starting and following the car in front when the traffic begins to move again. Potential Key benefits of ACC are reduction in accident rate for vehicles fitted with collision avoidance type systems, reduction in driver fatigue and increase in fuel efficiency due to very gradual speed increase / decrease in traffic.

The controller developed for ACC consists of PID controller and Stateflow. The PID controller is a closed loop controller; designed to make the throttle decisions (control). The controller is created using parameters to allow easy modification (tuning) of the operation of the controller. This controller also included the Stateflow chart that is used to address design challenges that often occur when developing and implementing embedded software.

Matlab is the main software used for computation, model implementation, and simulation. The Matlab simulation tool Simulink, which is used for modeling and simulating dynamic systems, has been playing a major role during this work [12].

MATLAB/Simulink is a high- level technical computing language and object orientated environment for algorithm development, data visualization, data analysis, and numerical computation. MATLAB/Simulink allows the development of a solution to technical computing problems faster than with traditional programming languages, such as C, C++, and Fortran. The easy of development along with the extensive toolboxes and functions available were the major reasons for selecting MATLAB/Simulink as the simulation environment.

The simulation environment starts as an overview of the implementation of the PID controller to the CC model. Next, the second model about the ACC model incorporates the high- level system blocks representing, the signal input, vehicle dynamics, distance and velocity controller will be designed to get the performances of the proposed controller.

(22)

4

requirements, we need to build test cases that check the design against each requirement. The simulation environment is flexible and if someone is interested in testing out another ACC algorithm, the controller is a single function that can be replaced easily.

Simulink software models, simulates, and analyzes dynamic systems. It enables user to pose a question about a system, model the system, and see what happens. With Simulink, we can easily build models from scratch, or modify existing models to meet our needs. Simulink supports linear and nonlinear systems, modeled in continuous time, sampled time, or a hybrid of the two systems can also be multirate-having different parts that are sampled or updated at different rates.

1.2 Objectives of Project

The objectives of this project are:

i) To design the ACC system in MATLAB/Simulink.

ii) To evaluate the simulation of ACC system.

The main objective of this project is to design the ACC system in MATLAB/Simulink. This design process is the important part in this thesis. The PID controller is used to observe the characteristics of each controller gain.

(23)

5

1.3 Statement of Research Problem

A lot of drawbacks of the designed ACC system in the real life environment pursue the researcher make the analysis and of the system in various aspect before the system will implemented to the wide range of country. This is because of the difference in weather condition in the other country. Thus, in Asian country the most challenge drawback problem is the effectiveness of the ACC system in heavy rain.

In the rain periods, the degree of fog and rain also increased over time, and then decreased symmetrically; the sight distance similarly decreased from 1000 to 10m at 90s then gradually increased back to 1000m [10].

Rain degraded the ability of the radar to detect vehicles ahead, as it attenuated the sensor sensitivity, masking the sensors and causing them to fail temporarily. With no lead vehicle detected, vehicle speed will increase [10].

As the intensity of the rain increased, the sensors failed for longer periods and failed more frequently. The momentary failure of the sensors to detect vehicles ahead compromised the ability of the ACC to maintain at safely headway

In contrast, Malaysia‘s geographical system has various structured condition.

So the road system in Malaysia will give road resistance to the ACC system. Then, the road resistance will use to assume the disturbance to the ACC system.

(24)

6

1.4 Scope of Project

The scope of work for this project includes:

i) Designing and modeling the ACC system in based on previous model.

ii) Implementing the PID controller into the ACC system.

iii) PID Controller with derived transfer function.

iv) Auto tuning PID Controller which is used as a comparison in analyzing the performance of the controller in part (iii).

v) Simulation study conducted in MATLAB/Simulink on the vehicle speed, road resistance and set distance with respect to the lead vehicle.

1.5 Method of Project

The research work is undertaken in the following stages:

1) Design the ACC system based on the previous model.

2) Use PID controller with Stateflow.

3) Simulation of the proposed controller in MATLAB/Simulink.

4) Comparison of the performance of PID controller in CC system and ACC system.

References

Related documents

inferred that by varying certain parameters of the DC motor system, the output waveform of the simulation would change accordingly and the simulation and modelling

In this paper, the controller which is the combination of the current control with the PID controller model has been developed in the MATLAB-Simulink and will be tested in

The fuzzy logic controller is implemented using the Field Oriented Control technique as it provides better control of motor torque with high dynamic

The application is developed to compare the performance between the adaptive traffic light controller using fuzzy logic control Sugeno Method and traffic light

On the other hand, the proposed adaptive robust controller has some disadvantages, optimal tuning of parameters is difficult since many control parameters exist, and more

The fuzzy logic controller is implemented using the Field Oriented Control technique as it provides better control of motor torque with high dynamic

Self-tuning controllers (STC) are based on on-line identification and on tuning the controller parameters with respect to identified changes in controlled systems.. The self-tuning

This paper focuses mainly on the optimal design of a Differential Evolution (DE) based PID Controller for longitudinal Adaptive Cruise Control system that senses