Fuzzy Controller-Based Design and Simulation of an Automatic Parking System

Abstract

With the development of automatic driving and fuzzy theory, people pay more and more attention to the application of fuzzy logic in engineering technology. The automatic parking module in the automatic driving system has always been the focus of research. Automatic parking modules can greatly assist drivers in parking operations, greatly reduce parking difficulties and make people more convenient and fast parking. In this paper, an automatic parking system based on the fuzzy controller is proposed. The fuzzy controller of automatic parking system is constructed by using fuzzy theory, and the robustness of the whole system is examined by fuzzy logic. Firstly, the vehicle motion rules and trajectory changes are analyzed in detail, and the real parking lot model is simulated. Then, the input and output variables of the whole system are analyzed by fuzzy theory and the membership function is constructed. Based on the experience of human experts, the parking rules are tested and summarized, and a reasonable and practical rule base is established. Finally, MATLAB is used to code, build the visual interface of parking lot and vehicles, and draw the cyclic iterative function to detect the vehicle position and direction angle, so as to act as a sensor. The results show that using a fuzzy controller to construct an automatic parking system can effectively improve the parking level.

Share and Cite:

Gao, M. , Wei, Y. , He, Y. , Zhang, D. , Tian, Y. , Huang, B. and Zheng, C. (2023) Fuzzy Controller-Based Design and Simulation of an Automatic Parking System. Journal of Software Engineering and Applications, 16, 505-520. doi: 10.4236/jsea.2023.169025.

1. Introduction

The quest for advancing technology often arises from a need to address practical challenges. As fuzzy theory has evolved over the years, its engineering applications have garnered increasing interest from engineers. This trend is particularly noticeable with the emergence of autonomous driving systems, a field where technologies are complex and often not fully defined by traditional mathematical models. Such complexity has historically posed challenges for engineers. Enter fuzzy system theory: a framework that manages the imprecision inherent in these systems, leveraging its inherent “fuzziness” to bring the entire system to a new equilibrium. Moreover, with the advent of deep learning and machine learning techniques, there has been a surge in research targeting varied applications, ranging from cancer gene data classification to traffic sign recognition [1] [2] . This indicates the widespread adaptability and potential of these methodologies in solving complex problems. Recent advancements in self-supervised image denoising further illustrate the capability of modern algorithms in handling intricate tasks, which can be extrapolated to the domain of autonomous driving. [3] [4] [5] .

1.1. Research Question

The automatic parking module, given the current trajectory of autonomous driving, stands out as a particularly intriguing challenge. Its complexity defies encapsulation within a straightforward mathematical model. This paper aims to delve into the automatic parking system, understanding its nuances, proposing practical solutions, and constructing a systematic approach to address parking challenges in modern parking lots.

1.2. Potential Value of Research Question

In contemporary urban infrastructures, the proliferation of Intelligent Vehicle (IV) technologies signifies an evolution in transportation paradigms. However, amidst this technological renaissance, the parking dilemma, especially within high-density metropolises, remains a persistent hurdle. Urban spatial constraints have culminated in progressively compact parking allocations, amplifying the intricacies of parking even for adept drivers. Existing studies have already indicated the challenges and potential solutions associated with parking [6] [7] [8] . Leveraging sophisticated data analytics tools like Kafka and Elastic Search facilitates the efficient assimilation and processing of voluminous vehicular datasets [9] . Harnessing this capability has the potential to critically enhance IV functionalities. Delving into the automatic parking system paradigm, this research endeavors to:

1) Catalyze advancements in the broader autonomous driving ecosystem.

2) Elevate the efficacy of parking technologies, thereby minimizing parking-induced incidents.

3) Demonstrate a robust framework, emphasizing its adaptability in deciphering intricate vehicular systems.

2. Introduction

