enhanced trailer backingup a trailer. for an autonomous vehicle with a trailer, backing with a...

86
ENHANCED TRAILER BACKING By AMIT DAVID JAYAKARAN A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORIDA 2004

Upload: others

Post on 05-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

ENHANCED TRAILER BACKING

By

AMIT DAVID JAYAKARAN

A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT

OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE

UNIVERSITY OF FLORIDA

2004

Page 2: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

Copyright 2004

by

Amit David Jayakaran

Page 3: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

This document is dedicated to my parents.

Page 4: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

iv

ACKNOWLEDGMENTS

I would like to express my gratitude to Dr. Carl Crane III, who as my advisor came

up with the idea for this thesis and who guided me for the past year and a half. I would

also like to thank Dr. David Dooner for his immense help in getting my work started and

putting me on the right track. I would also like to thank Dr. Robert Bicker who helped me

through the last part of my work. I would like to thank Dr. John Kenneth Schueller for

being on my committee.

I also owe a lot of gratitude towards Shannon Ridgeway and Dr. Carol Chesney

who helped me at various points during my work.

On a more personal note I would like to thank my parents and brother for their love

and support. I would also like to thank my friends at the University of Florida who have

directly and indirectly contributed to my work here.

Page 5: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

v

TABLE OF CONTENTS Page ACKNOWLEDGMENTS ................................................................................................. iv

LIST OF TABLES............................................................................................................ vii

LIST OF FIGURES ......................................................................................................... viii

ABSTRACT...................................................................................................................... xii

CHAPTERS

1 INTRODUCTION ............................................................................................................1

2 REVIEW OF LITERATURE ...........................................................................................4

Overview.......................................................................................................................4 Definitions ....................................................................................................................5

Jack Knifing...........................................................................................................5 Instant Center of Rotation .....................................................................................5 Radius of Turn.......................................................................................................6 Curvature of Path...................................................................................................6 Nonholonomic Constraints....................................................................................6 Small Time Controllable .......................................................................................7 Off-Hooking ..........................................................................................................7 Center of Rotation .................................................................................................8

3 APPROACH .....................................................................................................................9

Assumptions .................................................................................................................9 Approach.......................................................................................................................9 Stable Values of Theta................................................................................................13

Analytical Solution for the Polygon ....................................................................13 The Simulink Model............................................................................................18

Velocity Analysis........................................................................................................22 Stabilizing the Trailer .................................................................................................27

4 DESIGN DESCRIPTION...............................................................................................30

Mechanisms to Align Trailer ......................................................................................30

Page 6: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

vi

Method I ..............................................................................................................30 Method II .............................................................................................................31

Implementation ...........................................................................................................36 Simulink ..............................................................................................................36 Physical Model ....................................................................................................38

Data acquisition-Potentiometers ..................................................................38 The Servo .....................................................................................................42

The Prototype..............................................................................................................43 Rotary to Linear Conversion ...............................................................................43 Mounting of Potentiometers ................................................................................46

Trailer angle potentiometer ..........................................................................46 Steering angle potentiometer........................................................................46 x value feedback potentiometer....................................................................46

Approximation of Sine Using Taylor Series Expansion.............................................47 Implementation ...........................................................................................................54

5 RESULTS AND CONCLUSIONS ................................................................................55

APPENDIX SOFTWARE MODEL OF THE TRAILER PROBLEM .............................62

LIST OF REFERENCES...................................................................................................72

BIOGRAPHICAL SKETCH .............................................................................................74

Page 7: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

vii

LIST OF TABLES

Table page 4-1: Sample Values for the Setup ......................................................................................36

4-2: High-torque Ball-bearing Servo Motor from GWS....................................................42

4-3: Taylor Substitution .....................................................................................................48

Page 8: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

viii

LIST OF FIGURES

Figure page 1-1: Jackknifing ...................................................................................................................1

2-1: Instant Center of Rotation ............................................................................................6

2-2: Center of rotation..........................................................................................................8

3-1: Combined Instant Center............................................................................................10

3-2: Combined Instant Center............................................................................................10

3-3: Simplified system and the solution polygon ..............................................................11

3-4: Solution 1 for the Angle θ ..........................................................................................12

3-5: Solution 2 for the Angle θ ..........................................................................................12

3-6: Calculation of the Distance of the Instant Center from the Center of the Rear Axle.14

3-7: Trailer and Vehicle Polygon......................................................................................15

3-8: Triangle to Help Simplify the Solution ......................................................................17

3-10: Reading Constants - I ...............................................................................................20

3-11: Reading Constants - II ..............................................................................................20

3-12: Calculation of the Instant Center - I .........................................................................20

3-13: Calculation of the Instant Center - II ........................................................................20

3-14 Solution for First Theta Value ...................................................................................21

3-15 Solution for Second Theta Value...............................................................................21

3-16: Plot of Turning Radius .............................................................................................22

3-17: The Setup for the Slider Analysis.............................................................................24

3-18: Closer Look at the Velocity Setup at the End of the Trailer ....................................25

Page 9: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

ix

3-19: Velocities at the Trailer ............................................................................................26

3-20: Slider Setup. .............................................................................................................29

4-1: Imparted Slider Motion ..............................................................................................31

4-2: Algorithm for Method I ..............................................................................................32

4-3: Algorithm for Method II.............................................................................................33

4-4: Graphs of Input Parameters. .......................................................................................34

4-5: Offset vs. Time ...........................................................................................................35

4-6: Trailer Angle vs. Time ...............................................................................................35

4-7: Path and Trailer Orientation .......................................................................................37

4-8: Traditional Resistor Setup ..........................................................................................38

4-9: Modified Resistor Setup .............................................................................................39

4-10: High-Torque Ball-Bearing Servo Motor from GWS................................................43

4-11: The Prototype Setup – I............................................................................................44

4-12: The Prototype Setup – II...........................................................................................44

4-13: The Working of the Slider........................................................................................45

4-14: Mounting of the Pulley on the Servo........................................................................45

4-15: Trailer Angle Potentiometer .....................................................................................47

4-16: Steering Angle Potentiometer...................................................................................49

4-17: 1st Order Series Truncation.......................................................................................50

4-18: 3rd Order Series Truncation ......................................................................................50

4-19: 5th Order Series Truncation ......................................................................................51

4-20: 7th Order Series Truncation ......................................................................................51

4-21: Error Plots for Sine Approximation .........................................................................52

4-22: 2nd Order Series Truncation......................................................................................52

4-23: 4th Order Series Truncation ......................................................................................53

Page 10: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

x

4-24: 6th Order Series Truncation ......................................................................................53

4-25: Error Plots for Cosine Approximation .....................................................................54

5-1: Steering Angle Acquired at Each Time Step..............................................................55

5-2: Slider Displacement, x, at Each Time Step ................................................................56

5-3: Relative Angle θ at Each Time Step ..........................................................................56

5-4: Value of y(cm) at Each Time Step .............................................................................57

5-5: At A and B..................................................................................................................58

5-6: At D ............................................................................................................................58

