Study on an Automatic Parking Method Based on the Sliding Mode Variable Structure and Fuzzy Logical Control

This paper discusses an automatic parking control method based on the combination of the sliding mode variable structure control (SMVSC) and fuzzy logical control. SMVSC is applied to drive the vehicle from a random initial position and pose, to the designated parking position and pose. Then, the vehicle is driven from the designated parking position to the target parking slot using the method of fuzzy logical control, whose rules are limited to the range of the effective initial position. To combine SMVSC with the fuzzy logical control, the experimental results demonstrate that effective parking can be guaranteed, even if the initial position is out of the effective parking area of the fuzzy logical control.


Introduction
As a key part of autonomous driving technologies, automatic parking technology can release the human driver from complicated parking procedures and can park more efficiently.Accordingly, automatic parking technology has gained a lot of attention, and the correlative research is increasing [1].
According to the procedures of parking, the research of automatic parking technology has been divided into two major aspects, which include parking slots detection, and parking path planning and tracking.In the aspect of parking slots detection, Huang, C.C. and Wang, S.J. proposed a three-layer Bayesian hierarchical detection framework to detect parking slots [2].Suhr, J.K. proposed a method based on estimating parallel line pairs so as to detect a parking slot [3], and used a hierarchical tree structure method to recognize various parking slot markings [4].Yu Cheng proposed an approach for parking slots detection based on video images [5].Jung, H.G. and Yun, H.L. proposed a method based on target position-designation to mark the parking slot [6].In another aspect, research on parking path planning and tracking have been developed, for example, Vorobieva, H. proposed a path-planning method based on corresponding geometry and tracking the path with a controller, based on traveled distance [7].Li, B. and Wang, K. used a simultaneous dynamic optimization method to optimize the maneuver planning [8].Xu, J. proposed an automatic parking method based on computer vision [9].Sugeno, M. and Murakami, K. designed fuzzy logical controller rules, based on the experience of human drivers, to park the vehicle [10].On this foundation, Zhan, Y.N. and Collins, E.G. optimized the membership functions of the fuzzy logical controller by using a genetic algorithm to park the vehicle more efficiently [11].Yin, Y.A. also improved the fuzzy controller based on images using a genetic algorithm [12].
The fuzzy logical control applied in automatic parking has gained a lot of attention, since Kong, S.G. applied an adaptive fuzzy logical control algorithm to back up a truck-and-trailer in 1992 [13].
Liang, Z. designed an automatic parking path tracking controller based on self-organizing fuzzy control [14].Xiong, Z.B. proposed an automatic parking algorithm based on the preview fuzzy control [15].Grzegorzewski, P. proposed an efficient algorithm for checking separability, which can be easily applied in practice [16].The fuzzy logical control applied in automatic parking becomes the mainstream method, with the advantage of improving robustness against uncertainties and of simulating the nonlinear control of the human driver [17].
However, fuzzy logical control in automatic parking still has some limitations.In reality, the uncertainty of a vehicle's initial position results in the fuzzy logical controller not being able to park the vehicle successfully, for example, if the initial parking position is outside of the range of the effective parking position where the fuzzy logical controller can park the vehicle successfully.The effective parking position depends on the rules of the fuzzy logical controller.In other words, if the fuzzy logical controller is confirmed, the range of the effective parking position will be confirmed.Hence, the confirmed fuzzy logical controller cannot park successfully if the vehicle is outside the range of the effective position.
Our objective is solving this problem (the confirmed fuzzy logical controller cannot park successfully if the vehicle is outside of the range of the effective position) by sliding the mode variable structure control (SMVSC).The SMVSC is insensitive to the disturbance and responds quickly [18], so it is often used to track trajectory [19].Recently, Yue, M. proposed a method based on a model predictive control (MPC) and SMVSC in order to track the coordinated trajectory of vehicles [20].The solution can be divided into two steps, with the first step using the SMVSC method drive the vehicle from an initial position to the range of an effective parking position, and the second step parking the vehicle from the effective parking position to the target slot.
In this paper, a method based on the sliding mode variable structure control (SMVSC) and fuzzy logical control is proposed in order to park a car, from an initial position where it is outside the range of an effective position.The procedures can be divided as follows.SMVSC drives the vehicle to the range of the effective position to prepare for parking.Afterwards, the fuzzy logical controller parks the vehicle into the target slot.The results, based on MATLAB, show that the control method combining the SMVSC with fuzzy logical control can realize parking from a random initial position, where it is outside the range of an effective parking position.
In this paper, Section 2 presents an algorithm of SMVSC, to drive the vehicle from a random initial position to the effective position.Section 3 discusses the fuzzy logical controller that is used to park the vehicle from the designated position.Section 4 describes the results of the experiment, based on MATLAB Simulink.The conclusion remarks are presented in Section 5.