In this study, we employ a fuzzy controller approach to address the challenges of automatic parking. It’s widely acknowledged in vehicular control that the wheel steering angle and speed are critical parameters. In our proposed system, while the vehicle speed is kept constant, the emphasis is on analyzing variations in the wheel steering angle. By examining the vehicle’s trajectory, we identify two primary input variables: the vehicle position and the vehicle direction angle. The wheel steering angle serves as the primary output variable in controlling the vehicle trajectory. These inputs and outputs are synergized through a fuzzy controller, forming the foundational rule base of the Fuzzy Inference System (FIS).

As shown in Figure 1, this figure is the flow chart of the overall solution of the automatic parking system. Firstly, the vehicle motion is analyzed and modeled, the input and output variables are determined, the vehicle motion equations are analyzed, and the relationship between them is found. Then, the parking lot model is constructed for later simulation to optimize the system adjustment. Finally, the most important step is to create a fuzzy inference engine and propose a reasonable rule base based on human expert experience. When the above steps are completed, the simulation test is carried out by MATLAB, the value obtained by the fuzzy inference system is sent to the vehicle motion model to run according to a certain trajectory, and the vehicle position and parking space position are continuously judged until the end of the program.

3. Methodology

Through the explanation of the above overall scheme, each step of the method

Figure 1. Flow chart of automatic parking system.

will be described in detail below, from the establishment of the model, to the derivation of the motion trajectory formula, to the construction of the fuzzy controller, and finally to the realization of the automatic parking control system.

3.1. Real Vehicle Dimension Parameters

In this paper, we pick a Jetta car [10] , which is simplified as a rectangle, as the model size of the vehicle. The main vehicle dimension parameters are shown in Figure 2. The values for the parameters are listed in Table 1.

Figure 2. Vehicle parameter model.

Table 1. Vehicle parameter table.

3.2. Parking Lot Parameters

Most of the parking lots’ lengths are above 5.0 m, and the widths are more than 2.3 m [10] . Due to the above fact, we choose the reference parking lot as 5.0 × 3.0 m, as shown in Figure 3. The values for the parameters are listed in Table 2.

3.3. Vehicle Dynamic Model

The vehicle dynamic model used in this article is shown in Figure 4. F is the front middle point of the vehicle model. R is the rear middle point of the vehicle model. α is the angle between the vehicle model and the x-axis. β is the wheel steering angle. In the reference frame, (xf, yf) are the coordinates of the midpoint

Figure 3. Schematic diagram of parking lot.

Table 2. Parking lot parameter table

Figure 4. Vehicle dynamic model.

F which is the front axle of the vehicle model.

According to the kinematic analysis, when the vehicle is running, its trajectory will change with the change of wheel steering angle and speed. Therefore, for the analysis method of controlling the motion trajectory of the vehicle, we should grasp the wheel steering angle and speed.

In this scheme design, the vehicle speed is set as a constant value s and the wheel steering angle is set β while it will be controlled as the output of the fuzzy controller. When the vehicle is controlled to the specified parking position, different wheel steering angles will be generated due to different positions and directions of the vehicle, this is an iterative process. The following is the iterative formula:

α ˙ = s sin β | R F | (1)

x ˙ f = s cos ( α + β ) (2)

y ˙ f = s sin ( α + β ) (3)

where, α is the directional angle of the vehicle relative to the coordinate axis, and RF is the center distance of the front and rear wheels of the vehicle.

As shown in the iterative formula of the above, the vehicle direction angle α and the steering angle β will be determined by the vehicle continuous iterative updating; the location of the vehicle will also vary according to α and β. Therefore, the new position variables and direction angle variables will be given by the following formula:

x f ( n + 1 ) = x f ( n ) + s cos ( α ( n ) + β ( n + 1 ) ) (4)

y f ( n + 1 ) = y f ( n ) + s sin ( α ( n ) + β ( n + 1 ) ) (5)

α ( n + 1 ) = s sin β ( n + 1 ) | R F | (6)

3.4. Automatic Parking System Path Planning

As shown in Figure 5, this is the final planned route for the automatic parking

Figure 5. Parking path planning.