5-7: Between D and E ........................................................................................................58

5-8: At E.............................................................................................................................59

5-9: Between F and G ........................................................................................................59

5-10: Between G and H......................................................................................................60

5-11: At H and I .................................................................................................................60

5-12: At J, K and L ............................................................................................................60

A-1: Base Model ................................................................................................................62

A-2: Setting System Constants – Masked..........................................................................63

A-3: Setting System Constants – Under the Mask.............................................................63

A-4: Setting System Constants – Dialog Box....................................................................64

A-5: Vehicle Speed Input...................................................................................................64

A-6: Vehicle Speed Input Sent to Global From-Block......................................................65

A-7: Convert Vehicle Speed from a Ramp to a Smooth Curve.........................................65

A-8: Steering Input ............................................................................................................65

A-9: Steering Input Sent to Global From-Block................................................................66

A-10: Central Control of Model ........................................................................................66

A-11: A Delay Function to Make the Model Realistic ......................................................67

Page 11: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

xi

A-12: Current Theta Processing.........................................................................................67

A-13: Required Theta Processing ......................................................................................68

A-14: Calculation of New Required Theta – I...................................................................68

A-15: Calculation of New Required Theta – II .................................................................68

A-16: Calculation of i (Distance of the Instant Center from the Rear Wheel) ..................69

A-17: Calculation of a, the Turning Radius.......................................................................69

A-18: Calculation of Required Offset................................................................................69

A-19: Calculation of the Correction in Offset Required - I ...............................................70

A-20: Calculation of the Correction in the Offset Required – II .......................................70

A-21: Animation of Model ................................................................................................70

Page 12: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

xii

Abstract of Thesis Presented to the Graduate School

of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Master of Science

ENHANCED TRAILER BACKING

By

Amit David Jayakaran

May 2004

Chair: Carl D. Crane III Major Department: Mechanical and Aerospace Engineering

In many instances, an autonomous vehicle has a trailer attached to it. The trailer

readily follows the vehicle’s path of motion while it moves forward. However, when the

vehicle reverses, for example to correct its path or to get out of a tight corner, the trailer

has a tendency to jackknife.

This thesis deals with several approaches to solve this problem, none of which

requires any modification to the vehicle steering control itself. The approach dealt with

in detail involves actually moving the point that couples the trailer to the vehicle.

Depending on the instant center of rotation of the vehicle with respect to the ground,

changes are made in the position of the coupling point to modify the instant center of the

trailer with respect to ground in such a manner as to maintain stability during backing.

The results obtained are verified in both a computer simulation and a physical model. The

results were found to be excellent with the vehicle being able to back up with the trailer

through any distance at moderate speeds.

Page 13: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

1

CHAPTER 1 INTRODUCTION

When a vehicle backs up with a trailer attached the trailer never seems to follow the

path it is expected to. Drivers with a lot of driving experience can even be often confused

by an uncooperative trailer while backing. It takes a lot of experience to be able to back

up a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big

challenge as it places additional constraints on the system’s path of travel.

Jackknifing is defined as the condition when a trailer bends or folds up on the

vehicle pulling it, similar to a jackknife shown in Figure 1-1. As far as backing up with a

trailer most work done so far involves increasing the number of constraints on the vehicle

in order to prevent jackknifing which thereby reduces the probability of the vehicle

following a defined path closely. Basically most algorithms will end up causing the

vehicle to make extra or at least wider turns. This may in some cases be unacceptable.

Figure 1-1: Jackknifing

Page 14: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

2

The following thesis deals with different approaches to prevent jackknifing without

having to place any extra constraints on the vehicle. It aides the autonomous vehicle to

back up with a trailer as if it were not there at all. This basically means all that is needed

to do is to place the necessary sensors on any vehicle and it will be able to back up

without having to change anything on the vehicle. The design of this system enables it to

be transferred to a regular vehicle attached to a trailer, thus aiding a human in backing a

trailer.

Jackknifing is chiefly caused due to incorrect backing of a vehicle with a trailer.

Jackknifing can also be caused during forward motion when the vehicle brakes suddenly

and the trailer continues to move and since it can’t move forward it swings sideways and

jackknives. However this thesis will deal with jackknifing caused due to backing only.

Such a system is of particular interest for an autonomous vehicle. Many autonomous

vehicles carry their surveillance equipment in a trailer and so the path that the trailer

follows is very important. Besides this sometimes the vehicle may find itself in a tight

corner or some situation in which it may need to back up a particular distance, causing it

to jackknife.

The vehicle is nonholonomic because of its rolling constraints. The configuration

of the vehicle is given by two position coordinates and an angle and there are only two

inputs, linear and angular velocity. Thus the system has two degrees of freedom. For

every trailer that is added, the configuration of the vehicle depends on one more

constraint that is the angle between the trailer and what it is attached to.

Page 15: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

3

Thesis Organization

The following thesis is divided into five chapters.

The second chapter, Review of Literature, deals with the literature review and past

work done in this area.

The third chapter, Approach, involves a look at the different approaches that can be

used to solve the given problem. It lists the assumptions made during the entire analysis

and derives the equations required for the analysis and implementation of the model.

The fourth chapter, Design Description gives a description of the computer model

and then the physical model that was built based on chapter three.

The fifth chapter, Results and Conclusions, describes the results that are obtained

and also the future work that is possible in this area.

Page 16: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

4

CHAPTER 2 REVIEW OF LITERATURE

Overview

In the past much work has been done on stabilizing trailers during their forward

motion for different speeds, especially high speeds. For example Tesar and Matthew [1]

discuss a four bar mechanism that helps eliminate swaying at high speeds.

Most work in path planning of a vehicle with a trailer has been done by

introduction of additional constraints on the system [2-7]. A vehicle already has

nonholonomic constraints and the introduction of additional constraints further restricts

the path the vehicle is able to take. The work done on Hilare and its trailer [5] outlines

several equations for backing up with a trailer with and without off-hooking. These

approaches though successful, reduce the efficiency of path planning because of the

introduction of additional constraints.

The backing up of a vehicle trailer system can be compared to that of an inverted

pendulum. In an inverted pendulum the system is stable only in only one position [8-9].

In order to stabilize the inverted pendulum it is moved horizontally to ensure that that it

always remains vertical. With a trailer system too this is partly true. However the stable

point keeps changing depending on the wheel angle, because for different wheel angles

the trailer chooses another stable angle.

Page 17: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

5

To further facilitate the understanding of some of the terms used in this thesis some

terms are defined below.

Definitions

Jack Knifing

Jackknifing is defined as the condition when a trailer bends or folds up on the

vehicle pulling it, similar to a jackknife.

Instant Center of Rotation

Instant Center of Rotation is defined as the imaginary point about which the vehicle

appears to be turning with respect to ground. The instant center of rotation is at infinity

when the vehicle is moving straight. It is located at the center of the minimum turning

radius of the vehicle when the vehicle is making the sharpest possible turn it can make.

Ackerman steering is typically used in steered wheeled vehicles so that the instant

center is located at the point at which the perpendiculars from all the wheels meet. As

