| In recent years,the proportion of accidents caused by lane departures has been on the rise.Lane keeping system(LKA)is used to control the driving track of vehicles to fit the lane centerline,which is provided with the function of preventing vehicles from deviating from the current lane and causing traffic accidents,so it has been widely studied in recent years.The main content of this paper is to study lane detection and lane keeping algorithm.The lane model based on image information is established and LKA is designed according to vehicle dynamics and kinematics.Finally,the real-time and effectiveness of the algorithm is verified by software-in-the-loop method.The main work of this thesis is as follows:(1)A three-stage method,including image pre-processing module,pavement marking detection network and post-processing segmentation algorithm,was proposed to achieve road marking segmentation.The image pre-processing module uses the antilog transformation method to enhance the lane information on the road surface,and then uses the sparse vanish point detection algorithm to segment the road surface area in the picture of vehicle front-view.The second stage of the road marking detection network is the core part,which is a well-designed lightweight network.We modified the network structure of Mobile Net and hard-optimized the activation function to improve the real-time performance of the network,and added a dual-channel Siamese attention mechanism to improve the detection accuracy of it.At the post-processing segmentation stage,based on the output of the detection network,all the lane detection boxes are clustered according to the gradient similarity criterion,and all the detection boxes belonging to the same lane line are merged to the maximum stable external area(MSER).Finally,binary segmentation of each MSER region can obtain lane position information at the pixel level.(2)The transformation of coordinate system and the vehicle dynamics model have been studied.In order to complete the modeling of the lane,four main coordinate systems are introduced in this thesis.Through the mutual conversion between the four coordinate systems,the parametric modeling of the lane line can be achieved based on the lane semantic segmentation,so that the relative position of the vehicle and the lane line can be obtained through the coordinate transformation relationship.Then,the vehicle dynamics and kinematics model was established based on the bicycle model,which can lead to more accurately lateral control on the vehicle by using lane keeping algorithm designed in this thesis.(3)The local path planning algorithm and model predictive control(MPC)algorithm based on cubic spline curve was studied in the thesis.According to the working conditions of the lane keeping system,four trajectory planning constraints are proposed according to the relevant testing standards,and the rationality of these four constraints is verified by MATLAB simulation experiments.After obtaining the expected trajectory,a five-point preview-based MPC algorithm was proposed and a vehicle lateral control model built in the thesis.(4)We created a variety of road scenarios through Prescan.The vehicle model and visual sensor model are built in Car Sim.LKA system simulation framework including sub-module of image preprocessing,lane detection and tracking,vehicle position feedback,simulation result visualization,are created in Simulink.Finally,under 12 different combinations of different speeds(80km/h and 100km/h),different sections(big curvature and small curvature high way),and different weather(sunny,rainy,night),the real-time performance of the proposed lane detection algorithm and the effectiveness of the LKA are verified by the joint simulation of Car Sim and Simulink. |