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

15

CHAPTER 2

AUTONOMOUS VEHICLE PROTOTYPE AND SYSTEM


MODELING

Chapter 1 discusses about ITS, AVCS, its advantages and need for
current study and objectives of the thesis. This chapter focuses the hardware
modules used in the prototype vehicles. The schematics and the interfacing
circuits of vision sensors, steering mechanism, drive mechanism, and
communication modules are discussed in this chapter. Overall system
modeling is discussed at the end of this chapter.

2.1 INTRODUCTION

Intelligent Transportation System provides an opportunity to apply


advanced technology to systems and methods of transport for efficient,
comfortable, and safer highways. The proposed work focuses on the area of
road transport, and more specifically, on field of intelligent vehicles. These
vehicles are equipped with the instrumentation and the intelligence necessary
to perform the required task. Since an autonomous vehicle must control some
or all of its functions without external intervention. There are many
challenges in conducting full-scale ITS research, particularly when vehicles
are involved. For example, modifying conventional vehicles to autonomous
vehicles is usually costly in terms of money and time. Testing in real traffic
environments is usually dangerous. Such challenges have posed significant
obstacles to many researchers in ITS and forced them to use pure computer
simulation, in which it is extremely hard to mimic certain aspects such as
16

communication, vehicle dynamics, and driving experience. For many ITS


research problems, a scale down platform may be very useful for preliminary
study and feasibility tests (Hung et al 2012). Therefore, the proposed work,
adopts an approach that strikes a balance between real size vehicles and pure
computer simulations. Small scale test bed vehicles with a scale down ratio of
1:17 are built which can create real traffic environments, vehicle
communication, and human driving experience. The test bed vehicle will be
easy to access, easy to duplicate, and cost effective while maintaining a
reasonable degree of fidelity to real world. The specifications and interfacing
circuit diagrams of different modules of the proposed small scale vehicles and
overall vehicle system model is discussed at the end of this chapter.

2.2 VEHICLE PROTOTYPE

The vehicle prototype should be complementing to facilitate


autonomous behavior of the vehicle. Hence for attaining fully autonomous
behavior, the prototype vehicle must have sensor arrangement for vision, steer
mechanism for lateral control and drive mechanism for longitudinal control,
communication modules for vehicle communication and control unit for
controlling the autonomous nature of the vehicle. Figure 2.1 shows different
modules used in the proposed prototype vehicle.

2.2.1 Vision System

The vehicle to achieve the autonomous behavior, demands


an efficient track sensing method. An appropriate track sensing arrangement
is required to obtain information from the track as well as from the
environment.
17

Vision System

Regulated
Power Supply H – Bridge
Driver

Control Drive
Battery Unit Feedback Motors

Regulated Steer
Power Motor
Supply

Figure 2.1 Block Diagram of Prototype Vehicle

The degree of autonomous nature depends on the amount of


information that can be extracted from the environment which in turn depends
on the sensor capabilities.

2.2.2 Steering Mechanism

An effective steering mechanism to direct the vehicle in desired


direction is needed. For an autonomous vehicle, the steer is completely
automated and the user has no or limited control over the steer of the vehicle.
Hence it requires a precision steer capability and increased reliability. In the
proposed prototype vehicle, servo motor based steering mechanism is used for
precise vehicle steering.
18

Figure 2.2 Prototype Vehicle-1 with 16-bit Microcontroller

2.2.3 Drive Mechanism

Vehicle inherently demands mobility. Hence an appropriate driving


mechanism is required. The use of electric propulsion has the added benefit
for vehicle control that the dynamics of the electric motor are much more
amenable to high performance control than the conventional internal
combustion engine. In the prototype vehicle, DC motors with appropriate gear
reduction arrangement is used for longitudinal drive mechanism.

2.2.4 Control Unit

Control unit is the central hub of all information. It is the