long as these lines meet at only one point the system is stable. Vehicle manufacturers

make sure these lines meet at the designated point when turning. Figure 1 shows the

instant center of rotation for a wheeled vehicle with Ackerman steering.

Page 18: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

6

Figure 2-1: Instant Center of Rotation

Radius of Turn

Radius of Turn is the distance between the instant center of rotation and the center

of the rear axle of a front wheel steered vehicle.

Curvature of Path

The inverse of the radius of turn is called the curvature. Only in the case that the

vehicle is a two wheel system is it possible for it to follow a curvature of infinity.

Nonholonomic Constraints

Nonholonomic constraints arise from the fact that the wheels of a four wheeled

vehicle can only roll or spin on the ground but allow for no slide sideways [2]. For

instance a vehicle has two controls – linear and angular velocities. However this vehicle

moves in a three dimensional configuration space. As a result, all paths on a

configuration space are not feasible. To add to this, when there is a trailer it further

reduces the possibilities. For example, if a vehicle has to back up straight it can do so

without a problem if there is no trailer. But when a trailer is attached it will have to steer

Page 19: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

7

gently right and left continuously in order to make sure the trailer doesn’t jackknife. This

becomes tougher when negotiating a turn as the vehicle has to now make a turn in the

opposite direction first to align the trailer in the direction the trailer has to go and then

only start negotiating the turn. This can be more clearly seen by observing a person

backing up with a trailer. This thesis outlines a method by which some constraints on the

system associated with the trailer may be eliminated [3]. Nonholonomic equations are

characterized by constraint equations involving the time derivatives of the system

configuration variables. These equations are non integrable; they typically arise when the

system has less control than the configuration variables. The rolling contact of the

wheels with the surface it moves on is what essentially gives rise to nonholonomic

motion [10-11]

Small Time Controllable

Small-time controllability means that the set of configurations reachable after any

given time always contains a neighborhood of the starting configuration. As a

consequence any collision free path can be approximated by a sequence of collision free

feasible configurations [5].

Off-Hooking

Off-hooking is when the trailer is hooked at a distance from the rear axle of the

vehicle.

Page 20: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

8

Center of Rotation

The center of rotation is defined as the point of rotation of the trailer with respect to

the vehicle. It is usually the point at which the trailer is attached to the vehicle.

Figure 2-2: Center of rotation

Page 21: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

9

CHAPTER 3 APPROACH

Assumptions

The following assumptions about the system are presented:

• It is assumed that the contact between the ground and each every wheel is pure rolling contact

• All the systems are planar.

Approach

When a trailer is attached to the system, there is one more factor that is now

contributing to the instant center of rotation. When this vehicle moves forward the trailer

follows the vehicle and will negotiate turns without any problems. As shown later the

trailer naturally tries to align itself with the instant center of rotation of the vehicle by

rotating about its center of rotation at the hinge. The trailer being aligned with the instant

center of rotation of the vehicle simply means that the line through the trailer axle passes

through the instant center of rotation of the vehicle. However, when backing up the

vehicle with the trailer, the system is as unstable as trying to balance an inverted broom

on one’s hand. There are only two positions at which the trailer will be stable and out of

these two positions, as shown later only one really is feasible. What makes this problem

worse is that this position of stability changes as the steering angle of the vehicle

Page 22: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

10

changes. Thus if it can be somehow ensured that the line through the wheel axle of the

trailer passes through the instant center of rotation of the vehicle, the system will be

stable. In other words, if the instant center of the trailer with respect to ground is always

coincident with the instant center of the vehicle with respect to ground, then the vehicle

and trailer can travel in reverse in a stable manner. This condition is shown in Figure 3-1

and 3-2.

Figure 3-1: Combined Instant Center

Figure 3-2: Combined Instant Center

Page 23: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

11

This thesis outlines alternative methods for coupling between the vehicle and the

trailer to ensure that the instant center of rotation is always the same for the vehicle as

well as the vehicle trailer system. It also describes in detail a generic system that can be

extended to any vehicle-trailer system in the market.

The trailer angle corresponding to different steering angles can be calculated by

many methods. Below are outlines of some of the methods that have been used in this

thesis to cross verify results.

The above system is simplified into a geometric system and is represented in

Figure 3-3. The values for ‘d’, the distance of the trailer hitch from the rear axle of the

vehicle, ‘l’, the distance from the trailer hitch to the trailer wheel axle, and ‘a’ the

distance between the instant center point and the center of the vehicle’s rear axle, are

assumed to be known.

Figure 3-3: Simplified system and the solution polygon

Page 24: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

12

It is found that there are two possible solutions for the angle θ, the angle between

the line along the trailer and the line along the vehicle’s rear axle, for this system. These

solutions are show in the Figures 3-4 and 3-5 below.

Figure 3-4: Solution 1 for the Angle θ

Figure 3-5: Solution 2 for the Angle θ

Obviously the first solution is the only one of interest because the second solution

would represent an existing case of jackknifing. The interesting point about the second

solution is that in this condition the trailer is apparently being pulled when the vehicle

travels in reverse. As a result it will naturally align itself to achieve the angle to coincide

with the instant center of rotation. A method to find the value for θ for a given value of

the steering angle φ (shown in Figure 3-6) that will keep the trailer stable while backing,

Page 25: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

13

i.e. the value of θ that will cause the line along the trailer axle pass through the instant

center of rotation of the vehicle, will be presented in the next section. After deriving the

stable position of the trailer different methods to keep the trailer stable at those positions

will be discussed.

Stable Values of θ

Analytical Solution for the Polygon

The analytical method involves converting the system into a polygon and finding

the various solutions that satisfy it. The polygon is shown in Figure 3-7. The aim is to

find a solution to the angle θ in relation to ‘a’, the distance of the instant center from the

center of the rear axle. The distance of the instant center is calculated from the wheel

angle (φ), the width of the vehicle (w ) and the distance between the rear and front axles

(L1).

The distance of the instant center ( i ) from the rear wheel is given by

1 tan2

i L π = × −Φ

(3.1)

Now the term of interest in is ‘a’, the distance between the center of the axle and

the instant center which is given by

2wa i= + (3.2)

Once this is determined, the parameters for the polygon are calculated. The terms

x, y, and z are defined as shown in Figure 3-7.

Page 26: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

14

Figure 3-6: Calculation of the Distance of the Instant Center from the Center of the Rear Axle

Figure 3-7 shows the trailer and the vehicle polygon. The distances x and y can be

written in terms of the trailer rotation angle θ as

cosdxθ

= (3.3)

tany d θ= (3.4)

From the outer triangle of Figure 3-7 which has sides of length z, a+y, and l+x it is

apparent that

cos2

l xa y

π θ + − = + . (3.5)

Page 27: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

15

Figure 3-7: Trailer and Vehicle Polygon

From equations (3.3), (3.4) and (3.5) the following expression can be written

( )( )

coscos

2 tan

dl

a dθπ θθ

+ − = +

(3.6)

This equation relates the trailer angle,θ , to the instant center distance, a . The left

