## 4 Parking Space Size Constraint Model
### The Constraint
#### 4.2.1 Constraints on the Collision between the G Point and Road Boundary  
As can be seen from Figure 2, parking movement is an arc length trajectory circle with O1 on the rear axle extension line as the center and the minimum turning radius of the rear wheel R as the length. When the vehicle body complies with the rigid body hypothesis in the simplified Ackerman steering model, the front G point also moves in concentric circles with the rear axle O1 point as the center and the distance between O1 and the G point as the radius, as shown in Figure 3.  
According to the internal reference coordinate system of the car body, the dynamic coordinate value of G point changing with position can be derived:  
\[\left\{\begin{array}{l}x_{\rm G}={\rm u}_{0}-({\rm R-f})\sin\theta+\sqrt{( {\rm L-b})^{2}+({\rm e+f})^{2}}\cos[\theta+\arctan(\frac{{\rm e+f}}{{\rm L-b}} )]\\ y_{\rm G}={\rm v}_{0}-({\rm R-f})(1-\cos\theta)+\sqrt{({\rm L-b})^{2}+({\rm e+f })^{2}}\sin[\theta+\arctan(\frac{{\rm e+f}}{{\rm L-b}})]\end{array}\right. \tag{5}\]  
Figure 3: Schematic diagram of the collision between the G point at the head and lane line.  
where \(\sqrt{\left(\mathrm{L-b}\right)^{2}+\left(\mathrm{e+f}\right)^{2}}\) is the distance between points B and G.  
The ordinate value of point G on the road boundary is W. To meet the spatial constraint of the collision point between the front and the lane, only the ordinate value of point G should always be smaller than the ordinate value of the lane, so:  
\[\left|y_{\mathrm{G}}\right|\leq\mathrm{w}-\delta_{\mathrm{min}} \tag{6}\]  
Now, we substitute each coordinate point into the above equation.  
\[\left|\mathrm{v}_{0}-\left(\mathrm{R-f}\right)\left(1-\cos\theta\right)+\sqrt{ \left(\mathrm{L-b}\right)^{2}+\left(\mathrm{e+f}\right)^{2}}\sin[\theta+ \arctan(\frac{\mathrm{e+f}}{\mathrm{L-b}})]\right|\leq\mathrm{w}-\delta_{ \mathrm{min}} \tag{7}\]  
To make the parameters more computable, the above equation is simplified. Since \(\arctan(\frac{\mathrm{e+f}}{\mathrm{L-b}})\) is small and negligible, then \(\sin\left[\theta+\arctan(\frac{\mathrm{e+f}}{\mathrm{L-b}})\right]\approx\sin\theta\)  
Since the direction angle \(\theta\) changes with the trajectory, it is necessary to eliminate and simplify \(\theta\), and when the maximum value of the equation on the left side is always less than zero, this constraint condition is proved to be valid. After adjusting both sides,  
\[\sqrt{\left(\mathrm{L-b}\right)^{2}+\left(\mathrm{e+f}\right)^{2}+\left( \mathrm{R-f}\right)^{2}}\sin(\theta+\psi)+\mathrm{v}_{0}-\mathrm{R+f-w+\delta _{\mathrm{min}}}\bigg{|}_{\mathrm{max}}\leq 0 \tag{8}\]  
and \(\psi=\arctan\frac{\mathrm{R-f}}{\sqrt{\left(\mathrm{L-b}\right)^{2}+\left( \mathrm{e+f}\right)^{2}}}\).  
In order to obtain the maximum value of the equation on the left, we find that when \((\theta+\psi)=\frac{\pi}{2}\), we can take the maximum value of \(\sin(\theta+\psi)\), and Equation (8) is also the maximum value. \(\theta\) is a value from 0 to \(\frac{\pi}{2}\) in the range of actual parking, which satisfies the maximum requirement and has a unique solution to make it maximum.  
This constraint condition can be simplified as:  
\[\sqrt{\left(\mathrm{L-b}\right)^{2}+\left(\mathrm{e+f}\right)^{2}+\left( \mathrm{R-f}\right)^{2}}+\mathrm{v}_{0}-\mathrm{R+f-w+\delta_{\mathrm{min}}}\leq 0 \tag{9}\]  
In Section 4, we need to compile an algorithm program based on the constraint equation. To facilitate the subsequent abbreviation and use of the constraint condition, the inequality on the left is denoted as an equation, and the equation on the left of the inequality is denoted as g(x).