termination hub for data from all the sensors and the origin for the control
signals of the actuators. The microcontroller should satisfy all the
requirements for the autonomous vehicle control. Two different vehicle
prototypes; one with Freescale HCS12x (16-bit) microcontroller and other
with Freescale MPC5604 (32-bit) microcontroller is used and performance of
the proposed algorithms are tested in these two vehicles. Prototype vehicle-1
19

with 16-bit microcontroller and IR based sensing mechanism is shown in


Figure 2.2 and the prototype vehicle-2 with 32-bit microcontroller and linear
sensor array based sensing mechanism is shown in Figure 2.3.

Figure 2.3 Prototype Vehicle-2 with 32-bit Microcontroller

The dimensions of the vehicle, its maximum left and right turn
angle with turning radius and the PWM duty cycle values for extreme left,
right and center steer of the servo motors are given in Table 2.1.

Table 2.1 Specifications of Prototype Vehicle

Length 28.5cm Min. Right turn radius 34 cm


Width 16cm Min left turn radius 25 cm
Height 9cm Centre duty cycle 1500
Wheel circumference 16cm Extreme left duty cycle 1150
Max. Right turn angle 30o Extreme right duty cycle 1860
Max. Left turn angle 34o PWM duty per degree turn 9
20

2.3 TEST BED TRACKS AND ITS SPECIFICATIONS

Two test bed tracks are used for testing which is shown in
Figure 2.4 (a) and (b). Track-1 as shown in Figure 2.4(a) has 15m length with
black track of width 2.5 cm which has three curves of different radii (60cm,
66cm and 120cm). Track-2 as shown in Figure 2.4(b) has 28m length with
black track of width 2.5 cm with varying turn radius not less than 60cm.

(a) Track-1 (b) Track-2

Figure 2.4 Proposed Tracks

The prototype vehicle under test is kept in the starting point (black
intersecting point) and the vehicle is allowed to travel in different radii of
curves and finally it comes to the starting point. The time taken for the vehicle
to complete the lap is taken as the metric. The vehicle is tested with different
algorithms in the track and the performance of the sensing algorithms and
parameters like speed accuracy and tracking accuracy is measured and
analyzed to evaluate the performance of the sensing algorithms, lateral control
algorithms and longitudinal control algorithms in real time.

2.4 SENSING MECHANISM

Two different sensors are experimented in the prototype vehicles to


detect the lane in the test bed track. They are IR sensor array and linear sensor
21

array. Each sensor has its own advantages and disadvantages and their
effectiveness upon implementation are compared in the later sections. The
following section discusses the specifications, schematic diagrams and
sensing mechanism of these sensors.

2.4.1 IR Sensor Array based Sensing Mechanism

The sensing unit comprises of IR transceivers. IR LED and


photodiodes have an advantage of having good response time. But the use of
IR LEDs and photodiodes has its own limitations. The IR rays are easily
affected by ambient light as shown in Figure 2.5. But these limitations can be
overcome by suitable sensing algorithms which are proposed in this work. To
detect a line to be followed, photo-reflectors are most widely used. The output
current is proportional to reflection rate of the surface and is converted to
voltage and is used to determine the black line in the white background.

Figure 2.5 Effect of Ambient Light in IR Sensor Module


22

The IR transmitter and receiver are arranged in the prototype


vehicle as shown in Figure 2.6. Transmitter circuit consists of 4 numbers of
Infrared LEDs (D1-D4), which provide high radiant intensity, narrow
emission and short switching time. Receiver circuit consists of 8 numbers of
NPN phototransistors (Q1-Q8) which has good radiant sensitive area. These IR
transceivers are mounted in S12x microcontroller based prototype vehicle-1.

Figure 2.6 Arrangements of IR LEDs and Phototransistors

The IR transmitter circuitry is shown in Figure 2.7. Switching


transistor with operational amplifier acts as a constant current source for IR
LEDs. Infrared LEDs are driven by 9mA constant current source operational
amplifier. The IR LED (SFH4550) has its special features which makes it an
appropriate choice for its use in the sensing mechanism of the prototpe
vehicle.

+5V
+5V

