# Around-View-Monitoring-Based Automatic Parking System Using Parking Line Detection
## 3 Proposed Method
### Motion Planning and Tracking
#### 3.2.1 Motion Planning  
Parking motion is divided according to the parking control method, regardless of the type of parking line [21; 23].  
In this study, the vehicle motion for automatic parking is divided into curved motions and straight motions [10]. Therefore, in the method proposed in this paper, when a parking path is generated, it is divided into curved sections and straight sections. If the path of the car is divided into straight sections and curved sections, the steering angle needs to be maintained at \(0^{\circ}\) in the straight section and a specific angle is adopted in the curved section to easily control the car. To find the steering angle on a curved path, \(\delta_{f}\) is calculated, as shown in Figure 9; here, \(\delta_{f}\) is the steering value and \(L\) is the wheelbase of the vehicle.  
Figure 8: Parking slot tracking example.  
The steering control value \(\delta_{f}\) can be obtained from  
\[\delta_{f}=\tan^{-1}\left(\frac{L}{r}\right), \tag{3}\]  
where \(r\) is the radius of the circle drawn by the curved path and can be obtained using  
\[r=\frac{A^{2}+B^{2}}{2A}. \tag{4}\]  
In the proposed method, the paths for perpendicular, angle, and parallel parking are created by separating them into straight and curved sections in different ways [10,21].  
First, for perpendicular parking, a parking path is created as shown in Figure 10. The vehicle follows a straight path and then arrives at the target point using a curved path. Then, after changing into reverse, the reverse curve is driven, and finally the parking finishes with reverse straight driving.  
Figure 10: Perpendicular parking trajectory.  
Figure 9: Vehicle parameters for calculating the angle in curved motion.  
The curved sections for this path appear twice. The calculation of the radius \(r\) of the two paths is shown in Figure 11 where \(A\), \(B\) are used and the steering control value is calculated from \(r\).  
Parallel parking uses the path shown in Figure 12, where, after going in a straight line and driving backwards in a curve, the vehicle curves in the opposite direction and then drives straight forward to complete the parking.  
As with perpendicular parking, there are two curved sections, and the radius \(r\) for the two paths is calculated as shown in Figure 13. If \(A\) and \(B\) are defined, the steering control value can be calculated from \(r\).  
Figure 11: Calculation of \(r\) in the perpendicular parking trajectory: (**a**) calculation of the first circular trajectory and (**b**) calculation of the second circular trajectory.  
Figure 12: Parallel parking trajectory.  
Angle parking uses the path shown in Figure 14, where the driver first drives forward in a straight line and then backward in a curve. Finally, the vehicle drives backwards in a straight line.  
In angle parking, one curved section appears, and the corresponding radius \(r\) can be obtained using \(A\) and \(B\), as shown in Figure 15.  
Figure 14: Angle parking trajectory.  
Figure 13: Calculation of \(r\) in the parallel parking trajectory: (**a**) calculation of the first circular trajectory and (**b**) calculation of the second circular trajectory.