Automatic Code Generation of Real Time Nonlinear Model Predictive Control for Plug in Hybrid Electric Vehicle Intelligent Cruise Controllers
Control systems have always been a vital part of the novel technological advancements of human being in any industry, especially transportation. With the introduction of the idea of autonomous driving, classical control systems are not effective anymore and the need for intelligent control systems is inevitable. Advanced Driver Assistance Systems (ADASs) which are systems proposed to help drivers improve the process of driving, and Intelligent Transportation Systems (ITS) which are proposed to provide information that promotes more coordinated and more ecological driving, require novel intelligent controllers that are adaptive to driving conditions. Therefore, the development of different strategic vehicle control systems by employing state of the art intelligent control methods has been an active field of research in recent years. The highly variant nature of transportation implies that an effective intelligent control technique must be able to handle a large multi input multi output (MIMO) system with nonlinear complex dynamics. It must also store and analyse a large amount of data and information about the vehicle, its environment and traffic conditions in the process of decision making. Nonlinear Model Predictive Control (NMPC) as a unique optimal model based approach to intelligent control systems design, is a promising candidate that comprises all of these characteristics. The ability to solve constrained multi objective optimization problems with a predictive approach has made this technique powerful. However, NMPC controller developers face real time implementation challenges as this method suffers from huge computational loads. Hence, fast Real Time Optimization (RTO) methods are proposed to overcome this drawback. Optimization methods based on Generalized Minimum Residual (GMRES) method are examples of these RTO algorithms that have shown great potential for real time applications such as vehicle control. This thesis investigates the potential of employing GMRES based RTO algorithms to design intelligent vehicle control systems, in particular intelligent cruise controllers. Plugin Hybrid Electric vehicles (PHEVs) are introducing themselves as the future solutions for green and ecological transportation, the thesis also introduces an intelligent cruise controller for the Toyota Prius 2013 PHEV. To this end, an automatic multi solver NMPC code generator based on GMRES based RTO algorithms is developed in MATLAB. The user friendly environment of this code generation tool allows the user to easily generate NMPC controller codes for further model in the loop (MIL) and hardware in the loop (HIL) simulations. Simulations are performed for two different driving scenarios: driving on hilly roads and a car following scenario. In the case of driving on hilly roads, a comparative study is conducted between different real time optimizers and it is concluded that the Newton/GMRES algorithm is faster than the Continuation/GMRES algorithm.