automatic parallel parking system report

34
ECE 1635H: Modern Control Theory in Special Topic Design Project: Automatic Parallel Parking System Submission Date: Dec 16, 2011

Upload: frances-ekenedilichukwu-awachie

Post on 21-Apr-2015

289 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Automatic Parallel Parking System Report

ECE 1635H: Modern Control Theory in Special Topic

Design Project: Automatic Parallel Parking System

Submission Date: Dec 16, 2011

Frances Awachie

Litao Lian

Nanxuan Wang

Page 2: Automatic Parallel Parking System Report

Table of Contents

1. Introduction…………………………………………………………..……pg. 03

2. Summary….…………………………………………………………..……pg. 03

3. Procedure…………………………………………………………..………pg. 03

4. Open-Loop Design……………………………………………………...…pg. 04

a. Relationship Between θ and d...………………………..………….. pg. 04

b. Future Improvements…………………………………………….... pg. 06

5. Virtual Sensors……………...…………………………………..…………pg. 07

a. Distance Sensor Algorithm……………………………..…………. pg. 10

b. Sensor Readings Results….…………………………………..….... pg. 13

c. Future Improvements…………………………………………….... pg. 15

6. Closed-Loop Design……………………………………………………….pg. 16

a. Parking Environment Parameters Collection…………..……….…. pg. 17

b. Closed-Loop Diagram…………………………………………....... pg. 19

c. Future Improvements…………………………………………….... pg. 21

7. Lessons Learned…...………………………………………….……..….…pg. 21

8. Conclusion…………………………………………………………..……..pg. 21

9. References…………………………………………………………..……..pg. 23

10.

Design Project: Automatic Parallel Parking System Page 2 of 23

Page 3: Automatic Parallel Parking System Report

Introduction

Parallel parking is an acquired skill many people struggle with. Poor parallel parking skills can result in accidents, frustration of the driver and users of the road, loss of time and loss in confidence. Sometimes, drivers ignore potential parking spots due to lack of confidence and skills or require a spotter to guide them into the parking space. Due to this, vehicles with the capacity to perform automated parallel parking have become more popular and prevalent in newer vehicles especially since it’s an added value to the consumer.

Summary

The purpose of this project was to design a sensor-based automatic parallel parking system in via a MATLAB simulation. The project chiefly consisted of three parts: open-loop control system, creation of virtual sensors, and close-loop control system. Open-loop system was designed through calculating the optimal control path, analyzing the relationship between θ (car body angle) and d (distance between moving car and static car) and investigating the actual path according to data readings from sensors. Furthermore, close-loop system was completed by adding a state feedback that helped reduce errors between actual car path and designed optimal path.

Procedure

1. In open-loop system design, optimal path was designed based on idea of using a sinusoidal path created by arc tangent of two identical circles.

2. The relationship between θ and d was acquired through trial and error.

3. Fours sensors were decided and designed to guide the car, while car body orientation was assumed to always be known.

4. Through comparing the optimal and actual control path, a feedback was calculated to complete the close-loop system.

Design Project: Automatic Parallel Parking System Page 3 of 23

Page 4: Automatic Parallel Parking System Report

Open-Loop Design

The main idea of designing optimal path was originally from the paper referenced at the end of report. The path was made of arc tangent of two identical circles. However, there could be more restricted for designing θ .

There were some assumptions made: first, Car 1,2 and 3 have same sizes(see figure 1); second, Car 3 is parallel with two static cars at the beginning; in addition, long and wide enough parking space available; also R=120 was the minimum radius of two identical circles; lastly, car body angle θ was assumed to be known.

Relationship Between θ and d

The relationship between θ and d was acquired by trials and errors, where car body angle was at center of arc tangent of the identical circles and d was side distance between car 1 and car 3 at ready to park state Through fixing the angles, trials and errors were performed to obtain the range of d. Table 1 illustrated the domains of d regarding to body angles chosen. In the range of distance between 0-19 units and above 62 units, there was no angle available; in other words, car was not able to park.

At the beginning of design, it was struggling to look for the relationship between θ and d since there were plenty of variables and parameters. Nevertheless, through making some fixed parameters and assumptions, it was much easier to acquire the relationship.

