Journal on Advanced Research in Electrical Engineering, Vol. 6, No. 2, Oct. 2022 130 © 2022 by the authors. This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. How to cite: Fatoni, A., Iskandar, E., & Alya, Y. (2022). Tracking Control of Autonomous Car with Attention to Obstacle Using Model Predictive Control. JAREE (Journal on Advanced Research in Electrical Engineering), 6(2). Tracking Control of Autonomous Car with Attention to Obstacle Using Model Predictive Control Ali Fatoni Department of Electrical Engineering Institut Teknologi Sepuluh Nopember Surabaya, Indonesia fatoni@ee.its.ac.id Eka Iskandar Department of Electrical Engineering Institut Teknologi Sepuluh Nopember Surabaya, Indonesia iskandar@elect-eng.its.ac.id Yasmina Alya Department of Electrical Engineering Institut Teknologi Sepuluh Nopember Surabaya, Indonesia yasminaalya@gmail.com AbstractPrevious research of Model Predictive Control (MPC) focused on the effect of cost function weights to its performance on path tracking and obstacle avoidance. The best performance was obtained when the error weight is greater than the input weight. However, the car movement was still oscillating and avoiding maneuver was still ineffective. Different from the previous research, this paper focuses on finding the best performance by varying the combination of MPC parameters while maintaining the cost function weight ratio following the previous research. This research uses Linear Time Variant MPC (LTV MPC).The trajectory tracking problem is defined by using a time-varying reference. MPC parameters combinations are varied to find the best performing design. In the obstacle avoidance system, obstacle detection is done by measuring the distance between the instant car position and the obstacle position. While an obstacle is detected, a new lateral position constraint is calculated. Trajectory tracking test are done using 2 types of tracks: sine wave and lane changing. Obstacle avoidance tests are done using 1 obstacle and 2 obstacles. Results are evaluated using Root Mean Square Error (RMSE) of car position, cost function, and the nearest distance between car and obstacle. Results show that MPC was able to evade obstacles while tracking the time-varying reference with 0.4 s delay. However, some variations were unable to meet the safe zone constraints for obstacle avoidance. KeywordsAutonomous Car, Model Predictive Control, Obstacle Avoidance, Trajectory Tracking. I. INTRODUCTION Development of control for autonomous vehicles has grown rapidly. The first autonomous car was a radio- controlled car called the “Linriccan Wonder”, developed in 1926 [1]. While in this 21st century, self-driving features are already implemented into several cars. Features includes Cruise Control and Active Lane Assist [2]. However, features only acts as driving aid; it does not allow the car to run without a driver. To realize a fully unmanned autonomous car, a reliable autonomous system is needed. A fully autonomous car, as explained in SAE J306, is a car that can run in any condition without driver’s intervention. By way of explanation, the Driver Assist System (DAS) handles all the Dynamic Driving Task (DDT) [3]. 2 tasks of DDT are lateral and longitudinal control as well as response to objects and other events. Much research has been done to develop das. One particular research is the use of Model Predictive Control (MPC) for path tracking and obstacle avoidance. [4] proved MPC can control the car to follow the path while evading obstacles. The research focused on the effect of cost function weights to its performance on path tracking and obstacle avoidance. The best performance was obtained when the error weight is greater than the input weight. However, the car movement was still oscillating and avoiding maneuver was still ineffective. To overcome the previous research’ problem, the writers propose to use a Linear Time Variant MPC (LTV MPC) for path tracking and obstacle avoidance. In this paper, cost function weight ratio is maintained following [4]. Instead, in this paper the combination MPC parameters, namely the Prediction Horizon (Np) and Control Horizon (Nc), are varied to find the best performing design. II. METHODS A. Related Works Current research on autonomous car control includes the usage of MPC as its controller. One of them is the research of MPC ability to handle path tracking and obstacle avoidance problem as done in [4]. In the research, it was found that when the error weight is greater than the input weight in cost function formulation, it produces the least oscillating car movement. It was also proven that MPC can handle initial position error to the desired path. Obstacle avoidance tests were done by placing 3 static obstacles along the reference path. Results showed the car was able to follow the path while evading obstacles. Even though evading maneuver seemed to be ineffective from the fact that it moves farther away from what is needed to avoid the obstacle. B. Literature Review 1) Kinematic Car Model One of the well-known models used to describe vehicle kinematics is called the Bicycle Model. In Fig.1, the vehicle has 2 wheels, the front and the back. The back wheel is attached to the vehicle body and the front wheel can rotate about the vertical axis of vehicle to turn it. the vehicle’s velocity in global coordinate is ( cos  ,  sin ) . The kinematic equation is defined by with L as car length, V as the velocity, and θ as the heading angle. Hence, ̇ is the turning rate [5]. ̇ =  () ̇ =  sin() ̇ = tan() (1)