side of (3.6) will equal sinθ . Making this substitution and multiplying both sides by

( tan )a d θ+ gives

sin cos ( tan )cosda d lθ θ θθ

+ = + (3.7)

Multiplying throughout by cosθ gives

sin cos ( tan ) cosa d l dθ θ θ θ+ = + (3.8)

Substituting sintancos

θθθ

= and regrouping gives

Page 28: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

16

2(sin cos ) (sin 1) cos 0a d lθ θ θ θ+ − − = (3.9)

Substituting 2 2(sin 1) cosθ θ− = − and dividing throughout by cosθ gives

sin cos 0a d lθ θ− − = (3.10)

Two values of θ will satisfy this equation for each given value of a . One of these

values will be physically realizable as shown in Figures 3-4 and 3-5.

There are two methods of solving this equation [12]. Rewriting the above equation

as

cos sin 0A B Dθ θ+ + = (3.11)

where

, ,A d B a D l= − = = −

Trigonometric Solution

This technique begins by dividing (3.11) by 2 2A B+ to yield

2 2 2 2 2 2

cos sin 0A B DA B A B A B

θ θ+ + =+ + +

(3.12)

Using the right-angled triangle shown in Figure 3-8 it is possible to substitute

2 2

sinBA B

γ=+

(3.13)

2 2

cosAA B

γ=+

(3.14)

Because the sine and cosine of γ are expressed in terms of all known quantities, a

unique value for the angle γ can be obtained. Substituting (3.13) and (3.14) into (3.12)

gives

Page 29: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

17

2 2

cos cos sin sin 0DA B

γ θ γ θ+ + =+

(3.15)

Figure 3-8: Triangle to Help Simplify the Solution

Using the trigonometric identity

cos( ) cos cos sin sinα β α β α β− = + (3.16)

Putting (3.16) into (3.15) and regrouping gives

2 2

cos( ) DA B

θ γ −− =

+ (3.17)

Thus there are two values for the quantity ( )θ γ− because the cosine yields two

values in the range 0 2θ π≤ ≤ . But sinceγ is unique two value of θ can now be

obtained.

Page 30: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

18

The Simulink Model

A Simulink model was built based on the results discussed above to plot the desired

values of the trailer angle with respect to the steering angle of the vehicle. This is a

component of the main program sued to make a computer model of the complete system

described in more detail in the Appendix.

Figure 3-10 illustrates the base model. It takes the vehicle constants namely,

vehicle width, distance of trailer hitch (off-hooking), length of trailer, and distance of rear

and front axles (wheel base) as the input. The steering angle is simulated with a ramp

that runs from 0 to 70 degrees. The system is symmetric and so the same conclusions can

be deduced from the -70 to 0 degree range. Figure 3-11 and Figure 3-12 are for reading

constants from the user and making them globally available. Figure 3-13 and 3-14

calculate constants that are required during the simulation. The results of these blocks are

fed into a Matlab function that outputs the θ values that are stable, i.e., the values of θ

that will cause the line through the trailer axle to pass through the vehicle’s instant center

point. The results are then plotted to view the response of the steering angle on trailer

position.

The various parameters were set as

• Distance between the front and rear axles = 1.5 m • Width of the vehicle = 1 m • Distance of hinge from the rear axle = 0.3 m • Length of the trailer = 1 m

The output is in the form of the two possible solutions of theta. The results were

viewed on a virtual scope and are shown in Figures 3-14 and 3-15. Besides this the

turning radius is also shown in Figure 3-16.

Page 31: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

19

Figu

re 3

-9: B

ase

Mod

el fo

r θ C

alcu

latio

n

Page 32: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

20

Figure 3-10: Reading Constants - I

Figure 3-11: Reading Constants - II

Figure 3-12: Calculation of the Instant Center - I

Figure 3-13: Calculation of the Instant Center - II

Page 33: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

21

0 10 20 30 40 50 60 700

10

20

30

40

50

60

70

80

90

Steering Angle (deg)

Trai

ler A

ngle

(deg

)

Figure 3-14 Solution for First Theta Value

0 10 20 30 40 50 60 70120

130

140

150

160

170

180

Steering Angle (deg)

Trai

ler A

ngle

(deg

)

Figure 3-15 Solution for Second Theta Value

Page 34: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

22

0 10 20 30 40 50 60 700

10

20

30

40

50

60

70

80

90

100

Steering Angle (deg)

Turn

ing

Rad

ius

(m)

Figure 3-16: Plot of Turning Radius

Velocity Analysis

So far all calculations are done not considering the vehicle motion at all. Thus in

order to verify these results a velocity analysis is performed. The velocity analysis will

result in a relation between the trailer angle, change in the trailer angle and the velocity of

the vehicle. Now in this relation the change in trailer angle is set to zero as this is what is

desired at steady state. If the relation is similar to those obtained earlier then the above

results are verified.

Let the vehicle be moving at a velocity of v and the average wheel turning angle be

φ . Both wheels are usually at almost the same angle and both contribute to the radius of

turn. In order to consider both their contributions the average is taken.

Page 35: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

23

The following information is assumed to be given:

• the wheel base of the vehicle is 1L • the amount of off-hooking is rl • The length of the trailer tl

The following notation is introduced:

• Orientation of the vehicle with the x axis τ • Angle between the vehicle and the trailer θ • Turning radius a

The setup is shown in Figure 3-17.

The angular velocity of the vehicle about its instant center of rotation is given by,

va

ω = (3.18)

Now,

1tan La

φ = (3.19)

Rewriting,

1

tanLaφ

= (3.20)

From (3.20) and (3.18)

1

tanvLφω = (3.21)

The omega is now translated to the center of the rear axle [13-18]. This leaves an

angular velocity of ω about the center of the rear axle and a velocity v as shown in Figure

3-18. Thus the linear velocity of the center point of the rear axle is a counter

clockwiseω and a velocity v in the direction of the front wheels.

Page 36: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

24

Figure 3-17: The Setup for the Slider Analysis

Now it is known that

G T G V V Tθ θ θ= + (3.22)

Differentiating (3.22)

G T G V V Tθ θ θ= + (3.23)

Page 37: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

25

Figure 3-18: Closer Look at the Velocity Setup at the End of the Trailer

It is required to find V Tθ ,

V T G V G Tθ θ θ= − (3.24)

It is known that

G Vθ ω= − (3.25)

The negative sign is put there becauseω is counter clockwise.

The velocity at the hinge has two components. One is from the velocityv of the

vehicle and the other caused due to the angular velocity, ω , of the vehicle. The

velocityv is at an angle ofτ to the x-axis. The velocity caused due to ω ( rl ω ) is

perpendicular to the off hooking.

Page 38: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

26

Figure 3-19: Velocities at the Trailer

The component of the velocity that causes the trailer to rotate about the center point

of its axle is

cos cos2rl v πω θ θ + −

. (3.26)

Thus the angular velocity of the trailer is

cos sinrG T

t t

l vl lωθ θ θ= + . (3.27)