Table 1: Relationship between θ and d

θ(radius) d (units)π /4 20-40

π /3.55 41-57

π /3.47 57-61

Figure 1 demonstrates the initial position of car 3 at the ready to park state.

Design Project: Automatic Parallel Parking System Page 4 of 23

Page 5: Automatic Parallel Parking System Report

Figure 1: Ready to park state

Figure 2 showed that car 3 was at center position of the arc tangent.Figure 2: Center position

Future Improvement

Design Project: Automatic Parallel Parking System Page 5 of 23

Page 6: Automatic Parallel Parking System Report

For further design, the following improvement would be made:

1. Car 1, Car 2 and Car 3 will be in different sizes.

2. Car 3 might have certain angles with Car 2 at ready to park state

3. More sensors would be added on Car 3 so as to deal with particular cases(such as sensors on left-hand side of car to detect objects)

Virtual Sensors

Design Project: Automatic Parallel Parking System Page 6 of 23

Page 7: Automatic Parallel Parking System Report

SetupFigure 3 below shows the setup of the four ultrasonic distance sensors with sensors A and D fixed to the top middle and bottom middle of the car, respectively, while sensors C and D are fixed to the top and bottom right corner of the car respectively. The last item in the picture, theta, depicts the car body orientation which is determined by a gyroscope. In this case, 0 degrees is defined as when the car is facing north. Therefore theta is defined as the angle between the face of the car and the X axis.

Figure 3: Sensors

StrategySensors B and C read horizontal distances while sensors A and D read vertical. Note that sensor B has a limited range compared to the other sensors. This was done intentionally in order to distinguish between the readings of a car and curb. For this simulation, the distance sensors readings are used to detect distance between the car 3 and car 1, 2 or the curb. Due to the lack of real sensors, virtual sensors were created in order to simulate the distance/intersection results. A detailed depiction of this setup can be seen in figure 4: Detailed Sensor Diagram.

However, the strategy for determining the car body orientation was much simpler, since it was assumed that this was always known. This was useful since, although the output to the car is steering angle, a typical driver adjusts his/her car based on their desired resultant position or orientation of the car body. Due to this all desired movements of the car were based on the car body trajectory, then converted and output as steering angle.

Design Project: Automatic Parallel Parking System Page 7 of 23

Page 8: Automatic Parallel Parking System Report

Figure 4: Detailed Sensor Diagram

GeometrySince the horizontal sensors B and C are always parallel to the face of the car and the car body orientation is defined as the angle between the face of the car and the X axis, then the slope found for Sensors B and C would be the car body orientation. The geometry used for this and other calculations can be seen in the Figure 5: Sensor Geometry Diagram.

Note: Dx, Dy and dy, dx are different variables. The Endpoint of the sensor is based on dx and dy, while the intersection point found by the sensor is based on DX and DY. This distinction can be seen in Figure 5: Sensor Geometry Diagram and Figure 6: Sensor Scenarios and Algorithm

Design Project: Automatic Parallel Parking System Page 8 of 23

