# A Real Time Algorithm for Versatile Mode Parking System and Its Implementation on FPGA Board
## 1 Introduction
The parking process was formulated as a constrained nonlinear optimization problem, where two objective functions were studied to provide practical uses in parking assistant systems. In paper [10], authors have also proposed an automatic perpendicular parking trajectory planning and following for vehicles, aiming to improve the performance relating to the vehicle's lateral path deviation. Authors in [11] suggested a vision-based parking assistance system for leaving perpendicular and angle parking lots to automatically warm the driver when backing out in perpendicular or angle lots, especially in cases where side parked cars block the driver's view of the potential traffic flow. The detection system was handled by a finite state machine, and the spatio-temporal motion descriptor was presented to robustly represent oncoming traffic or free traffic states. All researchers in [12; 13] also suggested various methods for semi-automatic parking systems. [PERSON] et al. [12], proposed a parking slot marking recognition method based on drivers input for parking-assist systems equipped with a touch screen. In paper [13], authors described a novel monocular-vision based target parking-slot recognition by recognizing parking slot markings when a driver designates a seed-point inside the target parking-slot with a touch screen. Others considered the assistance of learning vehicle reserve parking skills, stages of intelligent parking information systems for trucks, hierarchical driver aid for parallel parking using a fuzzy biometric approach and finally, an automatic guideline generation for a parking assistance system based on on-screen display [14; 15; 16; 17]. Over the past decades, substantial research has been developed in the field of automatic parallel parking highlighting path planning, which consists in the creation of a geometric path in some maneuvers and then the transformation into a continuous curvature path [18; 19]. Research has also revealed that plenty of tools and methods developed in the mobile robotics field have shown considerable potential for the automotive area. A rule-base control system responsible for driving assistance was developed in [20] with the aim of reaching a robust control capable of performing perfect automatic parallel parking relying on data provided by the front and rear laser sensors, which control the vehicle by generating acceleration and steering commands. In this paper, we proposed a technique for a generic parking system, which combines four parking modes, such as head-out angled parking, head-in angled parking, perpendicular parking and parallel parking. This system can explicitly recognize in advance which parking mode the vehicle has to carry out without any driver intervention. The proposed approach in this paper is different from that of many developed parking systems mentioned earlier. In fact, it involves a rather autonomous generic parking mode. Unlike the previous research that focused on choosing a parking lot starting from two parking modes (which are parallel and perpendicular), this research aims at developing a parking system that automatically chooses a parking lot starting from four parking modes. In fact, the car will recognize the status of the parked vehicles and launches the parking procedure relying on the same configuration. In our problem, a key feature is that the new generations of vehicles may park intelligently, without any driver intervention, just by relying on the existing parking situation as depicted in Figure 1.  
To validate the proposed AVPS, we have used an FPGA board and changed the implementation of sensors on the chassis of the mobile robot [21], as shown in Figure 2.  
The five infrared sensors (S1,5) collect environmental information to the FPGA-based board, which is responsible for processing the received data to determine the parking mode and controlling the motion and reaction of the stepper and DC motors. The remainder of this paper is organized as follows.