Substituting (3.27) and (3.25) into (3.24) gives

cos sinrV T

t t

l vl lωθ ω θ θ= − − − . (3.28)

Page 39: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

27

This equation is the control equation. By finding values to push V Tθ to zero when

in steady state, the trailer can be made stable during backing.

The correct value of θ is obtained when 0V Tθ = . Thus (3.28) reduces to

cos sin 0r

t t

l vl lωω θ θ− − − = (3.29)

Dividing throughout by v and substituting equation (3.18) into (3.29) gives

1 1cos sin 0r

t t

la al l

θ θ− − − = (3.30)

cos sin 0t rl l aθ θ+ + = (3.31)

It is seen that this equation is equivalent to equation (3.48), thus verifying the

results. Another interesting fact is that the desired trailer angle is independent of the

vehicle speed when the system is at a stable condition. Thus most calculations for stable

conditions can be done without knowledge of the velocity of the vehicle.

Stabilizing the Trailer

Stabilizing the trailer involves trying to change θ to the desired angle. This boils

down to a control problem where orientation of the trailer is being controlled with just

one control parameter. There are several approaches of doing this.

One approach that is relatively simple to implement is to place a motor at the hinge

point and force the trailer to take the angle that is calculated from above. This approach is

of course feasible only in cases where the trailer weight is very low and where the vehicle

doesn’t steer unless it is in motion. There will be very high levels of slippage when the

Page 40: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

28

trailer is being forced to an angle but once it achieves the correct desired angle, there will

be little to no slippage.

Another approach involves placing a non linear gear train between the steering and

the trailer. This way whenever the vehicle is steering, the trailer gets appropriately

steered too. This is similar to the above approach except that the link is now mechanical

and not electrical. Besides the disadvantages stated above this approach also has the

added disadvantage of the increased steering force required.

Slider

In all the above approaches the trailer is pushed to a particular position which is

stable. Thus in these cases the ideal trailer angle is known. Another method would be to

slide the hinge of the trailer along the back of the vehicle to such an extent so as to rotate

the trailer to the desired trailer angle. This can be done by means of placing a slider on

the back of the trailer as seen in Figure 3-17. As the trailer angle changes the slider

moves to compensate it.

Now from reproducing equation (3.28)

cos sinrV T

t t

l vl lωθ ω θ θ= − − − (3.32)

From the above equation it is seen that the only term that will be affected when the

slider moves is the v term corresponding to the velocity of the vehicle at the hinge. v was

earlier calculated as

v rω= (3.33)

Now it will be given by

Page 41: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

29

( )v r x ω= + (3.34)

Figure 3-20: Slider Setup.

Thus using equation (3.34) in (3.32) the required results are obtained. However

usually for reasonable turning angles x will be very small compared to r and so it can be

ignored. So for all practical purposes the results obtained in equation (3.28) are

sufficient.

A method of implementation of this control system is discussed in Chapter 4.

Page 42: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

30

CHAPTER 4 DESIGN DESCRIPTION

Mechanisms to Align Trailer

The objective, as stated in the previous chapter is to obtain stable backing of the

vehicle and trailer by causing the angle θ to be at such a value that the line along the

trailer axle will pass through the instant center point of the vehicle during the backing

maneuver. Two approaches will be presented that force the trailer to remain properly

aligned as the vehicle is driven in reverse. A physical model to test the approaches is

then described. Results of tests with the physical model are presented in Chapter 5.

Equation (3.31) is being repeated here as (4.1) cos sin 0t rl l aθ θ+ + = (4.1)

Method I

The simplest most straight forward method of ensuring that the system is stable is

to always ensure that the trailer angle satisfies the above equation. In this case all that

needs to be done is to ensure that the Equation (4.1) is satisfied and if it not the slider is

moved such that it is. This is shown in Figure 4-1.

Page 43: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

31

Figure 4-1: Imparted Slider Motion

The algorithm is illustrated in Figure 4-2.

Method II

A new variable ‘y’ is introduced that corresponds to the position of the center of the

trailer axle, measured parallel to the slider. Ideally this point (y=0) would always be in

line with the line through the center of axles of the vehicle. Thus the slider is moved to a

position such that the trailer takes the angle just calculated. Now for some reason if the y

value changes to some other value x is moved in such a way to position the trailer relative

to the vehicle such that y equals zero again.

Page 44: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

32

This method uses jackknifing to its own benefit. When the value of y isn’t close to

zero, the slider moves to a position such that the trailer begins to jackknife in the opposite

direction and when y is at the desired value the slider moves back to its original position.

This is illustrated in Figure 4-3.

Figure 4-2: Algorithm for Method I

Besides this depending on the steering angle the initial value of x is calculated

knowing the value of θ corresponding to every steering angle. Due to the lower

processing power of the microprocessor the calculation of the desired trailer angles were

Page 45: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

33

done offline and some sample values are tabulated below. Interpolation is then used to

calculate intermediate values. From this the x values were obtained.

Figure 4-3: Algorithm for Method II

Page 46: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

34

0 50 100 150 200 250-50

-40

-30

-20

-10

0

10

20

30

40

50

Time (sec)

Ste

erin

g A

ngle

(deg

)

Figure A

0 50 100 150 200 2500

1

2

3

4

5

6

Time (sec)

Spe

ed (m

/s)

Figure B

Figure 4-4: Graphs of Input Parameters.

A) Steering Angle vs. Time B) Speed vs. Time

Page 47: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

35

0 50 100 150 200 250-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

Time (sec)

Offs

et (m

)

Figure 4-5: Offset vs. Time

0 50 100 150 200 250-50

-40

-30

-20

-10

0

10

20

30

Time (sec)

Trai

ler A

ngle

(deg

)

Figure 4-6: Trailer Angle vs. Time

Page 48: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

36

φ θ

-12 13.2649

-9 9.8876

-6 6.5631

-3 3.2730

0 0

3 -3.2730

6 -6.5631

9 -9.8876

12 -13.2649

Table 4-1: Sample Values for the Setup

Implementation

Simulink

The Simulink model involves recreating the system response of a vehicle-trailer

model with introduction of the slider at the hinge of the trailer. This system implements

the first algorithm described above. The second algorithm is implemented physically and

hence isn’t discussed here. The system takes the steering angle and the speed of the

vehicle as input. Speed is taken as an input because the system response will vary

depending on the speed of the vehicle because unlike the speed of the vehicle the slider

can only move within limitations. Thus a vehicle backing up at a very high speed may not

Page 49: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

37

be easy to control. It also takes the current offset and the trailer angle as an input. From

this it calculates the required offset and moves the slider to that position in order to

compensate any change in the steering angle or change in trailer angle caused due to

maybe uneven terrain. It also has noise in the steering angle input which helps recreate a

more realistic model. The Simulink model is shown in the Appendix in more detail.

Below are the results of the simulation. The steering angle (Figure 4-4a) and the

vehicle speed (Figure 4-4b) are the inputs to the system and accordingly the offset

(Figure 4-5) is changed and thus the trailer’s angle (Figure 4-6). Figure 4-7 shows the