`

(Xc2f,Yc2o)(Xc2o,Yc2o)

(Xc2f,Yc2f)(Xc2o,Yc2f)

Vertice 1 (Xso,Yso)Vertice 2

Vertice 3Vertice 4

(Xsf,Ysf)

(Xso,Yso)

(Xsf,Ysf)

(Xsf,Ysf)

(Xsf,Ysf)

L

L

W

W

A B

CD

(Xc1f,Yc1o)(Xc1o,Yc1o)

(Xc1f,Yc1f)(Xc1o,Yc1f)

L

W

1

2

Curb

(Xcco,Ycco)

(Xcco,Yccf)

SL

SLb

SL

SL

Page 9: Automatic Parallel Parking System Report

Figure 5: Sensor Geometry Diagram

Sensor Readings NotationThe sensor readings are stored in the following format:SB = [I Ix Iy Dx Dy] SB - Sensor Reading, (A, B, C, D)I – Intersection Reading, (1, 0)

where: I = 1 – Intersection DetectedI = 0 – No Intersection Detected

Ix – Absolute, X coordinate location of the intersection pointIy – Absolute, Y coordinate location of the intersection pointDx – Horizontal distance from the starting point of the sensor to the intersection pointDy – Vertical distance from the starting point of the sensor to the intersection point

(Xso,Yso) – Coordinate of the starting point (origin) of the Sensor, i.e where the sensor is attached to the moving car.(Xsf,Ysf) – Coordinate of the end point (final) of the Sensor, i.e where the sensor beam stops due to its limit or range.

(Xco,Yco) – Coordinate of the Vertex of the bottom left corner of the parked car.(Xcf,Ycf) – Coordinate of the Vertex of the top right corner of the parked car.

SL – Sensor Limit (distance)SLb – Restricted Sensor Limit of sensor B (distance)

Design Project: Automatic Parallel Parking System Page 9 of 23

(Xso

,Yso

)

Vertic

e 1

(Xso

,Yso

)

Vertic

e 2

Vertic

e 3

Vertic

e 4

(Xsf,

Ysf)

(Xsf,

Ysf)

L

W

AB

CD

dx

dy SL

dx

dySLb

Horizontal Sensors:cos(theta) x SL = dysin(theta) x SL = dx

@ theta = 0: dy = SL, dx = 0

Vertical Sensors:cos(theta) x SL = dxsin(theta) x SL = dy

@ theta = 0: dx = SL, dy = 0

Theta - car body angle(Angle between the front of the car and the X axis)

Page 10: Automatic Parallel Parking System Report

Theta – Car body orientation/angle (degrees in diagrams)

When there is no intersection detected, then I= 0 and the display for Dx and Dy would be N/A.

Distance Sensors AlgorithmFor the creation of the virtual ultrasonic distance sensors, the most critical attribute to calculate was the intersection point. However, this needed to be done in relative terms and not absolute. In order to do this, various assumptions had to be made and steps and calculations performed. A pictorial depiction of this can be seen in Figure 6: Sensor Scenarios and Algorithm, where the green lines are the targets and represent possible intersection points.

Assumptions:1. Car moves in a sinusoidal like path in order to parallel park2. Car follows the right side of the road

a. Parked cars are to the rightb. Car parallel parks to the right

3. Car stops beside park Car 2a. Car is parallel to Parked Car 2b. Curb is Parallel to all three cars

4. Since car is only trying to park to the right, only sensors needed area. Sensor to the right of vehicle to determine distance to cars and curbb. Vertical sensors to determine vertical distance to parked Car 1 and Car 2

5. Car never attempts a full body rotation when parkinga. Car body angle range when parallel parking could between 0 and 70 degrees.b. Car rotates clockwise by a certain Angle and then rotates counterclockwise by

same Angle.6. Desired car trajectory is incremented or decreased by 1 degree at a time.

Steps:1. Determination of the Sensor slope and Endpoint

a. This is obtained from the car body angle2. Determination of Intersection with Vertical Side Target

a. Check if Target is in Vertical Rangeb. Calculation of Possible Intersection Pointc. Check if Possible Intersection Point is in Vertical Ranged. Determination if Intersection Detectede. Output of Vertical Sensor Target Reading

3. Determination of Intersection with Horizontal Side Targeta. Check if Target is in Horizontal Range

Design Project: Automatic Parallel Parking System Page 10 of 23

Page 11: Automatic Parallel Parking System Report

b. Calculation of Possible Intersection Pointc. Check if Possible Intersection Point is in Vertical Ranged. Determination if Intersection Detectede. Output of Horizontal Sensor Target Reading

4. Selection of Intersection Reading between Horizontal and Vertical Side Target Readings

a. Horizontal Sensors i.e. Sensors B and Ci. Select Vertical Sensor Target Reading over Horizontal

b. Vertical Sensors i.e. Sensors A and Di. Select Horizontal Sensor Target Reading over Vertical

5. Conduct all of the above for Targets Car 1, Car 2 and Curb6. Selection of Intersection Reading between Car 1, Car 2 and Curb Target Readings

a. Horizontal Sensors i.e. Sensors B and Ci. Select Car 1 or Car 2 Readings over Curb

b. Top Vertical Sensors i.e. Sensors A i. Select Car 2 Reading over Curb

c. Bottom Vertical Sensors i.e. Sensors D i. Select Car 1 Reading over Curb

7. Collection of Sensor Readings from Sensors A through Da. Perform all the above for Sensors A through Db. Vertical Sensors

i. Slight variation for the calculations of the sensor starting pointii. Slight variation for the calculations of the sensor endpoint

iii. Slight variation for the calculations of the intersection point8. Display of Sensors A through D results.

In addition to this, the actual sensor positions after each translation and rotation of the car had to also be calculated. This was based mainly on geometry and used the car body orientation intensively. The determination of the horizontal sensors and endpoint were fairly simply since the starting point of the sensors are fixed to the vertices of the moving car, which is updated after each translation or rotation. The vertical sensors, however, required more geometry since it was located on the top middle or bottom middle of the car. Since there were no vertices for these locations, the starting point of the vertical sensors had to be calculated through geometry and with the use of the car body orientation.

Design Project: Automatic Parallel Parking System Page 11 of 23

Page 12: Automatic Parallel Parking System Report

Figure 6: Sensor Scenarios and Algorithm

The vertical and horizontal green lines in the figure above are the targets and they represent the possible intersection points that can be found by the sensor.

Sensor Reading Results

Design Project: Automatic Parallel Parking System Page 12 of 23

(Xc2o,Yc2o)

(Xc2f,Yc2f)(Xc2o,Yc2f)

L2

`

