Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Designing an autonomous Driver Controller

1 | Page
Project Report: 26/11/2021

5 Members:

D.D.J.Kumari R.M.P.Sathsarani L.H.P.M.Lansakara

D.L.D.H.Wijebandara A.N.Fernando

All of the members of this group project were also working on designing self-driving system:

● Created possible scenarios for implementing the self-driving system in 2-lane highways.

● Acknowledge related to the trajectory planning of self-diving systems.

● Design a state diagram, clearly explaining the next state and current state.

● Acknowledgement regarding the coding environment of Modalism Altera and VHDL programming.

● Identifying inputs, outputs & finite states for FSM functions.

● Evaluating & implementing the system by using RTL simulations.

2 | Page
Table of Contents

Introduction………………………………………………………..

Objectives………………………………………………………….

Methodology……………………………………………………….

Background

Scenarios

Basic Operations…………………………………………………..

State Diagram……………………………………………………..

Implementation…………………………………………………….

3 | Page
ACKNOWLEDGEMENT
We wish to express our profound and deep sense of gratitude to Praveen madam, school of
Engineering for sparing her valuable time to extend help in every step of our group work.

Introduction
The project report is intended to implement an autonomous self-driving car using high level
description language VHDL to implement the entire self-driving process. The design was
implemented by using state diagram, Transition table and the RTL simulations of the autonomous
driver controller system which is capable of driving on a two-lane highway. There are certain
scenarios that have been discussed in the project report.

Objectives

The objectives of the project are:


● Design an autonomous driver controller which is capable of driving in a two lane adapting
to all the situations.
● Implement scenarios occur in autonomous driving
● Develop and Implement Logic associated with special cases ● Design system and its
decision making process

Methodology
Background
Designing an Autonomous Driver Controller
Full automation
The vehicle is capable of performing all driving functions under all conditions. The driver may
have the option to control the vehicle. The autonomous vehicle is capable of communicating
including GPS position and speed is transmitted between the vehicles using vehicle to
infrastructure communication or vehicle to vehicle communication (V2V).

The automatic cruise control, which keeps velocity constant or the distance to the next vehicle
constant.
This system can reduce driver fatigue in traffic along stretches of highway.
The autonomous vehicle position relative to the road centerline and the distance to the other
vehicles. The vehicle can simply adjust the steering to stay in the middle of the lane and control
the speed to maintain the distance to the vehicle in front.

4 | Page
Scenarios

1. Lane following

❖ Keep the vehicle near center line for current lane

The autonomous car which is discussed in the report is manipulated in a manner that is capable

of Lane following scenario which means keeping the vehicle near the centerline of the current

lane.

2. Obey speed limits

❖ Maximum speeds of the system will be from VE to VB.

Maximum velocity of the vehicles will be V E > VC > VA > VB

Drive at target speed when feasible.

❖ Relative speed in emergency situations. In the system

normally vehicles keep their maximum velocity. But in

some situations vehicles have to change their speed to

keep safe.

● If a vehicle drives behind the next vehicle and its maximum velocity is also greater than

the front vehicle, the second vehicle has to adapt with the front vehicle.

● If a vehicle wants to overtake another vehicle it has to keep proper distance and adapt

with the second vehicle before changing lanes.

5 | Page
3. Overtaking
❖ Overtaking one vehicle

Preparing for Overtaking

● Maintain a minimum gap (5m) between two vehicles before overtaking.


● Consider if the oncoming vehicle is going to overtake.

● Then, lane changes right/ left. (Move left or right) same rules as keep lane. ● Car turns
range left- right (-30to 30) degrees ● No sharp turns at high speed.
● Active turning signals

❖ Overtaking two vehicles

4. Emergency fourth Vehicle adaption

● When the emergency vehicle wants to overtake, another vehicle’s overtaking requests

should be canceled.

● When the emergency fourth vehicle comes, other vehicles go to the edge of the road

keeping a small distance with the edge.

● In this case an emergency vehicle needs to get through, all the other cars keep to the

edge of the road so that the emergency vehicle may drive along the centerline.

6 | Page
Basic operations

The design circuit is implemented by using basic operations such as simple vending machine

operation, Mealy machine operation and combinational logic operations. The functions are

depending on mealy machine concept. Mealy machine is a finite-state machine whose output values