path that the vehicle follows and its orientation at various points on that curve.

Figure 4-7: Path and Trailer Orientation

Page 50: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

38

Physical Model

The physical model is built on a small remote controlled car. The vehicle features

digital steering which allowed the steering angle of the car to be changed to any desired

angle. The car was modified to attach a trailer and a slider.

Figure 4-8: Traditional Resistor Setup

Data acquisition-Potentiometers

The potentiometers used were of the rotary type with outputs at the two ends and

one on the wiper. The range of the potentiometer was approximately 180˚. This implied

that the potentiometer’s resistance between one of the end terminals and the wiper would

Page 51: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

39

change from almost zero to almost the resistance between the end terminals for a rotation

of about 180˚ and vice versa for the other end terminal.

From the above setup (Figure 4-8) it is seen that the voltage can be varied across

the resistor between 0 and 5 volts. However for the experimental setup a range of 45˚ to

135˚ is only required. Besides this in order to have a wider range of values it was also

required to have the voltage at 45˚ relative to ground to be 0 and the voltage at 135˚

relative to ground to be 2.5.

In order to do this two unknown resistances 1R and 2R are added in series as shown

in Figure 4-9.

Figure 4-9: Modified Resistor Setup

1 2total potR R R R= + + (4.2)

Page 52: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

40

( )1 180

poth l

a ltotal

aRR V V

V VR

+ −

= + (4.3)

( )1 180

poth l

b ltotal

bRR V V

V VR

+ −

= + (4.4)

From these equations 1R and 2R is calculated as below

( )

( )1 180a l l b pot

b a

V b aV bV V a RR

V V− − + +

= −−

(4.5)

( )

2

180 180180( )

h h a b b a pot

b a

aV bV V b V a V V RR

V V− + − + −

= −−

(4.6)

Now in for this case the requirements were

4.79

45135

4.765.0502.5

pot

l

h

a

b

R k

abV VV VV VV V

= Ω

= °= °= −===

(4.7)

Thus

1

2

3.2761.245

R kR k= Ω= Ω

(4.8)

Also in some cases the angle of the range may not be known but resistances at the

end points are known. In that case let aR and bR be the resistances

( )( )1 a h la l

total

R R V VV V

R+ −

= + (4.9)

Page 53: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

41

( )( )1 b h lb l

total

R R V VV V

R+ −

= + (4.10)

From these equations 1R and 2R are calculated as below

( )( )1

b a a l a b b l

b a

V R R V V R R VR

V V− + + −

= −−

(4.11)

( )

2 ( )a h b h b a b pot a b a pot

b a

R V R V V R V R V R V RR

V V− − + + −

= −−

(4.12)

Now in for this case the requirements were

4.84

2.0752.7064.76

5.0502.5

pot

a

b

l

h

a

b

R k

R kR kV VV VV VV V

= Ω

= Ω= Ω= −

===

(4.13)

Thus

1

2

0.8961.490

R kR k= − Ω= − Ω

(4.14)

Resistances can’t be less than zero and so the range of the potentiometer was

increased. aR was decrease and bR was increases by 500kΩ .

Thus

1.5753.206

a

b

R kR k

= Ω= Ω

(4.15)

This yielded

1

2

1.4710.029

R kR k= Ω= Ω

(4.16)

Page 54: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

42

The Servo

The servo is an actuation device that will rotate to any commanded position. The

servo used takes three inputs. Two are for power out of which one is the common ground

and the other is +5 volts. The third input is a PWM whose duty cycle controls the

position of the servo to any desired angle within its range. The duty cycle of the PWM

can be varied from between 10% to 20% with a time period of 20ms to get the servo to

rotate between the zero position and the 180 degree position.

Dimensions (mm)

1.56 x 0.79 x 1.56 in.

39.5 x 20.0 x 39.6 mm

Weight 46 Grams / 1.62 oz

Ball Bearings Yes, 2BB

Metal Gears No

Torque (4.8V) 69 oz.in.

Transit Time (4.8V)

0.21 sec./60°

Torque (6.0V) 86 oz.in.

Transit Time (6.0V)

0.17 sec./60°

Table 4-2: High-torque Ball-bearing Servo Motor from GWS

Page 55: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

43

The Prototype

Rotary to Linear Conversion

The rotary motion of the servo is converted to a linear motion by means of a pulley

– slider system. The setup is shown in Figure 4-11 and 4-12.

When the pulley rotates the slider moves changing the trailer angle as it does this.

In Figure 4-13 the slider is moved to the left forcing the trailer to change its angle.

Figure 4-13 shows the linking of the pulley with the slider along the back of the

vehicle. Figure 4-14 shows the mounting of the pulley on the servo attached to the body

of the vehicle.

Figure 4-10: High-Torque Ball-Bearing Servo Motor from GWS

Page 56: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

44

Figure 4-11: The Prototype Setup – I

Figure 4-12: The Prototype Setup – II

Page 57: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

45

Figure 4-13: The Working of the Slider

Figure 4-14: Mounting of the Pulley on the Servo

Page 58: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

46

Mounting of Potentiometers

Trailer angle potentiometer

The potentiometer to read the trailer angle is mounted inside a servo casing and

attached to the slider. This is seen in Figure 4-15.

Steering angle potentiometer

The potentiometer to read the steering angle is mounted below the hinge for one of

the front wheels of the car. Although this gives the reading for only one wheel and not the

average, it was found that this value was sufficient to get the prototype to work. The

mounting is shown in Figure 4-16.

x value feedback potentiometer

The servo though very accurate in getting to a position that is requested like any

mechanical system takes a while to get where it is commanded. However the servo used

did not have any feedback to let the microcontroller know what its current position was.

Thus a modification had to be made so that is would output its current position. This was

done by tapping the potentiometer built into the servo and calculating the voltage drop

across it.

Page 59: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

47

Figure 4-15: Trailer Angle Potentiometer

Of course the best way to get the value of X would be to actually introduce a linear

transducer on the slider. However, this wasn’t cost effective and would make the slider

very large and also be an additional load on the servo, decreasing its response time.

Reading the position off the servo gave the value of x within a reasonable level of

accuracy and so this value was converted and used.

Approximation of Sine Using Taylor Series Expansion

Given a function whose first n derivatives can be found, the Taylor polynomial

( )nP x of degree n for the function ( )f x is defined about the value c as [19]

( ) ( ) ( )( ) ( )( ) ( )( ) ( ) ( ) ( )2 3

... ...2! 3! !

nn

n

f c x c f c x c f c x cP x f c f c x c

n′′ ′′′− − −

′= + − + + + + (4.17)

where ( ) ( )nf c denotes the nth derivative of the function f evaluated at x c= .

Page 60: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

48

It is required to find the Taylor Series expansion for

( ) sinf x x= (4.18)

The derivatives of sin x are first found and then evaluated at 0c = (A Taylor Series

at 0c = is also known as a MacLaurin series)

n ( ) ( )nf x ( ) ( )nf c

0 sin x 0

1 cos x 1

2 sin x− 0