Algorithm of the Sliding Mode Variable Structure Control
The vehicle's position and pose in the 2D plane can be defined as (x, y, θ).As shown in Figure 1,  (x, y) are the coordinates of the center point of a vehicle's rear axle, θ is the course of the vehicle, ϕ is the front-wheel corner, L is the wheelbase, and V is the speed of the vehicle.The dynamical equations of the vehicle can be expressed in Equation ( 1), as follows: If ϕ is small enough, then cos ϕ ≈ 1 and sin ϕ ≈ tan ϕ; thus, the dynamical equations of the vehicle are shown as follows: where ω is the yaw rate.The dynamical equations in matrix form are governed by the following equations: . where As shown in Figure 2, (x c , y c , θ c ) is the vehicle's initial position and pose, and (x r , y r , θ r ) is the vehicle's ideal position and pose.According to the geometric relationship between (x c , y c , θ c ) and (x r , y r , θ r ), the error (x e , y e , θ e ) can be defined as Equation (4), as follows: where P r and P c are According to the derivative of error, Equation ( 4), and the dynamical equation, Equation (2), the differential equation of error is proposed as Equation ( 5), as follows: .
where v r and ω r are the ideal speed and ideal yaw rate, respectively.v c and ω c are the current speed and current yaw rate, respectively.It can be pointed out from the above analysis that, according to the numerical values of P e , v r , and ω r , SMVSC aims to output v c and ω c to make P e converge to zero.Lemma 1. [21] If any x ∈ R and |x| < ∞, then ϕ(x) = xsin tan −1 x ≥ 0, if and only if for x = 0, then the equality holds.
If x e = 0, then the Lyapunov function can be described using Equation ( 6), as follows: with the hypothesis of θ e = − tan −1 (v r y e ), .
V y = y e . y e = y e (−x e ω c + v r sin θ e ) = −y e x e ω c − v r y e sin tan −1 (v r y e ) , according to the Lemma 1, v r y e sin tan −1 (v r y e ) ≥ 0 (if and only if v r y e = 0, then the equality holds), hence .
V y ≤ 0. It can be seen that if x e converges to zero and θ e converges to − tan −1 (v r y e ), then y e converges to zero, thus the switching function is designed using Equation (7), as follows: We designed a sliding mode controller to let s 1 and s 2 converge to zero, which means that x e converges to zero and θ e converges to − tan −1 (v r y e ) to make y e and θ e converge to zero.
The constant rate reaching law can be expressed as follows: .
It is unavoidable for the sliding mode control to generate chattering effect, but the chattering effect can be decreased by replacing Equation (8) with Equation (9), as follows: .
where δ is a positive number.Thus, the constant rate reaching law for Equation (7) can be described using Equation (10), as follows: (10) Using Equation ( 5), as well as the derivative of Equations ( 7) and (10), Equation ( 11) is obtained, as follows: where α = tan −1 (v r y e ), ∂α ∂v r = y e 1+(v r y e ) 2 , ∂α ∂y e = v r 1+(v r y e ) 2 .Changing the form of Equation ( 11), the control law is designed and shown, as follows: The function relationship between ϕ and q c is given by Equation ( 2), and we changed the form of Equation ( 2), resulting in Equation ( 13), as follows: In this section, the purpose of SMVSC is for driving a vehicle from a random initial position and pose, to the ideal position and pose [22,23].As shown in Figure 3, (x r , y r , θ r ) represents the ideal position and pose.ω r and v r are the ideal yaw rate and ideal speed of the vehicle, respectively.According to Equation (4), by combining the ideal position and pose (x r , y r , θ r ) with the current position and pose (x c , y c , θ c ), we defined the error of position and pose (x e , y e , θ e ), as shown in Figure 2, which is the input of SMVSC.The output of SMVSC, ω c and v c , which depend on (x e , y e , θ e ) and ω r , v r , decide the corner of front wheel, ϕ c .Lastly, according to v c and ϕ c , SMVSC controls the vehicle.

Fuzzy Logical Controller
As shown in Figure 4, w is the weight of the parking slot and h is the height of the parking slot.(x, y) are the coordinates of the center point of the vehicle's rear axle, and θ is the course of the vehicle.In order to adapt to the different sizes of the parking slot, we replaced (x, y) with (x a , y a ) [24], which is defined by Equation ( 14), as follows: x a = x w y a = y h (14) There are three inputs for the fuzzy logical controller, x a , y a , and θ.The output is the front-wheel corner, ϕ.The parking speed is the constant.The diagram of the fuzzy logical controller is shown in Figure 5, as follows: The algorithm of the fuzzy logical controller is the Mamdani algorithm [25], and the membership functions are shown in Figures 6-9, the abbreviations in Figures 6-9 are the name of membership function, and the parameters of the membership functions are shown in Table 1.The parking strategy is described in Figure 10.Leave 2 m between the vehicle and the parking slot.Keep the vehicle in reverse, with the speed of v (m/s), until the distance between the extended line of the parking slot line and the tail of the vehicle reach 1 m.Then, let the front-wheel corner, ϕ, turn 35 • .When the course of the vehicle, θ, reaches 90 • , it returns to ϕ.According to the parking strategy, the fuzzy rules are designed and are shown in Tables 2-5.
Fuzzy rules when x a is P.
Table 5. Fuzzy rules when x a is P.
There are nine rules in the fuzzy rule base.Finally, the center average is used in the defuzzifier to calculate ϕ.