+5V SFH4550
5K

TLC
SMBT3904
272
560

56

Figure 2.7 IR Transmitter Circuit Schematic


23

The major features includes high power infra-red emitter (850nm),


narrow emission angle ±3º, very high radiant intensity and short switching
time. The operational amplifier used in the circuitry is TLC272 and is
characterized by, wide range of supply voltages(3V-16V), single supply
operation and high input impedance (1012 ).

Figure 2.8 IR Receiver Circuit Schematic

The NPN transistors SMBT 3904 has many features that facilitate
its use in the sensing circuitry when operated in the switching mode. Silicon
NPN photo transistor SFH314 is suitable for applications from 460nm to
1080nm. Also it possesses high linearity. The circuit diagram of
phototransistor interfacing is shown in Figure 2.8. The phototransistors are
used in common emitter configuration and voltage across it is fed to analog
input channel of the microcontroller. Reflected IR rays from the white surface
induce a greater diminishing effect on the output voltage, in comparison to
that from the black surface. This voltage difference facilitates the algorithm to
predict the nature of the track. Analog signal from sensors are connected to
the on-chip analog channels of microcontroller. Data acquisition rate, from
the track, close to 500Hz to 1KHz is achieved using this scanning circuit.
24

Figure 2.9 Interfacing IR Sensor Array with Microcontroller

The analog output from the phototransistor has to be converted to


digital signals in order to be used for processing. The presence of on-chip
analog to digital converter in S12x microcontroller is exploited. The signals
from each phototransistor are sent in parallel to the on-chip ADC as shown in
Figure 2.9. IN0 to IN6 are the seven analog outputs taken out from the photo
transistor though connector J1 and given as an input to the microcontroller’s
analog inputs AN0 to AN6 through connector J6.

Analog to Digital conversion interrupt was used to obtain sensor


reading. A single conversion sequence of eight sensors is set with 8-bit
resolution. From the information from IR transceiver the position and
orientation of the vehicle in the track is computed by the controller.

2.4.2 Linear Sensor Array based Sensing Mechanism

The mechanism is the use of 128 1 Linear Sensor Array (LSA)


(TLS1401R-LF-B) as the sensing element to find its position and orientation
in the track with respect to the centre black line. The linear sensor array
consists of a 128 1 array of photodiodes, associated charge amplifier
25

circuitry, and an internal pixel data hold function that provides simultaneous
integration start and stop times for all pixels. The pixels measure 63.5 µm (H)
by 55.5 µm (W) with 63.5µm center-to-center spacing and 8µm spacing
between pixels. Operation is simplified by internal control logic that requires
only a serial-input (SI) signal and a clock. This sensor can be operated with
up to 8MHz clock frequency and with a power supply of 3 to 5 V. The linear
sensor array and its position in the vehicle is shown in Figure 2.10.

Figure 2.10 Linear Sensor Array and its Position in Prototype Vehicle-2

2.4.2.1 Functional Description of LSA

The functional block diagram of the linear sensor array is shown in


Figure 2.11. The sensor consists of 128 photodiodes arranged in a linear
array. Light energy impinging on a photodiode generates photocurrent, which
is integrated by the active integration circuitry associated with that pixel.
During the integration period, a sampling capacitor connects to the output of
the integrator through an analog switch.
26

Figure 2.11 Functional diagram of Linear Sensor Array

The amount of charge accumulated at each pixel is directly


proportional to the light intensity and the integration time. The output and
reset of the integrators is controlled by a 128-bit shift register and reset logic.
An output cycle is initiated by clocking in logic 1 on SI. For proper operation,
after meeting the minimum hold time condition, SI must go low before the
next rising edge of the clock. The timing diagram for the normal operation is
shown in Figure 2.12.

An internal signal, called hold, is generated from the rising edge of


SI and transmitted to analog switches in the pixel circuit. This causes all 128
sampling capacitors to be disconnected from their respective integrators and
starts an integrator reset period.
27

