A road longitudinal slope estimation method based on the fusion of machine vision and vehicle dynamics
Through the fusion method of machine vision and vehicle dynamics, combined with fuzzy control theory and Kalman filter algorithm, the problem of filter divergence and unknown road surface conditions in road longitudinal slope estimation is solved, the estimation accuracy and anti-interference ability are improved, and low Accurate slope estimates of costs.
Patent Information
- Application Number
- CN202410446946.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-04-12
AI Technical Summary
The existing technology has the problem that the filter is easy to diverge in road longitudinal slope estimation, and it cannot decouple the vehicle body posture and road information when the road surface conditions are unknown, and the sensor accuracy and anti-interference requirements are high.
Using the method of integrating machine vision and vehicle dynamics, combined with fuzzy control theory and Kalman filter algorithm, through fuzzy adaptive unscented Kalman filter (FAUKF) and LaneNet, HNet and other algorithms, visual and dynamic information are integrated to perform longitudinal slope Estimation, reducing noise interference and initialization error.
It improves the accuracy and anti-interference ability of road longitudinal slope estimation, reduces computational complexity and cost, and achieves accurate slope estimation under unknown road conditions.
Smart Images

Figure CN118350120B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation systems and autonomous driving technology, and in particular relates to a method for estimating the longitudinal slope of a road based on the fusion of machine vision and vehicle dynamics. Background Art
[0002] Longitudinal slope recognition is an important research direction in the field of intelligent transportation systems and autonomous driving, especially in the field of automotive ADAS (Advanced Driver Assistance System). It mainly involves detecting and identifying the longitudinal slope of the road, providing key information for autonomous driving, vehicle dynamics control and energy management. At present, the methods for estimating road slope at home and abroad are mainly divided into two categories, one is the identification method based on the installation of external sensors on the vehicle, and the other is the estimation method based on the longitudinal dynamics or kinematics of the vehicle. In general, in the current research on longitudinal road slope estimation, there is a lack of a method that can decouple the body posture and road information when the road conditions are unknown. The dynamic slope estimation method based on Kalman filtering has high requirements for model accuracy, and when the disturbance is too large, the filter is prone to divergence. The estimation method based on the sensor has high requirements for the accuracy and anti-interference of the sensor. Therefore, the present invention firstly targets the problem that the filter is easy to diverge when the disturbance is too large, and combines fuzzy control theory to adaptively process the noise. Secondly, the method of fusion of machine vision and dynamics is used to balance the impact of the filter initialization error. Summary of the invention
[0003] In view of the shortcomings of the prior art, the present invention provides a road longitudinal slope estimation method (VB-FAUKF) that integrates machine vision and vehicle dynamics to improve the accuracy of road longitudinal slope estimation and provide guarantee for intelligent and safe driving of vehicles.
[0004] The present invention is achieved through the following technical solutions:
[0005] A method for estimating the longitudinal slope of a road by integrating machine vision and vehicle dynamics comprises the following steps:
[0006] S1. Estimation of road longitudinal slope based on vehicle dynamics:
[0007] S2, road longitudinal slope estimation based on machine vision;
[0008] S3, road longitudinal slope estimation based on fusion of machine vision and Kalman filter;
[0009] S4. Conduct actual vehicle test verification and analysis on road longitudinal slope estimation.
[0010] Furthermore, the specific operations of step S1 are as follows:
[0011] Based on the vehicle longitudinal dynamics model, the state space equation is established, and the longitudinal slope of the road is estimated by the unscented Kalman filter (UKF) algorithm. The UKF longitudinal slope estimation model is derived. On this basis, the fuzzy adaptive FA module is added. By combining the unscented Kalman filter algorithm with the fuzzy control theory to solve the noise interference problem existing in the conventional unscented Kalman filter, the FAUKF algorithm with the longitudinal slope estimation function is formed, and the state noise covariance matrix Q is estimated online. k and the observation noise covariance matrix R k Through CarSim-Simulink joint simulation, simulation tests are carried out under sinusoidal ramp environments to compare and analyze the errors in longitudinal slope estimation.
[0012] Furthermore, the specific operations of step S2 are as follows:
[0013] According to the principle of image perspective, the relationship between the longitudinal slope of the road and the lane line coordinate points is found. The image of the road ahead is obtained through a monocular camera, and the LaneNet lane line detection algorithm is used to extract the road lane line fitting function. After that, the HNet lane line fitting function is used to obtain the coordinates of the preview point, and then a more accurate estimation of the longitudinal slope of the road is made; and simulation verification is carried out based on the PreScan platform.
[0014] Furthermore, the specific operations of step S3 are as follows:
[0015] Firstly, the influence of the initial error of Kalman filter on the filtering accuracy is analyzed. Secondly, in order to solve the oscillation problem caused by the initialization error, the visual estimation result is used as the initialization of the Kalman filter estimation result to perform longitudinal slope estimation and filtering fusion. Finally, CarSim, PreScan and Simulink are used to conduct joint simulation experiments.
[0016] Furthermore, the specific operations of step S4 are as follows:
[0017] A specific actual road section was selected, and data and images were collected based on the on-board CAN bus and monocular camera, and the road longitudinal slope estimation algorithm was verified through actual vehicle tests.
[0018] Furthermore, in the step S2, the specific operation of obtaining the preview point coordinates through the HNet lane line fitting function is as follows: a perspective transformation matrix is obtained by a deep learning-based method. In terms of algorithm implementation, an HNet neural network structure is designed and trained to generate perspective transformation matrix coefficients; and an Adam optimizer is used to train the HNet network structure.
[0019] Beneficial technical effects of the present invention:
[0020] (1) The present invention combines fuzzy control theory with unscented Kalman filtering and proposes a fuzzy adaptive unscented Kalman filter (FAUKF). By adaptively adjusting the noise covariance, the present invention can effectively cope with the interference caused by uncertain noise during vehicle driving.
[0021] (2) Aiming at the problem that the current road longitudinal slope estimation cannot estimate the road longitudinal slope when the road ahead is unknown, a road longitudinal slope estimation method based on machine vision is proposed. The invariant properties of the road image inherited from the actual three-dimensional terrain are analyzed by the principle of image perspective, and the road longitudinal slope angle estimation method is obtained. This method does not require complex calculations and has low cost.
[0022] (3) Considering the impact of initialization error on the estimation accuracy of the longitudinal slope of the road when using Kalman filter for road longitudinal slope estimation, it is proposed to use LaneNet and HNet together to accurately estimate the longitudinal slope of the road. Then, the visual estimation result is used as a priori estimation and used as the initialization of Kalman filter to achieve fusion processing. This fusion method can effectively suppress the estimation oscillation caused by the initial error and greatly improve the accuracy of longitudinal slope estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is the vehicle longitudinal dynamics model;
[0024] Figure 2 Implement a flow chart for slope estimation based on improved UKF;
[0025] Figure 3 This is the FAUKF flow chart;
[0026] Figure 4 It is a schematic diagram of the fuzzy reasoning process;
[0027] Figure 5 This is a driving data diagram of a vehicle on an uphill road;
[0028] Figure 6 This is the simulation result diagram of the uphill section;
[0029] Figure 7 This is a vehicle driving data diagram on a downhill section;
[0030] Figure 8 This is the simulation result diagram of the downhill section;
[0031] Fig. 9 It is a vehicle driving data diagram of a sine-transformed road section;
[0032] Fig.10is the estimated result of the downhill slope of the sinusoidal slope;
[0033] Fig.11 This is a partial enlarged picture of the simulation results of the sinusoidal slope section;
[0034] Fig.12 is the camera imaging model;
[0035] Fig.13 It is a schematic diagram of a straight structured road with a longitudinal slope;
[0036] Fig.14 This is a downhill model diagram;
[0037] Fig.15 The overall structure of the network;
[0038] Fig.16 This is the lane line detection result map;
[0039] Fig.17 is the visual longitudinal slope estimation error map;
[0040] Fig.18 This is the dynamic characteristic diagram when the slope is 3° when going uphill;
[0041] Fig.19 It is the dynamic characteristic diagram of downhill section;
[0042] Fig. 20 It is a fusion flow chart;
[0043] Fig.21 This is the simulation result diagram of the uphill section;
[0044] Fig. 22 This is the simulation result diagram of the downhill section;
[0045] Fig.23 This is the result diagram of sine transform road slope estimation;
[0046] Fig.24 This is a partial enlarged picture of the simulation results of the sinusoidal slope section;
[0047] Fig.25 This is a diagram of the actual vehicle verification platform;
[0048] Fig.26 is the vehicle longitudinal speed diagram;
[0049] Fig. 27 is the vehicle motor torque diagram;
[0050] Fig.28 This is the lane line detection result map;
[0051] Fig.29 This is a diagram of the actual vehicle test results. DETAILED DESCRIPTION
[0052] 1. Road longitudinal slope estimation based on vehicle dynamics
[0053] 1.1 Vehicle dynamics model
[0054] The vehicle dynamics model with slope is as follows Figure 1 As shown, the vehicle is affected by driving force, rolling resistance, slope resistance, air resistance, etc. when driving on an uphill road.
[0055] When only the longitudinal motion is considered, the vehicle longitudinal dynamic equation is obtained according to Newton's law:
[0056]
[0057] Where δ is the rotation mass conversion factor; m is the vehicle mass; v is the vehicle longitudinal velocity; F j F is the acceleration resistance; t F is the driving force of the vehicle; f F is the rolling resistance; i is the slope resistance; F w is air resistance.
[0058] 1.2 Establishment of system differential equations
[0059] Before establishing the vehicle driving state space equation, we first assume that the mass m remains unchanged during the vehicle driving process and the vehicle only moves longitudinally. As mentioned above, the road slope is generally small, so it is approximately θ≈sinθ≈tanθ, cosθ=1. The maximum legal driving speed of domestic vehicles is 120km / h. The driving distance of the vehicle in one time step is small, so it is assumed that the rate of change of the road slope in one time step is The longitudinal speed of the vehicle and the longitudinal slope of the road are set as the state variables of the system, that is, x = [v, θ] T , then the system differential equation is
[0060]
[0061] 1.3 Fuzzy Adaptive UKF (FAUKF) Longitudinal Slope Estimation Model
[0062] Conventional unscented Kalman filter estimation is based on the assumption that the noise covariance is constant and known, and the noise covariance directly affects the quality of the estimation. However, in the actual assumption environment, there is uncertainty and dynamic interference, and the estimation effect of the conventional UKF algorithm is greatly reduced, and even causes filter divergence.
[0063] In order to overcome the influence of uncertainty noise on the estimation effect, this embodiment proposes a fuzzy adaptive UKF algorithm (FAUKF), which is extended and applied to nonlinear systems to achieve slope estimation of nonlinear systems. The slope estimation model of FAUKF is as follows: Figure 2 shown.
[0064] The fuzzy adaptive UKF algorithm (FAUKF) adds a fuzzy adaptive module to the unscented Kalman filter algorithm, that is, the measurement noise covariance and system noise covariance are adjusted online through the fuzzy inference system, so that the filter estimation algorithm is as close to the actual noise level as possible, solving the problem of poor slope estimation caused by uncertainty noise interference. At the same time, this has important practical significance for improving the anti-interference and robustness of slope estimation, and thus improving the accuracy of slope estimation.
[0065] 1.4 Fuzzy Adaptive Module (FA) Design
[0066] Fuzzy adaptive UKF (FAUKF) is an improvement on the conventional UKF algorithm. Figure 3 As shown in the figure, the fuzzy adaptive correction module added in the algorithm process is based on the stability of the new information data and the estimation results. k and Q k Online correction makes the estimated result closer to the true value.
[0067] Fuzzy Inference System (FIS) specific algorithm is as follows Figure 4 Before designing fuzzy rules, we first define the input and output variables, which must be related to R. k and Q k First, define the new information in the UKF filtering process as
[0068]
[0069] Then the actual residual variance matrix of the system is
[0070] Where N is the sliding time window of the new information series. The size of N can be defined by yourself to play the role of data smoothing. According to formula (5), the system theoretical residual variance is Define the ratio a between the two k for
[0071]
[0072] It can be seen from equations (4) and (5) that when the filter estimation reaches the optimal estimation state, a k ≈1. When the theoretical residual variance deviates from the actual residual variance, the error can be corrected by adjusting R k Make a k is close to 1. Therefore, equation (5) becomes:
[0073]
[0074] In the formula, ε kis the adjustment factor. When the actual value of the system measurement noise is greater than the given value, a k >1, then ε can be increased k , so that a k Return to near 1; when the actual value of the system measurement noise is less than the given value, a k <1, then ε can be reduced k . Define a rate of change of the estimated value related to the noise covariance
[0075]
[0076] When the state estimate oscillates or changes greatly, b k-1 will increase, which further indicates that the estimation effect is unstable or even divergent. k To reduce the effect of old data on filtering and enhance the memory of new data, thereby improving the stability and accuracy of estimation. Define the adjustment parameter σ of the process covariance k
[0077] Q k =σ k ×Q (8)
[0078] Where Q is a constant, σ k ≤1. When the filter estimate is in a stable state, σ k ≈1, otherwise the filter is in an unstable state k <1.
[0079] The input variable of the FIS system is defined as a k and b k-1 , the output variable is ε k and σ k Based on the above relationship analysis of input and output variables, the fuzzy logic rules can be defined as follows:
[0080] (1) If {a k ≈1 and b k-1 ≈0}, then {ε k unchanged, σ k Also unchanged}
[0081] (2) If {a k ≈1 and b k-1 >0}, then {ε k unchanged, σ k Decrease}
[0082] (3) If {a k >1 and b k-1 ≈0}, then {ε k Increase, σ k constant}
[0083] (4) If {a k >1 and b k-1 >0}, then {ε k Increase, σ k Decrease}
[0084] (5) If {a k <1 and b k-1 ≈0}, then {ε k Reduce, σ k constant}
[0085] (6) If {a k <1 and b k-1 >0}, then {ε k Reduce, σ k Decrease}
[0086] a k The membership description of includes three linguistic values {small, equal, large}, combined with two membership function types: triangular and trapezoidal. k-1 The membership function is trapezoidal and contains only two linguistic values {small, equal}. Its corresponding output ε k and σ k The membership degree of is similar to that of the input. The most commonly used centroid method is used for anti-fuzzy calculation.
[0087] 1.5 Simulation test based on CarSim-Simulink
[0088] 1.5.1 Simulation Settings
[0089] A road model is established through the CarSim platform, and virtual sensors are installed on the vehicle to obtain driving data. A C-class simulation vehicle is selected, and its relevant parameters are shown in Table 1.
[0090] Table 1 Simulation vehicle related parameters
[0091] Parameter name symbol Parameter Value Vehicle weight / kg m 1412 <![CDATA[Vehicle cross-sectional area / m 2 > A 2.2 Air resistance coefficient <![CDATA[C D ]]> 0.3 Rolling resistance coefficient <![CDATA[f r ]]> <![CDATA[3.8*10 -3 +2.6*10 -5 *in]]> Mechanical efficiency η 0.8 Transmission ratio <![CDATA[i g ]]> 1~4.38 <![CDATA[Acceleration due to gravity m / s 2 > g 9.8 Wheel radius / m r 0.325 <![CDATA[Air resistance kg / m 3 > ρ 1.206 Gear Ratio <![CDATA[i0]]> 4.1
[0092] 1.6.2 Simulation results and analysis
[0093] In this section, a 500-meter-long uphill and downhill road section with a slope of 2-5° is set up. There are no curves on this road section. First, the effectiveness of the algorithm is verified based on the road conditions set above. The traditional UKF algorithm and the improved FAUKF algorithm are used to realize slope estimation. The effectiveness and robustness of the proposed algorithm are verified through comparative experiments. Random noise is set in the simulation process. The vehicle driving data on the uphill section is as follows: Figure 5 As shown in Figure 2, the simulation results of the uphill section are as follows: Figure 6 As shown in Figure 2, the vehicle driving data on the downhill section is as follows: Figure 7 The simulation results are shown in Figure 8 As shown in Figure 2, it can be seen that the estimation accuracy of FAUKF is significantly higher than that of UKF, whether in uphill or downhill sections.
[0094] In order to further verify the tracking performance of slope estimation under real-time slope changes, a 1500-meter sinusoidal slope section was set up, including uphill, downhill and flat sections. Fig. 9 This is the trajectory diagram of the driving data changing with time when the vehicle is driving on a sinusoidal slope. Fig.10 is the slope estimation result of the sine slope, Fig.11 This is a partial enlarged picture of the sinusoidal road simulation result. Fig.10 It can be seen that on a sinusoidally changing slope, the FAUKF algorithm proposed in the present invention can also estimate the road slope more accurately, and has higher accuracy and stronger adaptability than the traditional UKF.
[0095] 2. Road longitudinal slope estimation based on machine vision
[0096] The image perspective principle is used to find out the intrinsic invariant properties of the two-dimensional image inherited from the three-dimensional scene, and based on this information, uphill and downhill road models are established respectively and the expression of the longitudinal slope of the road is derived.
[0097] 2.1 Solution of the longitudinal slope of uphill road
[0098] like Fig.12 As shown in Figure 1, it is assumed that a camera is placed on the vehicle. The optical center position of the camera is O c (X=0,Y=0,Z=0), where X is the horizontal axis in the positive direction of the right side, Y is the vertical axis in the positive direction of the upper side, and Z is the vertical axis in the positive direction of the front side, which is the same as the direction of vehicle movement. Point R is the origin of the image, corresponding to O c , P i (X i ,Y i ,Z i ), which is a point in the actual 3D environment, where i represents the i-th point. The corresponding 2D point in the image is p i (u i ,v i ), which represents the pixel position in the image.
[0099] According to the camera imaging principle, we can get: i =X i f i ,v i =Y i f i (9)
[0100] In the formula, u iis a point on the u-axis of the two-dimensional image coordinate system, v i is a point on the v-axis of the two-dimensional image coordinate system, and f is the focal length of the camera.
[0101] Assume that the camera is located at a distance H from the ground c =1.2m height. L and R are left and right lane lines respectively. l1 , P r1 , P l2 , P r2 are points on the lane line respectively. According to the camera imaging principle, the expression is established:
[0102] Where d = P l P r is the actual width of the lane; p l p r is the corresponding distance in pixels in the two-dimensional image; D is the distance from the camera to the horizontal line P l P r The vertical distance.
[0103] like Fig.13 As shown in the figure, (a) is the main view of a straight structured road with a longitudinal slope, and (b) is the side view. The figure shows the scene when a vehicle is driving on a road with a longitudinal slope. The blue triangle is a simplified camera model. The camera is installed on the vehicle body. C is the height of the camera from the ground, and β is the longitudinal slope angle of the road. al , P ar With P bl , P br The preview line L a , L b The intersection with the lane line, the slope is around the preview line L a The slope changes around the midpoint P of (b). a The point where the slope changes can be obtained by extracting several feature points on opposite sides of the lane line in the image and calculating the slope between two adjacent feature points on the same side of the lane line. The change in the slope of the road surface can be obtained based on the change in the slope of the lane line in a single frame of the image information. In this way, the geometric characteristics of the road can be intuitively found, and the distance information can be obtained through the lane width and formula (10):
[0104] On an uphill section, the vertical axis on any road line is:
[0105] where v b is the preview line L in the image coordinate system b The ordinate of the intersection point with the lane line, so according to formula (12), the longitudinal slope of the road can be deduced as:
[0106] 2.2 Solution of the longitudinal slope of downhill road
[0107] like Fig.14 As shown in the figure, when the vehicle is on a downhill section, it is difficult to use the uphill model to estimate based on the road information ahead. At this time, the downhill slope estimation model is derived based on the geometric relationship. The idea is that when the foreseeable distance D is the smallest, the downhill tangent is equal to the camera height H C Multiply by D min The ratio of
[0108] By tracking the lane lines in the image information and estimating the maximum foreseeable longitudinal distance through equation (10), when the maximum longitudinal distance becomes the minimum, the longitudinal slope of the downhill road is obtained through equation (14).
[0109] 2.3 Lane Detection Algorithm
[0110] Through the above principle analysis, we can get the road longitudinal slope and distance information D b , D min The relationship formula between the coordinates of the auxiliary points is as follows. This embodiment takes a structured road as an example. The LaneNet algorithm with high detection accuracy and good real-time performance is used for detection, and a new network HNet is constructed to learn the perspective transformation parameters of a given input image. The perspective transformation can fit the lane lines on the slope road well and overcome the problem of poor robustness. The specific flow chart is as follows Fig.15 shown.
[0111] 2.3.1 LaneNet Lane Line Recognition
[0112] The LaneNet network structure has two decoding branches, namely Segmentation branch and Embedding branch. Segmentation branch is responsible for semantic segmentation of the input image (classifying pixels into two categories, determining whether the pixels belong to the lane line or the background) to obtain a binary image. The loss function uses the standard cross entropy loss function, and the cross entropy formula is expressed as:
[0113]
[0114] Where p(x i ) represents the true probability distribution, q(x i ) represents the predicted probability distribution.
[0115] The Embedding branch is responsible for embedding pixels, and the trained embedding vector is used for clustering. After training, the branch network outputs a lane line pixel distance. Based on the basic idea that the distance between pixels belonging to the same lane is close and the distance between pixels of different lane lines is far, the clustering loss function is used to cluster the lane lines. The clustering loss function is:
[0116]
[0117] Where, [x] + =max(0,x), C represents the number of lane line instances, N c Represents the number of pixels in each lane line instance, μ c represents the pixel center of each lane line instance, L var is the variance loss, the purpose is to reduce the intra-class distance, L dist It is the distance loss, and its purpose is to increase the inter-class distance (the distance between different lane lines).
[0118] 2.3.2 HNet lane line fitting
[0119] In order to ensure the robustness of the lane detection algorithm in the presence of uphill and downhill road surface changes, a deep learning-based method is used to obtain the perspective transformation matrix. In terms of algorithm implementation, the HNet neural network structure is designed and trained to generate the perspective transformation matrix coefficients. The HNet deep neural network structure consists of a continuous block of convolutional layers with a convolution kernel of 3×3, BN layers, and ReLU layers. A maximum pooling layer is used to reduce the dimension, and two fully connected layers are added at the end.
[0120] Through the HNet network structure, we can get a perspective transformation matrix with 6 degrees of freedom. The formula is:
[0121]
[0122] The overall network structure is shown in Table 2. The number of nodes in the last fully connected layer is 6, corresponding to the 6 parameters in the H matrix. The perspective transformation matrix output by HNet is used for perspective transformation, and the transformed lane line pixels are fitted in the transformed bird's-eye view. The fitting result is then back-projected to finally obtain the lane line fitting result in the original image space, that is, the mathematical parameter model of the lane line, thereby completing the detection of the lane line. Among them, the curve fitting adopts the idea of least squares fitting, and the third-order polynomial is fitted.
[0123] Table 2 HNet network structure
[0124] Type Filters Size / Stride Output Conv+BN+ReLU 16 3×3 128×64 Conv+BN+ReLU 16 3×3 128×64 Maxpool 2×2 / 2 64×32 Conv+BN+ReLU 32 3×3 64×32 Conv+BN+ReLU 32 3×3 64×32 Maxpool 2×2 / 2 32×16 Conv+BN+ReLU 64 3×3 32×16 Conv+BN+ReLU 64 3×3 32×16 Maxpool 2×2 / 2 16×8 Linear+BN+ReLU 1×1 1024 Linear 1×1 6
[0125] In this example, the Adam optimizer is used to train the HNet network structure, the batch size is set to 10, and the learning rate is set to 5×10 -3 The loss function used to train the network parameters of HNet is defined as the square difference between the horizontal coordinate value of the lane line point after the lane line is fitted and inversely transformed back to the original image space and the true value, as shown in formula (18):
[0126]
[0127] 2.4 Simulation test
[0128] 2.4.1 Simulation scene construction
[0129] To verify the effectiveness of the visual algorithm, several road models with different longitudinal slopes were built using the PreScan software. Roads with longitudinal slopes of about 2°-5° were designed respectively. The road model only considered straight roads. The vehicle was placed at the center of the road before the slope turning point, and a camera sensor was installed 1.2m above the ground to obtain image information of the structured road ahead.
[0130] 2.4.2 Visual estimation results and analysis
[0131] Fig.16 The lane line result map detected in the simulation environment. The pixel coordinates detected by the lane line are substituted into formulas (13) and (14) to solve the longitudinal slope of the road ahead. Fig.17 This is the error map of the visual estimation result.
[0132] Tables 3 and 4 are the estimation error tables for uphill and downhill sections respectively. In the experiment, it is assumed that the lane width in the image is the distance between points with the same v-axis value. Fig.13 (b) The ramp is tilted at point P b It has been found. By analyzing the test results, it can be found that the estimation effect of the uphill section is more accurate than that of the downhill section. The maximum estimation error of the uphill section is 0.0525°, and the estimation error is the largest when the slope is 3°; the minimum error is 0.027°, and the estimation error is the smallest when the slope is 5°. The estimation errors are all controlled within 0.1°. The overall trend is that the greater the slope, the higher the estimation accuracy, but when the slope is 3°, the estimation error is larger. The maximum estimation error of the downhill section is 0.068°, and the estimation error is the largest when the slope is 3°; the minimum estimation error is 0.063°, and the estimation error is the smallest when the slope is 2°. The overall estimation error is controlled within 0.1°. The errors of the uphill section and the downhill section are all controlled within 0.1°, which meets the accuracy requirements of the subsequent algorithm fusion.
[0133] Table 3 Uphill section estimation error table
[0134] True value 2° 3° 4° 5° Estimated value 2.0471° 3.0525° 4.046° 5.027° Absolute error 0.0471° 0.0525° 0.046° 0.027°
[0135] Table 4 Downhill section estimation error table
[0136] True value 2° 3° 4° 5° Estimated value 2.063° 3.068° 4.065° 5.066° Absolute error 0.063° 0.068° 0.065° 0.066°
[0137] For uphill and downhill sections, we can respectively calculate D in equation (13): b and D in formula (14) min Analyze to obtain the dynamic characteristics of uphill estimation and downhill estimation. Fig.18 The dynamic characteristic diagram of the slope estimation value and absolute error when the road slope is 3°. It can be seen that when D b When the estimate is close to 34, the absolute error is the smallest. b The error starts to increase when the estimate is less than or greater than 34, but as can be seen from the blue line, the error does not exceed 1°.
[0138] Fig.19 is the dynamic characteristic diagram of the downhill section. When the road ahead is a downhill section, the slope estimation value and the minimum distance D min Strong correlation, through Fig.19 It can be seen that when D min When the slope is between 10 and 40, the slope can be estimated to be between 2 and 7°. min The error will lead to the error of slope estimation. For the road ramp with lower slope, the robustness of this algorithm is higher. The structured road longitudinal slope estimation method based on machine vision can effectively estimate the slope of the unknown road ahead.
[0139] 3. Road longitudinal slope estimation based on fusion of machine vision and Kalman filter
[0140] Firstly, by analyzing the influence of the initial deviation of the Kalman filter on the filter estimation, it is concluded that the initialization deviation has a great influence on the convergence result of the algorithm. Therefore, a machine vision and fuzzy adaptive unscented Kalman filter fusion method (VB-FAUKF) is proposed. By using the machine vision estimation result as the initialization of the Kalman filter estimation, the estimation accuracy of the algorithm is improved. Through simulation experiments, the superiority of the VB-FAUKF proposed in this paper is verified.
[0141] 3.1 Longitudinal slope estimation filter fusion model
[0142] Since the filter initialization error has a great impact on the subsequent filtering accuracy, the road slope estimation based on machine vision is solved by geometric relationship analysis of the front road image inheriting the two-dimensional invariant properties of the three-dimensional road, which is equivalent to making a priori estimation before the dynamic estimation. Therefore, the visual estimation result is considered as the initialization of the Kalman filter estimation. The fusion flow chart is as follows: Fig. 20 shown.
[0143] The road slope value estimated based on machine vision is used as the input for initializing the Kalman filter estimation. Therefore, the visual estimation result can be regarded as the optimal estimation value at the previous moment, that is, Where β is the slope estimation result based on machine vision.
[0144] At this time, for the given state estimate at the previous moment and its covariance matrix P k-1|k-1 , obtain 2n+1 sigma points through UT transformation and its weight coefficient.
[0145]
[0146]
[0147] For the sigma point obtained by UT transformation The further prediction value is
[0148]
[0149] Then, the sigma point and covariance weight coefficient can be predicted based on the one-step The covariance matrix of the one-step prediction value and prediction error of the state estimation is obtained as
[0150]
[0151] Obtain the one-step prediction of the measurement. First, use the UT transformation to obtain The corresponding sigma point is
[0152]
[0153] For sigma point The further prediction value is
[0154] Further predicted values based on sigma points and the expected weight coefficient The further predicted value of the measurement is calculated to be
[0155] According to the covariance weight coefficient Calculate the covariance matrix of the measurement error Simultaneously calculate the cross-correlation covariance matrix of the state estimate and the measured variable
[0156]
[0157] After obtaining the new measurement value zk After that, the filter is updated to obtain the Kalman gain, and the next step is to estimate the optimal estimate and the covariance matrix of the estimate.
[0158]
[0159] 3.2 CarSim-PreScan-Simulink joint simulation test
[0160] In order to verify the feasibility of the algorithm, this section conducts joint simulation based on CarSim-PreScan-Simulink, and compares the results of the fusion algorithm with those without fusion, thereby reflecting the advantages of the fusion algorithm. This paper compares and analyzes the longitudinal slope estimation results after fusion with FAUKF, UKF and the actual slope curve. The fixed slope uphill and downhill sections of 2°, 3°, 4°, and 5° and the sinusoidal ramp are established respectively. Fig.21 This is the simulation result diagram of the uphill section. Fig. 22 This is the simulation result diagram of the downhill section. Fig.23 This is the simulation result diagram of the sinusoidal ramp. Fig.24 This is a partial enlarged diagram of the sine transform ramp simulation result. The blue line in the figure is the true value of the slope, the orange line is the UKF estimation result, the green line is the FAUKF estimation result, and the red line is the VB-FAUKF estimation result. It can be seen from the figure that after the visual estimation result is used as the initialization of the Kalman filter, the oscillation error in the estimation process can be greatly reduced, making the estimated slope data smoother. At the same time, by comparing the estimation results under different slopes, it can be seen that VB-FAUKF greatly improves the accuracy of slope estimation compared with the other two algorithms.
[0161] In order to evaluate the estimation results of the three methods more objectively, the mean absolute error (MAE) and root mean square error (RMSE) are used as indicators to evaluate the estimation effects of the three methods. The specific calculation formula of the evaluation index is:
[0162]
[0163] Where n is the simulation time; e i is the estimated value at time i; a i is the true value at time i.
[0164] The error objective evaluation index in Table 5 shows that, compared with FAUKF, VB-FAUKF reduces the two evaluation indexes by 21.6% and 25.6% respectively on the uphill section with constant slope; by 34.7% and 43.5% respectively on the downhill section with constant slope; and by 30.6% and 41.3% respectively on the road with sine transformation. It can be seen more objectively that the fused VB-FAUKF has higher estimation accuracy.
[0165] Table 5 Objective evaluation index values of slope estimation results of simulation test
[0166] MAE UKF FAUKF VB-FAUKF Uphill 0.092 0.051 0.040 downhill 0.095 0.046 0.030 Sine 0.091 0.062 0.043 RMSE Uphill 0.180 0.125 0.093 downhill 0.225 0.154 0.087 Sine 0.194 0.138 0.081
[0167] 4. Real vehicle test verification and analysis of road longitudinal slope estimation
[0168] In order to further verify the effectiveness and feasibility of the algorithm in actual application scenarios, this embodiment collects real-time vehicle driving status data on actual longitudinal slope roads based on the CAN bus, and uses a monocular camera to collect road images. Based on the MatLab platform, the collected data and images are used to estimate the road slope, and the estimated results are compared with the slope measured by the level instrument to achieve offline verification of the algorithm.
[0169] 4.1 Real-time data acquisition and processing and test section calibration
[0170] 4.1.1 Real vehicle test data collection and processing platform
[0171] The test vehicle selected in this paper is the AutoBots-Pro-W4 medium-sized intelligent wire-controlled chassis vehicle. The actual vehicle verification platform is as follows Fig.25 As shown, (a) is a real picture of the real vehicle, and the relevant parameters of the real vehicle are shown in Table 6, (b) is a schematic diagram of the industrial computer and sensors, and the relevant parameters of the camera are shown in Table 7. The whole vehicle communication adopts two CAN bus communications, namely high-speed and low-speed CAN. The car supports remote control intelligence and manual operation driving. The whole vehicle has a symmetrical lightweight design front and back, with an empty vehicle mass of 800kg. It reserves intelligent driving multi-sensor wiring harnesses and hardware construction platforms. It can carry intelligent sensor equipment such as cameras and can be applied to autonomous driving scenarios and bench tests. This embodiment performs real-time processing and transmission of data based on the TSMaster platform.
[0172] Table 6 Test vehicle related parameters
[0173]
[0174]
[0175] Table 7 Monocular camera related parameters
[0176] Parameter name Parameter Value Sensor Specifications IMX291 COMS photosensitive chip Pixels 2.9×2.9um Resolution 1920*1080 Low light 0.0002Lux Maximum speed 30 frames / second focal length 2.8mm
[0177] 4.1.2 Test section slope measurement
[0178] The elevation of the test section was measured at fixed points using a level to obtain the measured elevation difference. According to the Highway Route Design Specifications JTGD20-2006, the longitudinal slope of the road is defined as
[0179] In the formula, i represents the road slope (percentage), h and l are the height and bottom length of the ramp, and θ is the slope angle. Based on the principle of slope measurement, the elevation information measured by the level can be fully utilized to obtain the required h. Because the slope angle is small, θ≈sinθ≈tanθ, so the bottom length l of the ramp is approximately equal to the length of the actual road section.
[0180] By measuring once every 0.5m with a level instrument, discontinuous slope information is obtained. According to the above method, it is impossible to obtain continuous slope information values for the entire road section. Therefore, in order to address the above problem, the quasi-cubic spline interpolation method is used to obtain the slope curve of the road section.
[0181] 4.2 Analysis of real-time data and test results of real vehicles
[0182] The vehicle driving data read through the CAN bus on the test section is as follows: Fig.26 and 27 shown. Fig.28 The lane lines are detected by the LaneNet algorithm. As can be seen from the figure, the lane lines can still be well detected and fitted in the scene with changing lighting. Fig.29 The test results are compared with the level measurement value as the reference value. The relative error of the UKF road slope estimation value is about 10%. Due to external disturbances, the driving data error oscillates, so the estimation result oscillates greatly. The absolute error of the FAUKF road slope estimation result can be controlled within 5%. Since FAUKF can adaptively adjust the noise covariance, it can better solve the oscillation problem of UKF. Fig.29 It can be seen that the estimated value of the VB-FAUKF algorithm is closest to the level measurement value, and the relative error of the VB-FAUKF algorithm can be controlled within 2%. Compared with FAUKF, the accuracy of slope estimation is greatly improved.
[0183] Table 8 shows the objective error evaluation indicators of the three algorithms. It can be seen that compared with UKF, the two error evaluation indicators of FAUKF are reduced by 44% and 45.2% respectively. Compared with FAUKF, the two error evaluation indicators of VB-FAUKF are further reduced by 28.6% and 29.4%. Obviously, the proposed VB-FAUKF algorithm greatly improves the accuracy of slope estimation. The test vehicle is a low-speed electric vehicle. Its suspension, tires and other structures are somewhat different from those of actual road vehicles. Especially at higher speeds, there may be problems with large dynamic estimation oscillations. However, the actual vehicle is smoother and more stable than the low-speed electric vehicle when driving. From the perspective of the test, the actual vehicle test is more conducive to improving the estimation accuracy. Therefore, although the road test uses a low-speed electric vehicle and is tested at low speed, it does not affect the effectiveness of the algorithm verification.
[0184] Table 8 Objective evaluation index values of slope estimation results of actual vehicle test
[0185] project UKF FAUKF VB-FAUKF MAE 0.025 0.014 0.010 RMSE 0.031 0.017 0.012
[0186] Based on the CAN bus and monocular camera, dynamic data of the real vehicle is collected, and then the longitudinal slope of the road in the real vehicle test section is calibrated using a level. The test results show that the slope estimation result is basically consistent with the actual slope value. At the same time, after introducing the visual estimation result as the initialization of dynamics to achieve fusion, the accuracy and convergence of the algorithm are greatly improved compared with a single algorithm, but the actual complex driving conditions will have a certain impact on the results.
[0187] Summary: (1) Longitudinal slope estimation algorithm based on dynamic model. Based on the longitudinal dynamic model, the state space equation of the vehicle driving on a sloped road surface is derived, and the slope is estimated by the UKF algorithm. In view of the fact that the conventional UKF algorithm cannot cope well with the dynamic uncertainty noise in the actual environment, a fuzzy adaptive UKF is proposed in combination with fuzzy reasoning. The effectiveness of the algorithm is verified by the CarSim-Simulink joint simulation platform. The experimental results show that this method meets the accuracy requirements to a certain extent, but the estimation accuracy of the algorithm is limited due to the large filter initialization error.
[0188] (2) Longitudinal slope estimation algorithm based on machine vision. In order to solve the problem that the traditional road slope estimation algorithm cannot estimate the longitudinal slope of the unknown road ahead, a road slope estimation method based on machine vision is proposed. With the help of the image perspective principle and geometric relationship, a simple analytical formula for the longitudinal slope of the road is derived. This method is only related to a few parameters, which greatly reduces the complexity of the algorithm. The estimation results of this algorithm on structured roads are relatively accurate.
[0189] (3) Slope estimation method based on the fusion of dynamics and machine vision. First, the influence of the initial error of the Kalman filter on the filter estimation accuracy is analyzed. In order to further improve the accuracy of slope estimation, the machine vision slope estimation result is used as the initialization of the dynamic estimation model to achieve the fusion processing of the two algorithms and increase the convergence and accuracy of the algorithm. A longitudinal slope joint estimation simulation platform is established based on CarSim-PreScan-Simulink to verify the effectiveness of the algorithm.
[0190] (4) Real vehicle test. We selected a real road section on campus, collected real vehicle driving data and images based on the CAN bus and monocular camera, and conducted experimental verification on the road longitudinal slope estimation algorithm. The experimental results show that the fusion algorithm has high estimation accuracy and robustness, and can achieve effective estimation of the road longitudinal slope at low cost under complex actual operating conditions.
Claims
1. A method for estimating the longitudinal slope of a road by integrating machine vision and vehicle dynamics, characterized in that: The steps include: S1. Estimation of road longitudinal slope based on vehicle dynamics: S2, road longitudinal slope estimation based on machine vision; S3, road longitudinal slope estimation based on fusion of machine vision and Kalman filter; S4. Conduct real vehicle test verification and analysis on road longitudinal slope estimation; The specific operation of step S1 is as follows: Based on the vehicle longitudinal dynamics model, the state space equation is established, and the longitudinal slope of the road is estimated through the unscented Kalman filter algorithm (UKF), and the UKF slope estimation model is derived. On this basis, the fuzzy adaptive FA module is added. By combining the unscented Kalman filter algorithm with fuzzy control theory to solve the noise interference problem existing in the conventional unscented Kalman filter, a FAUKF algorithm with longitudinal slope estimation function is formed, and the state noise covariance matrix is estimated online. and the observation noise covariance matrix Through CarSim-Simulink joint simulation, simulation tests were carried out under sinusoidal ramp conditions to compare and analyze the slope estimation errors. The specific operation of step S2 is as follows: The relationship between the longitudinal slope of the road and the lane line coordinate points is found based on the principle of image perspective. The front road image is obtained through a monocular camera, and the lane line fitting function of the road is extracted using the LaneNet lane line detection algorithm. The coordinates of the preview point are then obtained using the Hnet lane line fitting function, thereby making a more accurate estimate of the longitudinal slope of the road. Simulation verification is then performed based on the PreScan platform. The specific operation of step S3 is as follows: Firstly, the influence of the initial error of Kalman filter on the filtering accuracy is analyzed; secondly, in order to solve the oscillation problem caused by the initialization error, the visual estimation result is used as the initialization of the Kalman filter estimation result to perform slope estimation and filtering fusion; finally, CarSim, PreScan and Simulink are used to conduct joint simulation experiments; The specific operation of step S4 is as follows: A specific actual road section was selected, and data and images were collected based on the on-board CAN bus and monocular camera, and the road longitudinal slope estimation algorithm was verified through actual vehicle tests.
2. The method for estimating the longitudinal slope of a road by integrating machine vision and vehicle dynamics according to claim 1, characterized in that: In step S2, the specific operation of obtaining the preview point coordinates through the Hnet lane line fitting function is as follows: a perspective transformation matrix is obtained by a deep learning-based method. In terms of algorithm implementation, an HNet neural network structure is designed and trained to generate perspective transformation matrix coefficients; and an Adam optimizer is used to train the HNet network structure.
3. The method for estimating the longitudinal slope of a road by integrating machine vision and vehicle dynamics according to claim 1, characterized in that: In step S3, the visual estimation result is used as the initialization of the Kalman filter estimation result, and the specific operation of performing the longitudinal slope estimation filter fusion is as follows: (1) The road slope value estimated by machine vision is used as the input for initializing the Kalman filter estimation, and the visual estimation result is regarded as the optimal estimation value at the previous moment, that is, In the formula, β This is the slope estimation result based on machine vision; (2) For a given state estimate at the previous moment and its covariance matrix , obtain 2n+1 sigma points through UT transformation and its weight coefficient; (3) For the sigma point obtained by UT transformation , and obtain the further prediction value ; (4) Based on the one-step prediction sigma point and covariance weight coefficient , , the covariance matrix of the one-step prediction value and prediction error of the state estimation is obtained as ; (5) To obtain the one-step prediction value of the measurement, first use the UT transformation to obtain The corresponding sigma point is ; (6) For sigma point , and find its further prediction value (7) Further predicted values based on sigma points and the expected weight coefficient , the further predicted value of the measurement is calculated to be (8) According to the covariance weight coefficient , calculate the covariance matrix of the measurement error , and calculate the cross-correlation covariance matrix of the state estimate and the measured variable ; (9) After obtaining new measurement values After that, the filter is updated to obtain the Kalman gain, and the next step is to estimate the optimal estimate and the covariance matrix of the estimate. 。