Results
In this section, we show the effect of SMVSC and the fuzzy logical controller, respectively.The simulating parameters of SMVSC are shown as follows: (x r , y r , θ r ) = (0, 0, 0), ω r = 0, v r = 0, (x c , y c , θ c ) = (2, 2, 0), ω c = 0, and v c = 0.The results are shown in Figures 11-15      As we can see from Figures 11-13, the ideal position and pose (x r , y r , θ r ) and the initial position and pose (x c , y c , θ c ) are changed from the initial error of (−2, −2, 0) to (0, 0, 0), by the control laws v c and ϕ c , which are shown in Figures 14 and 15.In other words, according to control laws v c and ϕ c , the vehicle is driven from the initial position (x c , y c , θ c ) and pose to the ideal position and pose (x r , y r , θ r ).It is noteworthy that the convergence time of (x e , y e , θ e ) in ten seconds.In Figures 14 and 15, the curvilinear trend is smooth, so that it can be implemented in reality [26].
The result of the fuzzy logical controller is given in Figure 16, which is the trajectory of the vehicle's center point of the rear axle.As shown in Figure 16, the simulating parameters are shown as follows: w = 2.5, h = 5.3, speed v = −1 m/s, the initial position and pose of magenta trajectory is (x, y, θ) = (7, 12, 0), the initial position and pose of green trajectory is (x, y, θ) = (7, 6.5, 0), and both of the trajectories are outside the area of the effective parking position, so they park unsuccessfully.The initial position and pose of the red trajectory is (x, y, θ) = (7, 9, 0), which is inside the red box, which allows for parking successfully.According to the experiments, if the initial position is within the area of the red box, shown in Figure 16, the fuzzy logical controller described in Section 3 can park the vehicle successfully.
As discussed in the Section 1 (Introduction), this paper aims to park the vehicle from an initial position, which is out of the black box, by combining SMVSC with the fuzzy logical control.Figure 17 shows the effect of this method.The magenta trajectory is controlled by the hybrid method.The red trajectory is controlled by the fuzzy logical controller, which is the same as the hybrid method.The simulating parameters of Figure 17 are shown as follows: the ideal position and pose (x r , y r , θ r ) are the same as that of Figure 16 (x, y, θ) = (7, 9, 0).The initial position and pose are (x c , y c , θ c ) = (20, 12, 0), which is out of black box.The result of the simulating shows that the hybrid method can park the vehicle into the target slot successfully, but the fuzzy logical control cannot park successfully (the left side of the vehicle is not in the slot).The result shows that the hybrid method can expand the range of the effective parking position.

Conclusions
A control parking method, which combines SMVSC with the fuzzy logical control, is proposed in this paper.This method aims to expand the range of the effective parking position, which is confirmed by the fuzzy logical controller.The disadvantage of the fuzzy logical control is that the range of the effective initial position and pose are limited to its rules.In other words, the fuzzy logical controller cannot park the vehicle when the initial position is out of the effective initial position.The aim of this paper to solve this problem, of driving the vehicle from a random initial position to the effective parking position using the mothed of SMVSC, and parking the vehicle from the effective parking position using the method of fuzzy logical control.
SMVSC can control a vehicle from a random initial position to an effective parking position in limited amount of time; furthermore, the curve of the control laws is smooth enough to implement in reality, and the chattering effect is decreased.The results also show that the fuzzy logical controller has nine rules, which is according to the strategy of parking, and can park the vehicle from the effective parking position (area of red box).By comparing the fuzzy logical control and the hybrid control method, the experimental results verified that the fuzzy logical control cannot park from an initial position outside the range of an effective parking position, but the hybrid method can.In short, parking from a random initial position to parking outside of the effective parking position is realized by the hybrid method of combining the SMVSC and fuzzy logical control.

Figure 2 .
Figure 2. Diagram of the error between (x c , y c , θ c ) and (x r , y r , θ r ).

Figure 3 .
Figure 3. Relationship among variables of the sliding mode variable structure control (SMVSC).

Figure 4 .
Figure 4. Coordinate system and target parking slot.

Figure 5 .
Figure 5. Diagram of the fuzzy logical controller.

Figure 6 .
Figure 6.Generated membership function for x a .

Figure 7 .
Figure 7. Generated membership function for y a .

Figure 10 .
Figure 10.Diagram of the parking strategy. .

Figure 14 .
Figure 14.Speed V time response diagram.

Figure 16 .
Figure 16.The trajectory of the fuzzy control parking to a different initial position.

Figure 17 .
Figure 17.Trajectory of two different control methods.

Table 1 .
Parameter of the membership function.

Table 2 .
Fuzzy rules when x a is S.