3 cos x− -1

4 sin x 0

5 cos x 1

6 sin x− 0

7 cos x− -1

8 sin x 0

9 cos x 1

10 sin x− 0

Table 4-3: Taylor Substitution

( ) ( )( ) ( )( ) ( )( ) ( ) ( ) ( )2 3

sin ... ...2! 3! !

nnf c x c f c x c f c x cx f c f c x c

n′′ ′′′− − −

′= + − + + + + (4.19)

( ) ( )( ) ( )( ) ( )( )2 3sin 0 0 cos 0 0sin sin 0 cos 0 0 ...

2! 3!x x

x x− − − −

= + − + + + (4.20)

3 5 7 9

sin ...3! 5! 7! 9!x x x xx x= − + − + (4.21)

Page 61: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

49

Similarly for ( ) cosf x x= (4.22)

2 4 6 8

cos 1 ...2! 4! 6! 8!x x x xx = − + − + + (4.23)

The assumption of ( )sin x x= for small values of x can be verified by truncating

the Taylor Series to just the first order term. The results are seen in the plot Figure 4-17.

Figure 4-16: Steering Angle Potentiometer

Since the processor used wasn’t very powerful a check was done to see how long

an approximation of the Taylor series was required to get sufficiently accurate values for

sine and cosine. Below are plots for truncated series of sine and cosine based on the order

of the assumption. Figure 4-17, 4-18, 4-19, and 4-20 show the sine value approximated in

red to the first order, third order, fifth order and seventh order respectively. The actual

sine plot is also there in blue to show a comparison. Figure 4-21 shows the error between

the actual value and the value obtained for all the series truncations. A strange feature is

Page 62: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

50

noticed with the 5th order approximation of sine which appears to be more accurate than

the 7th order approximation.

Figure 4-17: 1st Order Series Truncation - sin x x=

Figure 4-18: 3rd Order Series Truncation - 3

sin3!xx x= −

Page 63: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

51

Figure 4-19: 5th Order Series Truncation - 3 5

sin3! 5!x xx x= − +

Figure 4-20: 7th Order Series Truncation - 3 5 7

sin3! 5! 7!x x xx x= − + −

Page 64: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

52

Figure 4-21: Error Plots for Sine Approximation

It is seen from the above graphs that the 5th order sine gives sufficient accuracy in

the range of -90˚ to 90˚. Thus

3 5

sin3! 5!x xx x== − + (4.24)

Figure 4-22: 2nd Order Series Truncation - 2

cos 12!xx = −

Page 65: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

53

A similar analysis is done for the cosine plots in Figures 4-22 to 4-25.

Figure 4-23: 4th Order Series Truncation - 2 4

cos 12! 4!x xx = − +

Figure 4-24: 6th Order Series Truncation - 2 4 6

cos 12! 4! 6!x x xx = − + −

Page 66: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

54

Figure 4-25: Error Plots for Cosine Approximation

It is seen from the above graphs that the 6th order cosine gives sufficient accuracy

in the range of -90˚ to 90˚. Thus

2 4 6

cos 12! 4! 6!x x xx = − + − (4.25)

Implementation

The model was build and programmed as per the second algorithm described

above. The results of the tests run on the model are described in the next chapter.

Page 67: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

55

CHAPTER 5 RESULTS AND CONCLUSIONS

A control loop was written to change the position of the slider based on the second

method of implementation as described in the previous chapter.

To best illustrate the working of the algorithm the vehicle was backed up and the

data was acquired into a computer and plotted. The values read in were the current values

of steering angle, x (slider position) and trailer angle. Pictures were also taken at some

positions to illustrate the data. y is calculated for each point and plotted too. For ease of

understanding the time scale is divided in sections labeled A-L.

Figure 5-1: Steering Angle Acquired at Each Time Step

Page 68: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

56

Figure 5-2: Slider Displacement, x, at Each Time Step

Figure 5-3: Relative Angle θ at Each Time Step

Page 69: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

57

Figure 5-4: Value of y(cm) at Each Time Step

From Figure 5-1 it is seen that the steering angle remains practically stable at about

3˚. The change that occurred is due to the flexibility in the steering system. The vehicle is

considered to be stable when the value of y lies between -1.5 to 1.5 cm. The stable

condition is defined as the state at which the trailer is least likely to jackknife. For a

steering angle of 3 degrees the appropriate required trailer angle is about -3.3°.

Until time step C the vehicle isn’t moving. The trailer angle till this point remains

stable at about -8°.

As the vehicle backs up the trailer angle decreases to beyond -10°, thus increasing

the value of y to below -1.5 cm. Thus the slider changes the value of x to around -6cm

between C and D.

Page 70: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

58

Figure 5-5: At A and B

Figure 5-6: At D

Figure 5-7: Between D and E

Page 71: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

59

This changes θ to about 13° and as the vehicle backs up y begins to change until it

reaches a position that is within the tolerable limits. At this point, between D and E the

slider returns to its normal position.

Figure 5-8: At E

However the slider does not react very fast. As a result the θ value again goes out

of sync and begins to reduce. To compensate the slider now moves to +8.5cm between E

and F, remaining at that position till the value of y reaches within the allowable range.

Figure 5-9: Between F and G

Page 72: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

60

Figure 5-10: Between G and H

Figure 5-11: At H and I

Figure 5-12: At J, K and L

Page 73: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

61

The slider then moves back to the normal position and over a period of time the

trailer regains its correct θ at about G. Similar corrections occur until time step J and the

system thereafter remains stable.

Thus it is seen the system remains stable so that backing up doesn’t cause the trailer

to jackknife. The trailer is able to back up with reasonable efficiency at a reasonable

speed.

An added benefit discovered was that while the vehicle is moving forward and

negotiating a turn the slider can move outward causing the trailer to make a wider turn.

This means that the vehicle will not have to make wide turns when turning sharp. Thus

when a trailer is attached to the vehicle the vehicle can now drive forward also to an

extent without worrying about the trailer.

The mechanism discussed in this thesis is simple enough to implement on almost

any vehicle, be it autonomous or regular. The addition enables any driver without any

particular skills in trailer backing to be able to back a vehicle up through any path.

As far as future work goes, methods can be introduced to increase the efficiency of

the backing system so that the slider doesn’t have to travel as much as it currently does.

This would enable the trailer to move more efficiently and follow the vehicle’s path more

closely. Also, as on now the vehicle is the one that is being modified. Work can be done

such that the attachment is made on the trailer and so it can be used on any vehicle by the

simple attachment of a steering sensor.

Page 74: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

62

APPENDIX SOFTWARE MODEL OF THE TRAILER PROBLEM

The following is the software model of the vehicle-trailer system. The basic blocks

shown in Figure A-1 are the system process block which outputs to an animation block.

The system process block takes its input from the constants definition block and also a

predefined steering angle and velocity values described later. Theta is the angle of the

trailer, the offset is the distance of the slider from its central position and ‘a’ is the turning

radius of the vehicle.

Figure A-1: Base Model