Figure 2.12 Timing Diagram of Linear Sensor Array

As the SI pulse is clocked through the shift register, the charge


stored on the sampling capacitors is sequentially connected to a charge-
coupled output amplifier that generates a voltage on analog output AO.
Simultaneously, during the first 18 clock cycles, all pixel integrators are reset,
and the next integration cycle begins on the 19th clock. On the 129th clock
rising edge, the SI pulse is clocked out of the shift register and the analog
output AO assumes a high impedance state. If a minimum integration time is
desired, the next SI pulse may be presented after a minimum delay of tqt
(pixel charge transfer time) after the 129th clock pulse. AO is an operational
amplifier type output that does not require an external pull down resistor. This
design allows a rail-to-rail output voltage swing. With VDD = 5 V, the output
is nominally 0 V for no light input, 2 V for normal white level, and 4.8 V for
saturation light level. When the device is not in the output phase, AO is in a
28

high-impedance state. The pin description of the linear sensor array is given
in Table 2.2.

Table 2.2 Pin Description of Linear Sensor Array

Terminal Pin
Description
Name Number
AO 3 Analog output.
Clock. The clock controls charge transfer, pixel
CLK 2
output.
Ground (substrate). All voltages are referenced
GND 6,7
to the substrate.
NC 5,8 No internal connection.
Serial input.SI defines the start of the data output
SI 1
sequence
Supply voltage. Supply for both analog and
VDD 4
digital circuits.

2.4.2.2 Integration Time Calculation

The integration time of the linear array is the period during which
light is sampled and charge accumulates on each pixel’s integrating capacitor.
The flexibility to adjust the integration period is a powerful and useful feature
of the TAOS TSL14xx linear array family. By changing the integration time,
a desired output voltage can be obtained on the output pin while avoiding
saturation for a wide range of light levels. The minimum time needed to
guarantee the sampling capacitor for pixel ‘n’ will charge to the voltage level
of the integrating capacitor is the charge transfer time of 20 µs. Therefore,
after n + 1 clocks, an extra 20 µs wait must occur before the next SI pulse to
start a new integration and output cycle. The minimum integration time for
any given array is determined by time required to clock out all the pixels in
29

the array and the time to discharge the pixels. The minimum integration time
can be calculated from the equation 2.1, Where, ‘n’ is the number of pixels.

1
T(int(min)) = ( ) × (n - 18)pixels + 20 s (2.1)
maximum clock frequency

2.4.2.3 Interfacing LSA with Microcontroller

The following pins of MPC 5604 board are connected to the sensor
board via amplifier. PCR 27 is pad configuration register 27 in 5604
microcontroller.

SI (serial input) : PORT B-11 (PCR 27)


CLK (clock) : PORT B-13 (PCR 29)
AO (analog output) : PORT B-4 (PCR 20)

The analog output signal from the sensor is then passed through a
TLC272 precision dual operational amplifier to facilitate a high degree of
precision. The amplifier board amplifies the sensor voltage by 2.1609 times.
The normal conversion mode has two types namely, one shot and scan mode.
It is operated in one shot mode with an ADC clock of 32 MHz. The
conversion time for a single analog value at this clock speed is 1.156 µs.

2.4.3 Obstacle Sensor and its Interfacing

The distance measurement sensor (Sharp GP2D120) has integrated


signal processing and analog voltage output. This sensor takes a continuous
distance reading and report the distance as an analog voltage with a distance
range of 4cm to 30cm. Its typical response time is 39ms and typical startup
delay is 44ms. The interface is a 3 wire with power, ground and the output
voltage. The interfacing arrangement is shown in Figure 2.13.
30

Figure 2.13 Prototype Vehicle-1 with IR Transceiver and Obstacle Sensor

2.4.4 Wireless Sensor Module

Wireless sensor module is an RF module (CC2500) which is plug


and play replacement for the wired serial port (UART). This wireless module
can work in 255 different channels and can address 255 devices individually.
It works at 2.4 GHz frequency.