Curb

(Xso,Yso)

(Xso,Yso)

C SL

(Xsf,Ysf)

(Xc1f,Yc1o)(Xc1o,Yc1o)

(Xc1f,Yc1f)(Xc1o,Yc1f)

L

W

1

(Xsf,Ysf)

SL

(Xcco,Ycco)

(Xcco,Yccf)

Check if Target is in Horizontal Range:if Xsf>=Xco

Checkx=1; Dx=(Xco-Xso);

Calculation of Possible Intersection Point:if Checkx==1

Dy=tan(theta)*Dx; Iy=Yso+Dy; Ix=Xco;

Check if Possible Intersection Point is in Vertical Range:if (Iy>=Yco && Iy<=Ycf) &&(Ix>=Xco &&Ix<=Xcf) Checky=1

Intersection Detected:if Checkx==1 && Checky==1

Dx=(Xco-Xso); Dy=tan(theta)*Dx; I=1; Ix=Xco; Iy=Yso+Dy;

No Intersection Detected:if Checkx==0 && Checky==0

I=0; Dx=0; Dy=0; I=0; Ix=0; Iy=0;

Horizontal or Vertical Side Target Reading Selection:SBH=[I Ix Iy Dx Dy];SBV=[I Ix Iy Dx Dy];

Car 1, Car 2 or Curb Reading Selection:SBc1=[I Ix Iy Dx Dy];SBc2=[I Ix Iy Dx Dy];SBcc=[I Ix Iy Dx Dy];

SB=[I Ix Iy Dx Dy];

Example for Vertical Side Target:

Possible Sensor Lines Scenarios:

D

Sensor Algorithm:

Determination of Sensor Slope and Endpoint

tan (theta)=m=Y sf−Y soX sf−X so

cos(theta)×SL=dx s

X sf=X so+ dx sY sf=Y so+ dys

sin( theta)×SL=dys

Page 13: Automatic Parallel Parking System Report

Figures 7 through 9 below show the results of several trial runs. The lines represent a sensor, in this case sensor B, that is attached the moving car. However, for testing purposes the car was neglected and the sensor lines were reproduced in various orientations/scenarios in order to confirm that algorithm worked. The blue car displayed in the picture is car 2, the top car. Each big dot is an intersection point found by the program for a particular sensor. Note that red and purple colored sensor lines in Figure 9 do not show an intersection point. This is because the sensor distance ‘limit’ is reached before this can occur.

For the horizontal sensors, i.e. B and C, it is possible for the sensors to obtain an intersection reading for Car1, Car 2 and the curb. This is especially true for Sensor C, due to its wider range reading. Therefore sensors B and C should always return the Car 1 or Car 2 intersection readings over that of the curb, since the curb is further away. Also because the Car 1 and Car 2 are assumed to be stationary, and the path to park in between the two is an S shape, the moving would not ever enter a situation where it is reading an intersection at both the Car 1 and Car 2.

