System Identification and Control of Automatic Car Pedal Pressing System
Abstract:
This paper mainly explores the system identification and control of an automatic car pedal pressing system. Specifically, the system identification was achieved using an artificial neural network, with the help of MATLAB’s System Identification Toolbox. The proportional-integral-derivative (PID) controller and fuzzy logic controller were designed, and normalized with membership functions. These functions were scaled with a gain as a scaling factor. The controller gains were tuned by a metaheuristic algorithm named particle swarm optimization (PSO). On this basis, the two controllers were compared with a number of performance indices, including integral squared error (ISE), integral absolute error (IAE), integral time absolute error (ITAE), and mean squared error (MSE). The car pedal pressing performance was measured at different speed levels for each controller.
1. Introduction
Traffic congestion occurs when too many vehicles impede the traffic flow on the road. Increased vehicle queueing, slower speeds, and longer travel times are all results of traffic congestion. When the load exceeds the traffic capacity, there is extreme traffic congestion. When cars are totally stopped for an extended period of time, it becomes a traffic jam. During traffic congestion, a driver may feel irate and exhibit road rage. Hours spent sitting in traffic in one position necessitate frequent manual pedal depressing and hard braking, which, if done incorrectly, can cause rapid fatigue, especially on the driver's back and leg. Long-term effects of traffic congestion include harm to the driver's health. Despite the efforts of the government and state agencies to reduce traffic congestion, the issue is projected to get worse as car production and sales continue to climb. Floods, accidents, and road repairs are contributing to an increase in congestion, which makes traffic flow unpredictable and uncontrollable [1], [2].
Control systems work with the dynamic behavior of systems and change the system's inputs to affect the output in the way that is desired. The car pedal pressing mechanism must be controlled by a suitable control system, such as a conventional controller or an intelligent controller. The proportional-integral-derivative (PID) control has a number of benefits, including a straightforward structure, strong design, and easy implementation [3]. But proportional-integral-derivative (PID) technique requires supporting algorithms to identify and adjust its hyper-parameters. Given the complexity of the vehicle dynamics, the uncertainty of external disturbances, and the nonholonomic constraint of the vehicle, it is challenging to obtain excellent, ideal values for these hyper-parameters that suit the environment [4].
Creating a controller using conventional techniques became more difficult as the complexity and nonlinearity of the autonomous car increased. This difficulty is exacerbated when the effective parameters and inputs of the autonomous car are unknown. Moreover, fuzzy logic control approaches are widely known for their application and competence in the language description of complex systems. They can be used to construct and convert linguistically conveyed human experience into suitable automatic control strategies. Each individual driver's needs must be taken into account while adjusting the following distance and control dynamics. Applying fuzzy logic to intelligent car pedal pressing control looks to be a suitable way to create this human behavior because the driver's experience can be easily turned into rules [5].
Intelligent techniques are recognized to have great learning and recognition abilities as well as a high tolerance for uncertainty and imprecision. These features allow them to be successfully incorporated into intelligent vehicle systems. Without a deep understanding of the mathematical models underlying these systems, fuzzy logic is ideally suited for creating qualitative (or linguistic) representations of a wide range of systems. Given its substantial impact on the dynamic of the controller, optimization is frequently used to adjust the input and output scaling factors of the controller. The controller performance can be improved by scaling the input and output gains.
This work focuses on the automatic car pedal pressing model, PID controller and fuzzy logic controller for the model, as well as parameter optimization through particle swarm optimization (PSO). The difficulty of controller design is complicated by the presence of proportionality constant, integral constant and derivative, which are found in regular PID controllers, along with integral order and derivative order found in fractional-order PID controllers. Thus, the control gain parameters were obtained through PSO. For the model estimation, the artificial neural network (ANN) structures were selected for network training. The research results are promising in trajectory forecasts on new tracks. But the target speed is slower than that of humans on the same tracks [6]. Overall, our model estimation methods boast two advantages: the ANN structure is both simple and easy to solve, as evidenced by performance indices, including integral squared error (ISE), integral absolute error (IAE), integral time absolute error (ITAE), and mean squared error (MSE).
2. Methodology
The system model of the car pedal pressing mechanism was created using the system identification approach due to its simplicity and effectiveness in nonlinear system identification. Input and output data were gathered in the manner depicted in Figure 1 to develop an accurate plant model. The neural network system was then given the data for training, testing, and validation. When the pedal is pressed, the input of the car's pedal pressing is forced, and the output data represent the car's slow speed. It is possible that the trained network will not always react the same way as the real system. As a result, network testing and validation are crucial for assessing the accuracy of the trained network [7].
To keep the measured low speed at the set point, the controller needs to continuously compute and transmit corrective actions to the pedal. An actuator is employed to operate the car pedal using a PID and fuzzy logic controller. In addition, the PSO was introduced to the PID controller and the fuzzy logic controller to help with the membership function scaling, because the scaling of the membership function in the controllers is unclear. The block diagram of the PSO and controller is shown in Figure 2.
There has been a lot of interest in the capacity of system identification to discover an accurate model of dynamical systems [8]. There was a significant motivation to use the system identification technique to build a dynamic model that represents the car pedal pressing mechanism using information from a genuine plant. By employing this technique, the developed models were able to generate the system's dynamic properties without the difficulties associated with developing mathematical and physical models.
The car pedal pressing in this project is significantly nonlinear, as shown in Figure 3. Thus, the NARX model was adopted as the model framework due to its simplicity and excellent fit estimates for system identification. The NARX model is a nonlinear version of the linear black-box identification tool known as the ARX model. The nonlinear component of the ARX structure can be estimated using a neural network [9], which emulates the operations of the organic neurons in the brain.
In this study, a total of 9842 samples gathered from car pedal pressing systems were used to train, test, and validate neural networks. The samples were divided into a training set (70%), a test set (15%), and a validation set (15%). This stage was crucial for establishing how accurately the model replicates the act of pressing a car pedal. The model with the lowest MSE will be chosen after the network has been trained, tested, and validated.
In the NARX neural network (Figure 3), the three key elements are the number of delay signals, the number of nodes in the hidden layer, and the error [10]. The third factor was assessed while getting the best number of delay signals and the structure for each model [11].
As shown in Figure 4, during model training, the best validation performance was the MSE of 0.44628 at the epoch of 65. Thus, the neural network has the highest accuracy and the smallest error in this epoch.
For a perfect fit, the dataset should fall along the 45-degree line, making the network outputs identical to the targets. As shown in Figure 5, the fitness is reasonable, with all R values equal to or greater than 0.90. The neural network achieves the best fitness with the training datasets, as suggested by the R values of 0.99.
The system response was simulated using the MATLAB’s System Identification Toolbox. The controllers are expected to press the car pedal automatically, when the car is too close to another car within a specific range. The fuzzy logic controller was created in MATLAB using the Fuzzy Logic Toolbox.
The conventional PID controller tries to auto-tune the control performance offline repeatedly. Since the trials do not guarantee the convergence of the control effect, the conventional controller cannot be directly applied to a real plant. After the tuning, the PID control parameters for testing were identified as Kp = 2.2267, KI = -0.0565 and KD = 19.6979.
For the car pedal pressing design, there are two inputs and one output that were designed using the toolbox. All membership functions are generalized in the -1 to 1 range, as shown in Figure 6. The fuzzy logic controller receives all of the input and output crisp data, which are then subjected to the processing by the Gaussian membership function. The fuzzy logic set was accommodated by this function, for it is adaptable, simple to represent, and easily optimizable.
The Membership Function Editor is a tool that shows all the membership functions connected to all the input and output variables of the fuzzy inference system and lets users change them [12]. The tool can specify the forms of all the membership functions for each variable. To design the fuzzy logic controller, the Mamdani type was chosen to create a scaling factor for optimization.
The Simulink model of the PID controller was completed (Figure 7) after the PID controller has been adjusted. The controlled process input may become unstable if the PID control parameters, which are the gains of the proportional and derivative components, are selected incorrectly. Tuning aims to modify a control loop's control parameters to the best values for the desired control response.
When the fuzzy logic controller was complete, it was installed using MATLAB Simulink. This was done to mimic how the pedal controller works in an automobile. Thus, the effectiveness of the vehicle's braking system is evaluated. The fuzzy logic Simulink model is displayed in Figure 8.
The swarm intelligence theory is inspired by bird flocking, fish schooling, and human social behavior [13]. The two most popular swarm intelligence optimization methods are the g_{best} model and p_{best} model of PSO. The g_{best} and p_{best} were obtained iteratively. After the first iteration, if the new pbest is smaller than the current g_{best}, the new value will prevail [3]. This process is repeated until the end of the iterative process. The final g_{best} is the desired optimal solution [14].
Table 1 shows the PSO parameters for the optimization process. Table 2 shows the range of the scaling factors for both controllers.
PSO parameter | Value |
Number of particles | 100 |
Number of iterations | 30 |
Learning factor 1 | 0.12 |
Learning factor 2 | 0.2 |
Minimum weight | 0.4 |
Maximum weight | 0.9 |
Scale factor | Value |
K1 | [0.001 1] |
K2 | [0.001 0.1] |
K3 | [1 1000] |
K4 | [1 1000] |
For the car pedal pressing system, the PID controller and fuzzy logic controller were evaluated by various performance indices, including ISE, IAE, ITAE and MSE [15]. To improve the performance of a closed-loop control system, it is important to minimize some performance indices by changing the controller settings. The common formulas of these indices [4] were adopted to optimize the controllers for the car pedal pressing system, serving as the criteria for controller optimization individually.
3. Results and Discussion
Figure 9 and Figure 10 show the speed performance of the pedal pressing system with the PID controller and the fuzzy logic controller, respectively. The results show that the driving speed is low amidst the road traffic, and the reference input speed would be between 2 m/s (8 km/h) to 7 m/s (25 km/h). A traffic jam would lag the vehicle speed by a few seconds. Once the traffic jam ceases, the signal to the actuator will intensify, causing the car to increase the engine force and speed. In other words, the car pedal is pressed to increase the speed. The input and output in Figure 9 and Figure 10 represent the desired speed and actual speed of the car, respectively.
In this project, the designs of PID controller and fuzzy logic controller were optimized by adjusting the controller gains. Through the optimization, the authors obtained the optimal controller parameters that assures the best control effect of the PID controller, and got the best parameters of the fuzzy logic controller to stabilize the system performance. The PID controller gains are listed in Table 3, and the relevant performance values are displayed in Figure 11, Figure 12, Figure 13, and Figure 14.
Scale factor | K1 | K2 | K3 | K4 | Cost |
MSE | 0.5733 | -0.1001 | 459.2665 | -16.1983 | 7.0326 |
IAE | 0.3491 | -0.0762 | 623.8969 | -29.9177 | 9.0568 |
ISE | 0.4832 | -0.0481 | 636.8295 | -18.0069 | 5.6286 |
ITAE | 0.4465 | -0.1066 | 467.2691 | -23.9742 | 14.0564 |
Table 4 shows the controller gains with the minimum cost for each performance index of the fuzzy logic controller. It can be seen that the cost decreases with the growing number of iterations, for the new g_{best} values tend to produce minor errors. That is why the cost gets increasingly small. The relevant performance values of the fuzzy logic controller are displayed in Figure 15, Figure 16, Figure 17, and Figure 18.
Scale factor | K1 | K2 | K3 | K4 | Cost |
MSE | -0.0261 | -0.0011 | 786.0065 | 234.7067 | 2.7115 |
IAE | -0.0470 | -0.0036 | 507.404 | 129.6444 | 14.4872 |
ISE | -0.4014 | -0.0071 | 1.1909 | -27.6994 | 5.2540 |
ITAE | -0.0334 | -0.0024 | 951.3100 | 183.8143 | 4.1064 |
Table 5 shows the control system performance for the PID controller and fuzzy logic controller. Figure 19 displays the car speeds under both controllers. Specifically, the PID controller achieves a much shorter rise time (0.3556s) than the fuzzy logic controller, while the fuzzy logic controller realizes much better overshoot (3.64%) than the former (10.96%). Since the goal is to reduce and even eliminate overshoot, the fuzzy logic controller excels the PID controller in this respect. Less overshoot means the system makes the response with less error. The slower rise time of the fuzzy logic controller is not significant, for the delay is merely 0.3s.
PID controller | Fuzzy logic controller | |
Rise time (s) | 0.3556 | 0.0897 |
Settling maximum (s) | 8.6300 | 7.1144 |
Settling minimum (s) | 3.3998 | 2.8339 |
Overshoot (%) | 10.9625 | 3.6438 |
Steady state error (%) | 1.4821 | 1.2724 |
4. Conclusions
Using a neural network, the nonlinear automatic car pedal pressing system was identified first. For identification purposes, a detuned controller was created to view more of the dynamics of the car's pedal pressing system. The authors tried a feedforward network with different numbers of hidden layer nodes. The neural network model was able to anticipate when an automobile pedal will be pressed, and the MSE between the system and the neural model was minimal. It was found that certain hidden node counts have a smaller influence on model validity when using a closed loop controller than when using a detuned controller.
The first step of the system control analysis was completed through system identification. The NARX neural network is useful for system identification, for the input and output data of the plant are all what is needed. Then, two controllers, namely, conventional PID controller and intelligent fuzzy logic controller, were designed to achieve the desired result. Utilizing both traditional PID and intelligent fuzzy logic controllers, the stabilization control of the car pedal pressing system with system performance demonstrated encouraging results.
Finally, the PSO implementation eliminated the laborious task of manually tuning the controller. Instead, the process of finding the best scaling factors for controllers benefits from the optimization technique. Additionally, optimization based on several variables affects how effective controllers are and provides a wide range of alternatives for selecting the best controller for an automatic car pedal pressing system.
The data used to support the findings of this study are available from the corresponding author upon request.
The authors declare that they have no conflicts of interest.