are determined both by its current state and the current inputs.

7 | Page
State Diagram

The autonomous driver controller/ self-driving automated vehicle which is capable of operating
was designed by using the above state diagram. In order to operate the self-driving, the
controlling system was designed by using VHDL in Modelsim altera.
After programming and compiling the VHDL code in modelsim; the below mentioned state
diagram was taken along the path; Tools -> Netlist viewers -> state Machine viewers

8 | Page
Implemented State diagram

Line keeping state

If there are no vehicles in pre-defined range, vehicles should keep their predefined
maximum velocity until any special scenario occurs.

Vehicle adaptive cruise mode

● This State contains basic dynamic controls of the vehicle


● Lane keeping - Keep the vehicle centered in the lane
● Speed control - Control the vehicle’s Speed relative to other vehicles.
● Maintain vehicle gap - Keep safe distance between the vehicles using GPS.
● This state contains important v2v communication data
● Calculate the relative position and velocity of the vehicle.
● Identify vehicles in front opposite lane - Calculate the position and velocity of the
oncoming vehicle to determine whether it is safe to overtake or not.

● If the above calculations determine that it is mathematically safe to overtake, then


emergency or other vehicles can take action.

9 | Page
Overtaking state
Calculate the velocity of the front vehicle and calculate needed velocity to overtake the vehicle,
then increase its speed to pass the vehicle until it has a safe distance behind.

RL state
● This state only occurs after overtaking status is completed.
● In this state, the vehicle increases its lateral velocity to steer into the Left lane. After it's
done this state changes to vehicle adjustment state.

LR state

● Calculate the distance between the front vehicle, whether the behind vehicle can
overtake or not.
● If the distance enough to overtake in this state take action to change its lateral velocity to
change the lane Left to right

Overtaking pause mode


In this state when the emergency vehicle starts overtaking another vehicle’s overtaking
processes will be canceled.

Autonomous lane change


A merging of two lanes is done using V2V communication between the vehicles to make
decisions and adapt the distance to each other. When performing the lane change, such as the
merging of two lanes performed autonomously, a lateral trajectory is needed. The generated
trajectory for the lane change should keep the parameters such as maximum lateral
acceleration and keeping the distance to the other vehicles.

10 | P a g e
Design Implementation

Transition Table

11 | P a g e
RTL Simulation

Line changing from left to right

Normal line keeping without special cases

12 | P a g e
Overtake pausing

Overtaking

13 | P a g e
References

[1] Zhang, Mengxuan & Li, Nan & Girard, Anouck & Kolmanovsky, Ilya. (2017). A Finite State
Machine Based Automated Driving Controller and its Stochastic Optimization.

[2] Benjamin Nordell, Trajectory Planning for Autonomous Vehicles and Cooperative Driving
(2016),
https://www.researchgate.net/profile/Mohamed_Mourad_Lafifi/post/Does_MPC_work_well_for_t
he_
trajectory_planning/attachment/5dbecb90cfe4a777d4ecdc32/AS%3A821134127796227%40157
2785
040485/download/Trajectory+Planning+for+Autonomous+Vehicles+and+Cooperative+Driving.p
df

[3] Implementing Finite State Machine Design in VHDL using ModelSim. (n.d.-b).
Https://Circuitdigest.Com/Microcontroller-Projects/Implementing-Finite-State-Mac hine-
Design-in-Vhdl-Using-Modelsim.
https://circuitdigest.com/microcontrollerprojects/implementing-finite-state-machine-design-in-
vhdl-using-modelsim

[4] Implementing Finite State Machine Design in VHDL using ModelSim. (n.d.). Circuit Digest.
https://circuitdigest.com/microcontroller-projects/implementing-finite-state-machine-design-
invhdl-using-modelsim

[5] Maya, [trie maya]. (2020, October 12). VHDL Example and RTL Simulation with Quartus
Prime Lite Edition 20.1 and ModelSim [Video]. YouTube.
https://www.youtube.com/watch?v=kRvMqKL1kOs

[6] FSM – vending machine in VHDL. (n.d.).


Https://Thunderwiring.Wordpress.Com/FsmVending-Machine-in-Vhdl/.
https://thunderwiring.wordpress.com/fsm-vending-machine-in-vhdl/

14 | P a g e

You might also like