Sei sulla pagina 1di 4

Udacity Self-Driving Car Enginer Nanodegree - PID Control Project

The purpose of this project is to build a Proportional-Integral-Derivative Controller for


maintaining the position of Car in a given path. The PID controller was implemented in class
using python, and now in this project the students are expected to construct PID controller in
C++ and simulate its efficiency to control the car by testing it in a simulator.
PID Controller:
The P stands for proportional component which gives a control action proportional to the error
between the expected output and the actual output. The error is termed as cross track error
(CTE). Integral part provides a control action which is proportional to the sum of all errors and
Derivative component act with a control action which is proportional to the rate of change of
error at any given moment.
PROJECT SPECIFICATION: Rubrics
Compilation of Code:
The code was compiled successfully.

PID procedure:
The procedure is followed correctly. Below steps can be seen in main.cpp:
Step-1: Initialize PID controller gains: Line-38
Step-2: Update the Error Term: Line-70
Step-3: Calculate the Controlled Value: Line-71

Effect each of the P, I, D:


The ‘P’ component has huge influence in the controlling of car steering. The steering output is
proportional to car’s CTE. But if we implement P controller alone the car steer output will keep
on oscillating and will never settle to a zero error.
The ‘D’ component helps the controller to settle the overshot or oscillations caused by the P
controller. But it will lead to inefficient transient behaviors. The PD controller is sufficient to
bring the car to a stable state. But with the help of PID controller we are able to achieve a more
efficient transient behavior.
The ‘I’ component helps the PD controller in reaching the center line by accumulating the error
term.
Final hyper-parameters:
The final hyper parameters are chosen based on the values discussed in the class. The values
discussed in the class was good enough and the car was able to successfully maneuver
throughout the track. Then some Manuel tuning was done for improving the performance. The
final selected values are as follows:
Kp = 0.2
Ki = 0.004
Kd = 4
Successful Completion:

With the implemented PID controller, the car successfully completed a lap in the track without
going of the track. Few of the screen shots are attached below:

Potrebbero piacerti anche