However, for the vertical sensors, due to the way the car moves in the sinusoidal like path in order parallel Park, sensors A will only obtain intersection readings from the top car or the curb, while Sensors D will only obtain readings from the bottom car (Car 1) or the curb. Once again, both sensors will take the car intersection reading over that of the curb.

Figure 7: Sensor Results with Intersection Figure 8: Sensor Results without Intersection

Design Project: Automatic Parallel Parking System Page 13 of 23

Page 14: Automatic Parallel Parking System Report

Figure 9: Sensor Results with Various Scenarios

Future Improvements

Design Project: Automatic Parallel Parking System Page 14 of 23

Page 15: Automatic Parallel Parking System Report

If desired, the actual car body orientation can be calculated, instead of simply being known. In order for this to be done, the current and previous theta would have to be stored for comparison. In addition, the system would have to be able to distinguish between a car reading and a curb reading. This can be easily done by storing the Dx reading of the current and previous from Sensor C. Since the car is meant to have a trajectory movement of + or – 1 degree, the difference between the current Dx and previous should be small. However, if the difference is large, then this means that the sensor has jumped from a car reading to a curb reading or vice versa. Therefore determining whether the car is reading the curb or the car becomes quiet simple, as long as the initial Dx reading for the curb is stored and kept static, i.e. at the point right before the car starts the parallel parking. From this and the readings of the vertical sensors, the actual car body orientation can be calculated.

Design Project: Automatic Parallel Parking System Page 15 of 23

Page 16: Automatic Parallel Parking System Report

Closed-Loop Design

Introduction

In the closed-loop case, the car 3 was controlled by sensors. All control algorithms were based on sensors’ feedback from the parking environment. In addition, the collection avoidance would use the sensors feedbacks.

Setup

Four sensors were setup on the car to measure the distances between parked cars and curb as showing on Figure 3. On the

, it shows that sensor, SB had limitations on the distance measure. All the four sensors were used for different purposes as shown on

.

In a real car application, ultrasonic distance sensors were used to measure the distance and avoid object (Pohl, etc., 2006, Jiang, etc., 1999). Most of those sensors were limited to 4-6 meters, but had chosen the sensors which could measure 10 meters (Pohl, etc., 2006).

Our group had assumed that the car 3 would only park on the right side of the road. The sensors would be installed on the right side of the car bumper. In the real world application, there might be a case that the car would be parked on the left side of the road, so additional 2 sensors should be installed on the left side of the car body. The control algorithm would be the same.

Figure 30: Sensors setup on the car

Design Project: Automatic Parallel Parking System Page 16 of 23

Page 17: Automatic Parallel Parking System Report

Table 2: Sensors setup

Position Range FunctionSA Top centre of the car 50 unit Measure the distance from the

front parked carSB Top right corner of the car 35 unit Measure the distance between

the parked cars and curbSC Bottom right corner of the car 50 unit Only measure the distance

between the parked carsSD Bottom centre of the car 50 unit Measure the distance between

the behind parked car and curb

Parking environment parameters collection

Figure 11: Parking environment parameters collection

Design Project: Automatic Parallel Parking System Page 17 of 23

Page 18: Automatic Parallel Parking System Report

The car 3 in Figure 11 started at the stage 0, which was the initial state. All sensors had a reading of zero. As the car 3 moving forward, sensors SB and SC started to have readings. Due to the sensor range limitation, SB did not have a reading until it intersect with car 2. An intersection flag was setup for SB, the flag would be activated when there was an intersection. SB would become inactivate after car 3 passed car 2. At the same time a timer was activated and the time would be saved for future calculation to determine the parking lot length. The timer would be stopped when the SB flag become activated again.

SC would have a distance reading right after the initial state. Depends on the distance, a program would determine if the distance would be for the curb or for the car. An intersection flag was used here. The SC was also used to determine when the car 3 would be reached the ready to park state, which would be triggered by the second time flag state change from inactivate to active. There was no range limitation for the SC, so it could be used to determine the distance between the car 3 and curb.

Design Project: Automatic Parallel Parking System Page 18 of 23

Page 19: Automatic Parallel Parking System Report

SA and SB did not have readings from the stage 0 to stage 3, because there were not intersections when the car 3 moving forward. A summary of the sensors readings were listed in Table .