Figure A-2, A-3 and A-4 are the constant setting blocks. The vehicle width,

distance of trailer hitch (off-hooking), length of trailer and distance of rear and front axels

(wheel base) can be set here so that they are accessible by the model at any time.

Page 75: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

63

Figure A-2: Setting System Constants – Masked

Figure A-3: Setting System Constants – Under the Mask

Page 76: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

64

Figure A-4: Setting System Constants – Dialog Box

Figures A-5, A-6 and A-7 show how the vehicle speed is read from a data file and

sent to the system. There is a delay block and a saturation block to make the system

response to velocity commands slower in response.

Figure A-5: Vehicle Speed Input

Page 77: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

65

Figure A-6: Vehicle Speed Input Sent to Global From-Block

Figure A-7: Convert Vehicle Speed from a Ramp to a Smooth Curve

Figures A-8 and A-9 show how the steering angle of the vehicle is read from a data

file and made available to the entire system.

Figure A-8: Steering Input

Page 78: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

66

Figure A-9: Steering Input Sent to Global From-Block

Figure A-10 is the central control and simulation of the model. The first part of the

system takes in various values as its input and the second part simulates its effect on a

real vehicle-trailer system. Figure A-11 shows a simple delay block that delays the

response of the slider so that it doesn’t move to the commanded position instantaneously.

This makes the simulation more realistic.

Figure A-10: Central Control of Model

Page 79: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

67

Figure A-11: A Delay Function to Make the Model Realistic

In a real system the value of Theta would be simply read off a sensor but in the

case of a software model this has to be simulated as shown in Figure A-12. Besides this

the required Theta to make the system stable is also required and this is calculated as

shown in Figures A-12, A-13, A-14 and A-15.

Figure A-12: Current Theta Processing

Page 80: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

68

Figure A-13: Required Theta Processing

Figure A-14: Calculation of New Required Theta – I

Figure A-15: Calculation of New Required Theta – II

For the system to run other values have to be calculated as illustrated in the figures

below. Figure A-16 shows how the distance of the instant center from the rear wheel is

calculated. Figure A-17 shows how the turning radius of the vehicle is calculated.

Page 81: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

69

Figure A-16: Calculation of i (Distance of the Instant Center from the Rear Wheel)

Figure A-17: Calculation of a, the Turning Radius

After the required Theta is calculated, the offset required to change the trailer angle

is calculated as shown in Figures A-18, A-19 and A-20.

Figure A-18: Calculation of Required Offset

Page 82: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

70

Figure A-19: Calculation of the Correction in Offset Required - I

Figure A-20: Calculation of the Correction in the Offset Required – II

Figure A-21: Animation of Model

Page 83: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

71

These values are fed back into the system and the whole cycle starts again for the

next time step.

Figure A-21 shows the values that are fed into the animation system for the model.

Figure A-22 helps output all values to graphs for debugging as well as for plotting

outputs.

Figure A-22: Debug Box for Troubleshooting and viewing outputs

Page 84: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

72

LIST OF REFERENCES

1. Tesar, D. and Matthew, G., “A New Coupling Hitch for Car-Trailer Combinations which Eliminates Swaying,” Society of Automotive Engineers SP-80/463, 1980.

2. P. Ferbach., “A Method of Progressive Constraints for Nonholonomic Motion Planning,” IEEE Transactions on Robotics and Automation, 14(1):172-179, 1998.

3. J.P. Laumond, F. Lamiraux and S. Sekhavat, “Guidelines in Nonholonomic Motion Planning in Robot Motion Planning and Control,” Lectures Notes in Control and Information Sciences, Springer Verlag, 343p, 1998.

4. Dean F. Hougen, John Fischer, Maria Gini, and James Slagle, “Fast Connectionist Learning for Trailer Backing Using a Real Robot,” In IEEE Int'l Conf. on Robotics and Automation, pp. 1917-1922, 1996.

5. F. Lamiraux, S. Sekhavat, and J.-P. Laumond, “Motion Planning and Control for Hilare Pulling a Trailer,” IEEE Trans. Robotics and Automation, 15(4):640-652, August 1999.

6. M. Vendittelli, G. Oriolo, and J.-P. Laumond, “Steering Nonholonomic Systems via Nilpotent Approximations: The General Two-Trailer System,” 1999 IEEE Int. Conf. on Robotics and Automation, pp. 823-829, 1999.

7. P. Svestka and J. Vleugels, “Exact Motion Planning for Tractor-Trailer Robots,” In Proc. IEEE Internat. Conf. on Robotics and Automation, pp. 2445-2450, Nagoya, Japan, 1995.

8. R. H. Kwong, “Mathematical Modeling of a Physical System: Inverted Pendulum,” Available from URL: http://www.control.utoronto.ca/people/profs/kwong/ece356/notes-ch1.ps. Accessed in 05/2003.

9. “CTM Example: Inverted Pendulum Modeling,” Available at URL: http://www.engin.umich.edu/group/ctm/examples/pend/invpen.html. Accessed in 05/2003.

10. P. Choudhury and K. M. Lynch, “Rolling Manipulation with a Single Control,” Conference on Control Applications, Mexico City, Mexico, September 2001.

Page 85: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

73

11. A. Marigo and A. Bicchi, “Rolling Bodies with Regular Surface: Controllability Theory and Applications,” Submitted to IEEE Trans. Robotics and Automation, 1998.

12. C. Crane, J. Duffy, Kinematic Analysis of Robot Manipulators, Cambridge University Press, May 1998.

13. Coutinho, Murilo G., Dynamic Simulations of Multibody Systems, New York: Springer, 2001.

14. Meriam, J. L. (James L.), Engineering Mechanics, New York: Wiley, 1978.

15. McGill, David J., Engineering Mechanics: an Introduction to Dynamics, 2nd ed., Boston, Mass.: PWS -Kent Pub. Co., 1989.

16. Prentis, James Martin., Engineering Mechanics, Oxford: Clarendon Press; New York: Oxford University Press, 1979.

17. Shabana, Ahmed A., Dynamics of Multibody Systems, New York: Wiley, 1989.

18. Hibbeler, R. C., Engineering Mechanics-Dynamics, 4th ed., New York: Macmillan Pub. Co.; London: Collier Macmillan Publishers, 1986.

19. J. A. Sellers, “Section 1. Why Taylor Series,” Available at URL: http://www.krellinst.org/UCES/archive/resources/taylor_series/node1.shtml, Accessed in 08/2003.

Page 86: ENHANCED TRAILER BACKINGup a trailer. For an autonomous vehicle with a trailer, backing with a trailer is a really big challenge as it places additional constraints on the system’s

74

BIOGRAPHICAL SKETCH

Amit David Jayakaran was born on May 1st, 1979, in India. He received this

Bachelor of Engineering in mechanical engineering from the College of Engineering,

Anna University, in India in April 2001.

He joined the University of Florida for his master’s in mechanical engineering. He

has been a research assistant working on enhanced trailer backing with the Mechanical

and Aerospace Engineering Department at the University of Florida. His research

interests include controls, robotics and industrial automation.