system. It is the optimal solution in the system. According to the decision-making and optimization processing, the system selects the optimal path. Each iterative process of path selection needs to pass through the fuzzy reasoning system.

3.5. Fuzzy System Structure Design

When the vehicle position and direction angle are detected by the sensor, its value is crisp input. The fuzzy system needs to fuzzification the crisp input, and then obtain the fuzzy input according to the input membership function; when the fuzzy input reaches the inference engine, the system will map the input according to the inherent rules to obtain the fuzzy output, and then obtain the crisp output according to the output membership function and defuzzification method. Finally, transfer the crisp output value—wheel steering angle to the equipment for operation. After the operation, the vehicle sensor will detect the vehicle position and direction angle again, and compare it with the target. If it is consistent with the goal, the procedure will be ended; If not, continue to blur and cycle until the end.

3.6. Membership Function

Automatic vehicle parking is a typical nonlinear control problem, which is generally solved by fuzzy control methods [11] . The more the number of input and output variables of the fuzzy controller, the finer the division of the fuzzy set of the input and output variables, the higher the control accuracy of the controller [12] . However, while increasing the number of input and output variables and increasing the number of fuzzy sets, the number of fuzzy controller control rules will also increase exponentially, forming a so-called “dimension disaster” [13] , which seriously affects the response speed of the controller. While the increase in the number of fuzzy rules also increases the possibility of rule errors [14] . Therefore, it is necessary to reasonably select the number of controller input and

Figure 6. Flow chart of fuzzy system design.

output variables, divide the fuzzy set number of each input and output variable, and take into account the response speed of the controller while ensuring the control accuracy of the controller.

Therefore, it is necessary to reasonably select the number of controller input and output variables, divide the fuzzy set number of each input and output variable, and take into account the response speed of the controller while ensuring the control accuracy of the controller. So, our system chose the membership function of inputs and output based on the judgment factors for human drivers [15] : x (the horizon position of the vehicle) and α (the angle of the vehicle contract with the parking area) as the input of the fuzzy controller, β (the angle of the steering wheel) as the output of the fuzzy controller.

Variable x has 5 fuzzy sets, variable α has 7 fuzzy sets, variable β has 7 fuzzy sets. Meanwhile, in order to improve the robustness of the fuzzy controller and reduce the adjustable parameters, this paper adopts a triangular/trapezoidal, fully overlapping membership function. The membership functions of inputs and output are shown in Figures 7-9.

3.7. Fuzzy Rules

The fuzzy rules for the bay parking are chosen as

1) IF x is VL AND α is LD, THEN β is TL2;

2) IF x is L AND α is LD, THEN β is TL2;

3) IF x is CE AND α is LD, THEN β is TL3;

4) IF x is R AND α is LD, THEN β is TL3;

5) IF x is VR AND α is LD, THEN β is TL3;

Table 3 shows the fuzzy rules established based on the driver’s vertical parking experience.

By using fuzzy inference system and reasonable rule base to establish a practical inference engine, the relationship between input and output can be obtained, as shown in Figure 10.

Figure 7. Input variable—vehicle position x (meter).

Figure 8. Input variable—vehicle angle α (˚).

Figure 9. Output variable—wheel steering angle β (˚).

Table 3. Rule base table.

4. Results and Discussions

4.1. Simulation Result

In this section, we assume that the vehicle has different initial conditions including the positions and the poses. We set up the dynamic model that is built in Section III in MATLAB. Meanwhile, the fuzzy logic controllers are implemented in MATLAB model [16] . The trajectories of the vehicle for initial conditions appear in Figures 11-13, which show that the vehicle is parked successfully.

Figure 10. Relationship between the inputs and the output.

Figure 11. Left side parking simulation.

Figure 12. Left side wider angle parking simulation.

Figure 13. Right side parking simulation.

4.2.Discussions

1) Parking with low-speed