Table 3: Sensors readings

Stage 0 Stage 1 Stage 2 Stage 3

SA 0 0 0 0SA flag 0 0 0 0

SB 0 d d 0

SB flag 0 1 1 0SC 0 dcurb dcurb d

SC flag 0 1 1 1SD 0 0 0 0

SD flag 0 0 0 0

Car 3 was moving up in a constant speed. The SB would give a time between the car 1 and car 2, so parking lot length could be calculated. In addition, the distance between the car 3 and car 2 could be calculated based on SC reading from stage 2 and stage 3. In the paper of Jiang, etc, a similar process was used to scan the parking space (Jiang, etc., 1999).

According to Wang’s thesis paper, the relationship between the steering angle and car body angle was described in below (Wang, 2010). Similar functions could be found in Pohl’s paper (Pohl, etc., 2006).

θ̇= v sin φl

=θ i−θi−1

t s

The car 3 translation was guided by the following formula according to the Wang’s paper (Wang, 2010).

{X=X p+v sinθ tiY=Y p+v cosθ ti

The rotation formula of car 3 was use and listed in below.

rot=[ cosθ sin θ ; −sin θ cosθ ]

Vertices of the car 3 were calculated by using the following method. The car center coordinates were known. The initial vertices of the car were known too. The calculation of the offset should be performed. The next vertices of the car could be calculated by using the offset and rot function. The new state would be known and would be used as the initial state. By doing this, the car 3’s coordinates would be known at any time.

Design Project: Automatic Parallel Parking System Page 19 of 23

Page 20: Automatic Parallel Parking System Report

Parallel parking trajectory

The parallel parking trajectory was generated by the open loop control offline. In the closed loop, the car 3 should be just following the path if there were no errors between the real path and the trajectory path. In real world application, there would be errors generated from the sensors and steering wheel. In this project, prefect sensors would be assumed. However, the steering angle and car body angle would have some errors. This error should be corrected by the controller.

Dynamics in the parallel parking algorithm

The initial car start position was generated by using random function to simulate the real world case. It was very difficult for the driver to stop the car in a fixed spot before the parallel parking. The parallel parking algorithm should handle different start position. The algorithm should determine the car body angle needed for the car to park in the parking lot.

Closed loop block diagram

In the closed loop, the car body angle, θ, was one of the input to the parallel parking system, and it was known at all time. Another input to the system was the speed of the car. In the real world, when the car was parked, the speed was normally very slow, so a constant speed was assumed.

At the beginning, θA and θO were the same, and was equal to zero degrees. One degree increment would be applied to the θO, so the algorithm would calculate the vertices of the car 3 and the

centre of the car 3 should be. At the same time the actual car 3 centre would be calculated. In the simulation, a deadband of 0 to 5 degree was applied, i.e. when θo is increased by less than 5

degrees the car will not move. When θO reached the sixth degree, Car 3 would start to move. The sensors, SB and SC, would feedback the distance between the car 3 and car 2. Based on the

feedback, a car body angle θ would be calculated. The controller would compare the difference between the θA and θO, and then a θerror would be generated. Any θerror produced would be multiplied by a proportional gaining order to obtain the new desired θ. The desired θ would be generated

and then passed to the controller by using the formula stated in the

Figure 12: Parallel parking block diagram to convert the car body angle to steering angle. This steering angle is the output to the vehicle. The generated desired angle would then be stored for the next θ increment and comparison. The resultant θ, i.e. θA would be obtained and feed back into the system as an input, thereby closing the loop.

Figure 12: Parallel parking block diagram

Design Project: Automatic Parallel Parking System Page 20 of 23

Page 21: Automatic Parallel Parking System Report

Because this project has assumed that all the sensors would return accurate data, there was no error for the controller to correct. Even though the deadband was applied, but after the 5 degree range, it would be fine. In the real world applications, the sensors and the steering wheels would not always provide accurate data and which would therefore affect the command to the car.

Future improvement

A lot of assumptions were made before for the project. They had simplified the project, but a lot of assumptions did not truly represent the real world. In the future development, the parallel parking system should handle the following cases:

1. The cars were not parked perfectly parallel to the curb. 2. The car 3 also should not be required to be perfectly parallel to the car 2.

Design Project: Automatic Parallel Parking System Page 21 of 23

Page 22: Automatic Parallel Parking System Report

3. The parking lot size should be modeled to reflect a parking lot in the real world. 4. The sensors should not be perfect. There should be noises in the sensors measurement,

such as overshoot and delay.

Lessons learned

We had learned a lot of things by doing this project. The most valuable experience was to work with MATLAB to simulate a car parallel parking system. We struggle on understanding how we could only use MATLAB to do it. We had done a lot of work in the Hardware-In-the-Loop. In this project, there were a lot of geometry calculations which required a lot of time to complete.

Conclusion

The open-loop system was developed successfully and the theta to d relationship obtained through trial and error worked successfully for various horizontal starting points. A number of trials were performed in order to ensure the car could successfully parallel park in the space provided without hitting any of the static cars. The major time consuming components of this section were the required geometry calculations and the MATLAB programming.

The creation of virtual sensors was more complex than initially assumed. In order to obtain accurate results each time, various scenarios had to be tested and formulas adjusted to finally obtain the completed final sensor algorithm. It was due to this, the amount of geometry needed and also coding, that made this component very time intensive and as a result accounted for about 80% of the 2000 lines of code.

As for the closed-loop system, the majority of the time was spent on understanding the different elements of the system. Understanding how all the components of the system were interacted together and ensuring that the steering angle and car body orientation were kept as separate variables. Also, translating and rotating the car based on actual vehicle dynamics added a complexity to this section. Although, the system has a few minor issues with the closed loop, mainly due to the incorporation of the proportional gain, it overall performs well.

As was mentioned earlier, this project provided a great opportunity in learning how to program in MATLAB and has resulted in the members of the group having a deeper understanding of the MATLAB environment and ‘simulated’ Hardware-In-The-Loop.

Design Project: Automatic Parallel Parking System Page 22 of 23

Page 23: Automatic Parallel Parking System Report

References:

1. Robust automatic parallel parking in tight spaces via fuzzy logic Robotics and Autonomous Systems (May 2005), 51 (2-3), pg. 111-127  Y.   Zhao ; E.G.   Collins

2. Parking and the visual perception of space.Journal of Statistical Mechanics: Theory and Experiment (October 2009), 2009 (10), pg. 1-7 

3. A Navigation-Field-Based Semi-Autonomous Nonholonomic Vehicle-Parking Assistant IEEE Transactions on Vehicular Technology (March 2009), 58 (3), pg. 1106-1118 

4. Autonomous parallel parking of a car-like mobile robot by a neuro-fuzzy sensor-based controller Fuzzy Sets and Systems (October 2009), 160 (19), pg. 2876-2891

5. Demirli, K. and Khoshnejad, M.. Autonomous parallel parking of a car-like mobile robot by a neuro-fuzzy sensor-based controller Fuzzy Sets and Systems. October 2009. 160 (19), pg. 2876-2891. http:// www. sciencedirect .com/

6. Jiang, K., Zhang, D. Z. and Seneviratne, L. D. A parallel parking system for a car-like robot with sensor guidance. June 1999. Page 591-600. http://pid.sagepub.com

7. Liang, H.. Research of automatic parallel parking system. May 2010. http://www.docin.com/p-161114187.html

8. Oetiker, M. B., Baker, G. P. and Guzzella, L. A Navigation-Field-Based Semi-Autonomous Nonholonomic Vehicle-Parking Assistant IEEE Transactions on Vehicular Technology (March 2009), 58 (3), pg. 1106-1118 

9. Parking and the visual perception of space Journal of Statistical Mechanics: Theory and Experiment (October 2009), 2009 (10), pg. 1-7 

10. Pohl, J., Sethsson, M.; Degerman, P. and Larsson, J.. A semi-Automated parallel parking system for passenger cars. Jan 2006. Page 53-65. http://pid.sagepub.com/content/220/1/53

11. Zhao, Y. and Collins, E.G.. Robust automatic parallel parking in tight spaces via fuzzy logic Robotics and Autonomous Systems. May 2005, 51 (2-3), pg. 111-127 

Design Project: Automatic Parallel Parking System Page 23 of 23