Power UART
GN VCC GND Tx Rx
Power LED
PACKET
J2
J1 CONFIG-
URATION

Figure 2.14 Wireless Sensor Module


31

It has two modes of operation packet-mode and single byte transfer


mode. In packet mode the packet length can vary between 0 to 40 packets. It
has on-board EEPROM for saving parameter settings. The wireless sensor
module supports SCI communication and hence the ‘Tx’ and ‘Rx’ pins of
wireless sensor module are connected to ‘RIN’ and ‘TOUT’ pins of RS232
transceiver (ICL3221) for voltage conversion which is shown in Figures 2.14
and 2.15.

Figure 2.15 Wireless Sensor Module Interfacing Circuit

2.5 ACTUATING MECHANISM

There are two types of actuating mechanisms used in the proposed


vehicles. They are servo motor based lateral steer angle actuation and DC
motor based longitudinal speed actuation.

2.5.1 Servo Motor based Steer Angle Control Mechanism

A servo motor is an assembly of four parts, a normal DC motor, a


gear reduction unit, a position sensing device, and a control circuit. The
32

function of the servo is to receive a control signal that represents a desired


output position of the servo shaft, and apply power to its DC motor until its
shaft turns to that position. It uses the position sensing device to determine the
rotational position of the shaft, so as to know the direction in which the motor
must turn to move the shaft to the commanded position. The shaft typically
does not rotate in free like a DC motor, but rather can only turn around 180
degrees. The output of the servo motor is angular displacement. The servo has
a 3 wire connection: power, ground, and control. The power source must be
constantly applied; the servo has its own drive electronics that draw current
from the power lead to drive the motor. The important specifications of the
Futaba S3010 servo motor are shown below.

Speed

0.20 sec / 600 @ 4.8V

0.16 sec /600 @ 6.0V

Torque

0.5081Nm @ 4.8V (5.18Kg-cm)

0.6356Nm@ 6.0V (6.48Kg-cm)

Dimensions

1.57” x 0.79” x 1.50” (39.9mm x 20.1mm x 38.1mm)

Weight

0.041 Kg

The servo motor will move based on the pulses sent over the
control wire, which set the angle of the actuator arm. The servo expects a
pulse every 20ms in order to gain correct information about the angle. The
33

width of the servo pulse dictates the range of the servo’s angular motion. A
servo pulse of 1.5 ms width will set the servo to its neutral position or 900.
Pulse width less than 1.5ms will set position left to neutral or towards 00 and
pulse width more than 1.5ms will set position right to neutral or towards 1800.
Pulse width is determined by the control unit based on the information
obtained by the sensing mechanism.

2.5.2 DC Motors, Drive Mechanism and Speed Measurement System

The prototype vehicle uses the DC motor in driving module to


propel the vehicle. The DC motor provides the momentum required to move
the vehicle. All drive power necessary is supplied over the two wires. S12x
based prototype vehicles uses single DC geared motor and 5604 based
prototype vehicles uses two DC geared motors which forms a differential
drive mechanism. DC motor is driven by H-Bridge motor driver (Freescale
MC 33931VW). DC motor speed is varied according to the voltage difference
applied between its two terminals. The polarity of the applied voltage will
change the direction of rotation. The signal from the microcontroller controls
the H-bridge which in turn drives the motor. The H-bridge circuit is shown in
Figure 2.16.

Figure 2.16 DC Motor with H-Bridge Interfacing Circuit


34

PWM signal from the microcontroller is connected to IN1 and IN2


terminals of H-Bridge as shown in Figure 2.16. The DC motor is connected to
OUT1 and OUT2 terminals of H-Bridge. The signal ‘PWMR’ is the PWM
signal to the right motor from the microcontroller which is connected to the
42nd pin(IN2). The output of the H-Bridge is taken from OUTR1 (pins 7, 8, 9)
and OUTR2 (pins 36, 37, 38) to the two terminals of the DC motor. From
Figure 2.17 it is observed that the feedback is taken from the motor through
H-Bridge to measure the load current of the motor which in turn measures the
speed of the motor. The feedback is taken across PGND (pins 10,11,34 & 35)
and TAB(pin 45) as shown in Figure 2.17 and it is amplified and given to the
analog channel of microcontroller to convert into digital for speed
measurement.