In the first experiment, the vehicle set the speed at 1 m/s to make it easy to maintain and control. However, with the speed of 1 m/s, the vehicle will take a long time to park in the lot. Meanwhile, the low speed will cause the turning speed to be too slow and affect the finial effect. The simulation result of parking in low-speed shows in Figure 14.

2) Parking with proper speed

From the experiment, the speed of 2 m/s is prefect to maintain and control. The simulation result of parking at the proper speed shows in Figure 15.

Figure 14. Simulation of parking in low-speed.

Figure 15. Simulation of parking in proper speed.

3) Parking with speed control logic

However, parking with the unchangeable speed of 2 m/s will still take a lot of time to park. Therefore, it is necessary to design a speed control logic that can automatically adjust the speed according to the situation. The main idea for the speed control is to ensure that the speed is small when the vehicle is close to the position of parking lot or the steering angle is large (If the speed is large while angle is large too, it will be easy to over-change the angle. So, the speed should be small when angle is large), and speed can be medium or large when the distance is large and the steering angle is small. The simulation result of the parking with the speed controlled by speed control logic is shown in Figure 16.

4) Membership Function Improvement

In the first experiment, all x membership function are set in triangle or trapezoidal shape, shown in Figure 17. But when the vehicle is closing to the center with a small angle, the x membership function CE take the action and made the steering angle hold still too early, so the vehicle will stop too close to the edge of the lot, the simulation is shown in Figure 18.

The problem is caused by the premature action of the CE function. To improve the simulation, an effect method is to reduce the CE area function by changing the trigonometric function to a Gaussian function. The change of membership function is shown in Figure 19. Gaussian CE membership function

Figure 16. Parking with speed logic control.

Figure 17. Membership function of CE in triangle shape.

Figure 18. Simulation result with triangle CE membership function.

Figure 19. Membership function of CE in Gaussian function.

effectively improved the accuracy of parking. The simulation result is shown in Figure 20.

5. Conclusions and Future

This paper uses MATLAB to model the traditional fuzzy system simulation to verify the feasibility of vertical parking. Through the analysis and optimization of simulation results, some basic triangular membership functions are optimized to Gaussian functions, and the speed control logic is optimized. Finally, a better vertical parking effect is achieved. The optimized parking path is closer to the human parking method, which improves the automatic and accuracy of parking.

However, the system’s efficacy varies with parking conditions. To be applicable

Figure 20. Simulation result of Gaussian CE membership function.

in intricate environments, the system requires heightened robustness and continuous refinements in fuzzy inference. An approach encompassing secondary detection for feedback and data assimilation from autonomous driving sensors is recommended to validate the auto-parking module’s efficacy.

Prospective advancements include refining the parking spot detection algorithm through parameter optimization and intricate logic integration. Given the success of recent machine learning algorithms in traffic applications, a fusion of fuzzy algorithms and machine learning offers potential. Notably, neural networks can be trained to adaptively fine-tune fuzzy logic and parameters, based on the vehicle’s coordinates, to achieve parking outcomes.

NOTES

*corresponding author.