Figure 2.17 H-Bridge and Feedback Circuit


35

2.5.2.1 Encoder based Speed Measurement System

In S12x based prototype vehicle, a mechanical encoder is used to


get feedback from the DC motor shaft. Through encoder, the current speed of
the motor is measured and vehicle speed can be calculated. The calculated
vehicle speed is compared with the reference speed of the vehicle and based
on the speed comparison results the speed of the vehicle can be altered by
altering the PWM to the DC motor. Thus encoder helps in speed
measurement. Encoder circuit consists of an opto-coupler with infrared
emitting diode facing a photo detector in a molded plastic housing. A slot in
the housing between the emitter and the detector provides a means of
interrupting the signal. The disc with 8-slots is mounted in the rear wheel
shaft and the disc is allowed to rotate along with the shaft. For a single
rotation, eight pulses were obtained from the encoder which is conditioned
using Schmitt trigger 74LV14 and given as an input to Enhanced Capture
Timer (ECT) of the microcontroller as shown in Figure 2.18. The speed of the
DC motor is monitored by reading the encoder periodically.

Figure 2.18 Encoder Interfacing Circuit


36

2.6 BATTERY

Proposed vehicles are Electric Ground Vehicle which is driven by


7.2V/2000mAh, Nickel Cadmium re-chargeable battery pack.

2.7 OVERALL SYSTEM MODEL

The steer of the vehicle is controlled by high precision servo motor.


By basic physics, the relation between the linear and angular velocity is given
as,

(2.2)
where ‘v’ is the linear velocity of the vehicle, ‘r’ is the radius and ‘ ’ is the
angular velocity.

From the values of the current velocity and the angular position of
the vehicle, the position of the vehicle at any point of the track can be
accurately given by the fundamental relationship between the parameters.
The relation between the linear and the angular velocity is shown in Figure
2.19. The horizontal and vertical components of the velocity can be
decomposed as shown in Figure 2.19(c).

(a) (b) (c)

Figure 2.19 (a) Angular Velocity (b) Linear Velocity (c) Velocity
Components
37

The horizontal and vertical component of velocity is related to their


corresponding displacements as given in equations 2.3 and 2.4.

= (2.3)

= (2.4)

Where ‘x’ and ‘y’ are the displacement in horizontal and vertical direction
respectively. The position of the vehicle is given in equations 2.5, 2.6
and 2.7.

= ( ) (2.5)

= ( ) () (2.6)

Similarly for y co-ordinate,

= ( ) () (2.7)

In differential form, it can be given in equations 2.8 and 2.9.

= ( ). ( ) (2.8)

= ( ). ( ) (2.9)

From equation 2.2, = , rewriting the equation,

= , and = ()= ( ) (2.10)


38

The vehicle model can be thus given as in equation 2.11.

cos cos 0
= sin [ ] = sin + 0 (2.11)
1 0 1

where denotes the linear velocity in x direction which depends on cosine


function, represents linear velocity in y direction which corresponds to sin
function and corresponds to angular velocity.

2.8 CONCLUSION

This chapter discusses the hardware modules used in the prototype


vehicles. Initially the mandatory hardware requirements for an autonomous
vehicle are discussed. Requirements includes sensor arrangements for vision,
steering mechanism for lateral control, drive mechanism for longitudinal
control, communication modules for vehicle communication and control unit
for controlling the entire operation of the autonomous vehicle. The
specifications of two prototype vehicles and test bed track are discussed.
Obstacle sensor and wireless sensor with its interfacing circuits are discussed.
The overall vehicle system model is discussed at the end of this chapter.
Track sensing algorithms for the proposed sensors is discussed in the
following chapter.

You might also like