#These authors contributed equally to this work.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Wei, Y.Z., Gao, M.Y., Xiao, J., Liu, C.X., Tian, Y.H. and He, Y. (2023) Research and Implementation of Cancer Gene Data Classification Based on Deep Learning. Journal of Software Engineering and Applications, 16, 155-169.
https://doi.org/10.4236/jsea.2023.166009
[2] Wei, Y.Z., Gao, M.Y., Xiao, J., Liu, C.X., Tian, Y.H. and He, Y. (2023) Research and Implementation of Traffic Sign Recognition Algorithm Model Based on Machine Learning. Journal of Software Engineering and Applications, 16, 193-210.
https://doi.org/10.4236/jsea.2023.166011
[3] Zhang, D. and Zhou, F. (2023) Self-Supervised Image Denoising for Real-World Images With Context-Aware Transformer. IEEE Access, 11, 14340-14349.
https://doi.org/10.1109/ACCESS.2023.3243829
[4] Zhang, D., Zhou, F.F., Jiang, Y.W. and Fu, Z.M. (2023) MM-BSN: Self-Supervised Image Denoising for Real-World with Multi-Mask Based on Blind-Spot Network. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, 18-22 June 2023, 4188-4197.
https://doi.org/10.1109/CVPRW59228.2023.00441
[5] Zhang, D., Zhou, F.F., Wei, Y.Z., Yang, X. and Gu, Y. (2023) Unleashing the Power of Self-Supervised Image Denoising: A Comprehensive Review.
[6] Maravall, D. and De Lope, J. (2007) Multi-Objective Dynamic Optimization with Genetic Algorithms for Automatic Parking. Soft Computing, 11, 249-257.
https://doi.org/10.1007/s00500-006-0066-6
[7] Jo, K., Kim, J., Kim, D., Jang, C. and Sunwoo, M. (2014) Development of Autonomous Car—Part I: Distributed System Architecture and Development Process. IEEE Transactions on Industrial Electronics, 61, 7131-7140.
https://doi.org/10.1109/TIE.2014.2321342
[8] Jo, K., Kim, J., Kim, D., Jang, C. and Sunwoo, M. (2015) Development of Autonomous Car—Part II: A Case Study on the Implementation of an Autonomous Driving System Based on Distributed Architecture. IEEE Transactions on Industrial Electronics, 62, 5119-5132.
https://doi.org/10.1109/TIE.2015.2410258
[9] Wei, Y.Z., Li, M.M. and Xu, B.S. (2017) Research on Establish an Efficient Log Analysis System with Kafka and Elastic Search. Journal of Software Engineering and Applications, 10, 843-853.
https://doi.org/10.4236/jsea.2017.1011047
[10] Wang, Z.J., Zhang, J.W., Huang, Y.L., Zhang, H. and Mehr, A.S. (2011) Application of Fuzzy Logic for Autonomous Bay Parking of Automobiles. International Journal of Automation and Computing, 8, 445-451.
https://doi.org/10.1007/s11633-011-0602-4
[11] Sánchez, C.M., Peñas, M.S. and Salvador, L.G. (2012) A Fuzzy Decision System for an Autonomous Car Parking. In: Lu, J., Jain, L.C. and Zhang, G.Q., Eds., Handbook on Decision Making, Springer, Berlin, 237-258.
https://doi.org/10.1007/978-3-642-25755-1_13
[12] Zhao, Y. and Collins Jr., E.G. (2002) Fuzzy Logic Control of Autonomous Vehicles for Parallel Parking Maneuver. US Army Research Laboratory under the Collaborative Technology Alliance Program, Cooperative Agreement DAAD19-01-2-0012.
[13] Riid, A. and Rustern, E. (2001) Fuzzy Logic in Control: Truck Backer-Upper Problem Revisited. 10th IEEE International Conference on Fuzzy Systems, Vol. 1, 513-516.
[14] Ryu, Y.W., Oh, S.Y. and Kim, S.Y. (2008) Robust Automatic Parking without Odometry Using an Evolutionary Fuzzy Logic Controller. International Journal of Control, Automation, and Systems, 6, 434-443.
[15] Nakrani, N. and Joshi, M. (2016) Fuzzy Based Autonomous Parallel Parking Challenges in Real Time Scenario. In: Rodriguez, J.M.C., Mitra, S., Thampi, S.M. and El-Alfy, E.-S., Eds., The International Symposium on Intelligent Systems Technologies and Applications, Springer, Cham, 789-802.
https://doi.org/10.1007/978-3-319-47952-1_63
[16] Sharma, S. and Obaid, A.J. (2020) Mathematical Modelling, Analysis and Design of Fuzzy Logic Controller for the Control of Ventilation Systems Using MATLAB Fuzzy Logic Toolbox. Journal of Interdisciplinary Mathematics, 23, 843-849.
https://doi.org/10.1080/09720502.2020.1727611

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.