Observation noise determination method and device, equipment and medium
By obtaining lane line related parameters and calculating the observed noise covariance matrix of adaptive adjustment, the problem of lane line equation coefficient jump in unmanned driving technology is solved, and the stability of lane line coefficient changes and the accuracy of steering wheel control are achieved.
Patent Information
- Application Number
- CN202311338939.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2025-04-18
AI Technical Summary
In unmanned driving technology, the prior art may have coefficient jumps in the coefficients in the lane line equation due to inaccurate observation noise when determining the lane center line equation, resulting in sudden and violent changes in the vehicle steering wheel and insufficient control.
By obtaining lane line related parameters, including lane line type, determining the variance gain coefficient of lane line type, and then calculating the total observed variance gain coefficient and observed noise covariance matrix, adjusting the observed noise adaptively to make the coefficient changes in the lane line equation smoother.
It improves the accuracy of observation noise, avoids coefficient jumps, ensures the stability of lane line coefficient changes, thereby improving the control stability of the steering wheel.
Smart Images

Figure CN119851229A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the automotive field, and in particular to a method, device, equipment and medium for determining observation noise. Background Art
[0002] With the rapid development of intelligent technology, driverless technology is becoming more and more mature. At present, the forward-looking camera installed on the vehicle can be used to collect and process images of road conditions, and the vehicle can be controlled by the lane line equation in the vehicle coordinate system output by the forward-looking camera. However, when determining the lane centerline equation, due to inaccurate observation noise, the coefficients in the determined lane line equation may have coefficient jumps, resulting in sudden and drastic changes in the vehicle steering wheel, such as the vehicle steering wheel "drawing a dragon", resulting in inaccurate vehicle control. Therefore, providing a method for determining observation noise has become a technical problem that urgently needs to be solved. Summary of the invention
[0003] In view of this, the purpose of this application is to provide a method, device, equipment and medium for determining observation noise, which can make the observation noise more accurate, make the coefficient change in the lane line equation smoother, avoid coefficient jump, make the coefficient change more stable, and make the control of the steering wheel more stable. The specific scheme is as follows:
[0004] On the one hand, the present application provides a method for determining observation noise, comprising:
[0005] Obtain lane line related parameters at time k, wherein the lane line related parameters include lane line type;
[0006] When the lane line type is a deceleration line, the lane line type variance gain coefficient is determined to be a first variance gain coefficient; otherwise, the lane line type variance gain coefficient is determined to be a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient;
[0007] Determine the observation total variance gain coefficient according to the lane line type variance gain coefficient;
[0008] A second observation noise covariance matrix is determined according to the observation total variance gain coefficient and a preset first observation noise covariance matrix.
[0009] On the other hand, the embodiment of the present application further provides a device for determining observation noise, including:
[0010] An acquisition unit, used to acquire lane line related parameters at time k, wherein the lane line related parameters include lane line type;
[0011] A first determining unit, configured to determine, when the lane line type is a deceleration line, that the lane line type variance gain coefficient is a first variance gain coefficient, otherwise, determine that the lane line type variance gain coefficient is a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient;
[0012] A second determining unit, configured to determine an observation total variance gain coefficient according to the lane line type variance gain coefficient;
[0013] The third determination unit is used to determine a second observation noise covariance matrix according to the observation total variance gain coefficient and a preset first observation noise covariance matrix.
[0014] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0015] The memory is used to store program code and transmit the program code to the processor;
[0016] The processor is configured to execute the method described above according to the instructions in the program code.
[0017] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above aspects.
[0018] The embodiments of the present application provide a method, apparatus, device and medium for determining observation noise, which obtains lane line related parameters at time k, wherein the lane line related parameters include lane line type; when the lane line type is a deceleration line, the lane line type variance gain coefficient is determined to be a first variance gain coefficient, otherwise, the lane line type variance gain coefficient is determined to be a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient, that is, when the lane line type is a deceleration line, due to the low recognition stability of the deceleration line by the front-view camera, the lane line coefficient output by the front-view camera will fluctuate and be unstable, so a larger gain coefficient can be determined, thereby reducing the degree of trust in the detection result of the front-view camera, and more trusting the prediction result predicted according to the vehicle state at time k-1, so as to improve the accuracy of the second observation noise covariance matrix, and then, the observation total variance gain coefficient is determined according to the lane line type variance gain coefficient; then, the second observation noise covariance matrix is determined according to the observation total variance gain coefficient and the preset first observation noise covariance matrix. In this way, the second observation noise covariance matrix is adaptively adjusted according to the lane line type, the observation noise is more accurate, the coefficient change in the lane line equation can be smoother, the coefficient jump can be avoided, the coefficient change is more stable, and the control of the steering wheel is also more stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic flow chart of a method for determining observation noise provided in an embodiment of the present application is shown;
[0021] Figure 2 A schematic diagram of a vehicle coordinate system provided in an embodiment of the present application is shown;
[0022] Figure 3 A graph showing a change trend of a coefficient of a lane line equation provided in an embodiment of the present application is shown;
[0023] Figure 4 A structural block diagram of a device for determining observation noise provided in an embodiment of the present application is shown;
[0024] Figure 5 A structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below with reference to the accompanying drawings.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0027] Secondly, the present application is described in detail with reference to the schematic diagram. When describing the embodiments of the present application in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present application. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0028] For ease of understanding, a method, device, equipment and medium for determining observation noise provided in an embodiment of the present application are described in detail below with reference to the accompanying drawings.
[0029] refer to Figure 1As shown, it is a flow chart of a method for determining observation noise provided in an embodiment of the present application, and the method may include the following steps.
[0030] S101, obtaining lane line related parameters at time k, where the lane line related parameters include lane line type.
[0031] In an embodiment of the present application, the relevant parameters of the lane line can be obtained by using the front-view camera installed on the vehicle. The lane line visually recognized can be input through the CAN signal of the front-view camera. The lane line may include left-left line, left line, right line, right-right line, etc. For each lane line, there are corresponding lane line-related parameters. The lane line-related parameters may include the lane line type (type). The lane line type is represented by different numbers. 0 represents unknown, 1 represents a solid line, 2 represents a dotted line, 3 represents a solid and dotted line, 4 represents a dotted and solid line, 5 represents a double solid line, 6 represents a double dotted line, 7 represents a deceleration solid line, and 8 represents a deceleration dotted line.
[0032] Specifically, lane line related parameters may also include lane line valid identification bit (valid), the value of 0 indicates that the lane line does not exist, and the value of 1 indicates that the lane line exists. If the valid values of each lane line are 0, it means that there is no lane line, then the lane center line equation output is 0, and the step ends. If the lane line valid has a value of 1, it means that at least one lane line exists, and then the lane line type can be determined. Lane line related parameters may also include lane line color (color), the number 0 indicates that the color is unknown, the number 1 indicates that the lane line color is white, and the number 2 indicates that the lane line color is yellow.
[0033] Specifically, the lane line related parameters can also include c0, c1, c2, c3, c0 represents the lateral offset distance of the lane line from the origin of the vehicle coordinate system, the unit is m, c1 is the vehicle heading angle related parameter, arctan (c1) represents the current vehicle heading angle, the unit is rad, c2 represents the lane line curvature related parameters, 2*c2 represents the lane line curvature, the unit is 1 / m, c3 is the lane line curvature change rate related parameters of the lane line, 6*c3 represents the lane line curvature change rate, the unit is 1 / m*m.
[0034] refer to Figure 2 As shown, it is a schematic diagram of a vehicle coordinate system provided in an embodiment of the present application. The vehicle coordinate system includes an X-axis, a Y-axis and a Z-axis. The figure shows two lane lines in the vehicle coordinate system after the output and recognition after internal processing by the front-view camera. The origin of the coordinate system is the center of the rear axle of the vehicle, the positive direction of the X-axis is vertical to the rear axle of the vehicle and points forward, the positive direction of the Y-axis is to the left, and the positive direction of the Z-axis is vertically upward.
[0035] Specifically, c0, c1, c2, and c3 may be coefficients in the lane line equation. The lane line equation in the vehicle coordinate system output by the front-view camera may be expressed in the following form:
[0036] y=c0+c1*x+c2*x 2 +c3*x 3
[0037] Among them, x is the X value of the point on the lane line in the vehicle coordinate system, and y is the Y value of the point on the lane line in the vehicle coordinate system.
[0038] In a possible implementation, the lane line related parameters may also include lane line confidence, and the lane line confidence value ranges from 0 to 1. The closer it is to 1, the clearer the lane line is, and the more accurate the original value output by the front-view camera is.
[0039] In another possible implementation, the lane line related parameters may also include a first starting position (start) and a first end position (end) of the lane line, the first starting position being the X-coordinate value of the starting point of the lane line at the kth moment, and the first end position being the X-coordinate value of the end point of the lane line at the kth moment.
[0040] S102: When the lane line type is a deceleration line, determine the lane line type variance gain coefficient as a first variance gain coefficient; otherwise, determine the lane line type variance gain coefficient as a second variance gain coefficient.
[0041] In the embodiment of the present application, it is possible to determine whether the lane line type is a deceleration line. For example, when the lane line type is 7 or 8, it indicates that the lane line is a deceleration line. At this time, since the vehicle will shake when passing the deceleration line, the front camera has low stability in recognizing the deceleration line, and the coefficient is prone to fluctuation. The vehicle control is not precise enough, and the steering wheel is prone to "drawing a dragon". When the lane line is of other types, such as virtual and real lines, the coefficient observed by the front camera will not fluctuate greatly, and the reliability is high.
[0042] According to whether the lane line type is a deceleration line, the variance gain coefficient decel_coefficient of different lane line types can be determined. When the lane line type is a deceleration line, it can be determined as the first variance gain coefficient. When the lane line type is not a deceleration line, it can be determined as the second variance gain coefficient. The first variance gain coefficient is greater than the second variance gain coefficient. The larger the variance gain coefficient, the less trust is placed in the observation data of the front camera, and the more trust can be placed in the prediction result predicted based on the vehicle state at the previous moment.
[0043] Specifically, the lane line type variance gain coefficient can range from 1 to 4. When the value is 1, the lane line is clear and the camera performance is normal. According to the calibration of the front camera performance, it is found that when the lane line type is a deceleration solid line or a deceleration dashed line, the lane line coefficient output by the front camera will fluctuate and be unstable. Therefore, when the lane line type is a deceleration solid line or a deceleration dashed line, the coefficient is 4, which is more reliable in the previous prediction results and reduces the weight of the current detection results. In other words, if type is a deceleration solid line or a deceleration dashed line, decel_coefficient = 4, otherwise, decel_coefficient = 1.
[0044] In a possible implementation, when the lane line related parameters also include lane line confidence, before S103, a confidence variance gain coefficient (confidence_coefficient) may also be determined according to the lane line confidence. The lane line confidence reflects the confidence of the lane line measured by the front-view camera. The closer it is to 1, the more accurate the original value output by the front-view camera is, and the higher the confidence is.
[0045] The confidence variance gain coefficient can range from 1 to 2. When the value is 1, the lane line is clear and the camera performance is normal, that is, the performance of the front camera in a normal scene. The larger the gain coefficient, the less reliable the camera detection result of the current frame (the kth moment). According to the front camera performance calibration, when the lane line confidence output by the camera is lower than 0.9, the lane line coefficient will be unstable.
[0046] Specifically, the confidence level can be pre-set, for example, 0.9. When the lane line confidence level is greater than or equal to the pre-set confidence level, the confidence variance gain coefficient is determined to be the third variance gain coefficient; otherwise, the confidence variance gain coefficient is determined to be the fourth variance gain coefficient, and the fourth variance gain coefficient is greater than the third variance gain coefficient.
[0047] For example, when the lane line confidence is greater than or equal to 0.9, the third variance gain coefficient can be set to 1, and when the lane line confidence is less than 0.9, the fourth variance gain coefficient can be set to a value greater than 1, such as setting confidence_coefficient = 2-confidence. In this way, the confidence variance gain coefficient can be determined in combination with the lane line confidence, so as to more accurately determine the observation total variance gain coefficient in combination with the working conditions, thereby improving the accuracy of the observation noise covariance matrix, and then improving the accuracy of the output result of the Kalman filter, so that the lane line coefficient changes more smoothly.
[0048] In another possible implementation, when the lane line related parameters also include the first starting position and the first end position of the lane line, before S103, the length of the lane line can be determined based on the first starting position and the first end position. Since inaccurate measurement of the lane line length will also affect the size of the observation noise, the variance gain coefficient of the lane line length can be determined based on the lane line length, thereby improving the accuracy of the observation noise.
[0049] Specifically, the first length of the lane line can be determined according to the first starting point position and the first end point position. The first length can be expressed as current_length, current_length=end k –start k , where end k is the lane line end value output by the front-view camera at the kth moment, that is, the first end position, start k It is the start value of the lane line output by the front-view camera at the kth moment, that is, the first starting point position.
[0050] The starting position of the lane line output by the front camera at the k-1th moment can also be obtained, which can be recorded as the second starting position, and the ending position of the lane line output by the front camera at the k-1th moment, that is, the second ending position. The second length can be determined based on the second starting position and the second ending position, and the second length can represent the length of the lane line output by the front camera at the k-1th moment.
[0051] The second length can be expressed as last_length, last_length=end k-1 -start k-1 , where end k-1 is the lane line end value output by the front-view camera at the k-1th moment, that is, the second end point position, start k-1 It is the start value of the lane line output by the front-view camera at the k-1th moment, that is, the second starting point position.
[0052] From the k-1th moment to the kth moment, the distance the vehicle moves forward can be recorded as the vehicle moving distance D, and the calculation formula can be:
[0053] D=(V*dt)*cos(yaw_rate*dt)
[0054] Where V is the current vehicle speed at the kth moment read from the vehicle CAN signal (m / s), dt is the time difference between the camera output data at the kth moment and the camera output data at the k-1th moment (s), and yaw_rate is the yaw angular velocity (rad / s) read from the vehicle CAN signal.
[0055] Ideally, if the output of the front-view camera is relatively accurate, the first length is equal to the difference between the second length and the vehicle's moving distance, that is, the vehicle's moving distance is the change in the lane length between adjacent moments. Therefore, the accuracy of the output data of the front-view camera can be determined by measuring the proportional relationship between the first length and the difference between the second length and the vehicle's moving distance, and then determining the appropriate observation noise.
[0056] Specifically, the lane line scale can be determined according to the first length, the second length and the vehicle moving distance, which can be expressed by the formula:
[0057] scale=current_length / (last_length-D)
[0058] The closer the lane line scale is to 1, the closer current_length is to last_length-D, and the more accurate the measurement result of the front-view camera is. You can trust the observation result more and set a smaller gain coefficient.
[0059] Specifically, when the lane line ratio is greater than or equal to the first threshold, the lane line length variance gain coefficient is determined to be the fifth gain coefficient; otherwise, the lane line length variance gain coefficient is determined to be the sixth gain coefficient. The sixth gain coefficient is greater than the fifth gain coefficient. That is to say, the smaller the lane line ratio, the lower the accuracy of the measurement result of the front-view camera. A larger gain coefficient can be set to reduce the degree of trust in the observation result.
[0060] The lane line length variance gain coefficient is the coefficient of using the observation noise covariance matrix R_ under normal working conditions to calculate the final observation noise covariance matrix R. The value range of the lane line length variance gain coefficient can be 1-4. When the value is 1, it means that the lane line is clear and the camera performance is normal, that is, the performance of the front-view camera in a normal scene. The larger the gain coefficient, the less reliable the camera detection result of the current frame. When the lane line length current_length output by the front-view camera is short, that is, scale is relatively small, it means that the field of view is blocked. Therefore, the proportion of the current detection value can be reduced, and a larger gain coefficient is selected so that the observation noise covariance matrix can be increased proportionally in the future.
[0061] In practical applications, when the lane line ratio is less than the first threshold, the lane line length variance gain coefficient is determined to be the sixth gain coefficient. Specifically, when the lane line ratio is greater than or equal to the second threshold and less than the first threshold, the lane line length variance gain coefficient is determined to be the seventh gain coefficient; when the lane line ratio is less than the second threshold, the lane line length variance gain coefficient is determined to be the eighth gain coefficient; the eighth gain coefficient is greater than the seventh gain coefficient, and the appropriate lane line variance gain coefficient can be determined more accurately. The first threshold, the second threshold, and the third threshold can be set according to the actual environment and are not specifically limited here.
[0062] For example, the first threshold may be 0.8, and the second threshold may be 0.5. If scale ≥ 0.8, that is, the length of the lane line at the kth moment is greater than or equal to four-fifths of the difference between the length of the lane line at the k-1th moment and the vehicle moving distance, the lane line length variance gain coefficient length_coefficient = 1; if 0.5 ≤ scale < 0.8, that is, the length of the lane line at the kth moment is greater than or equal to half of the difference between the length of the lane line at the k-1th moment and the vehicle moving distance, but less than 4 / 5 of the length of the lane line at the k-1th moment, the gain coefficient length_coefficient = 2; if scale < 0.5, that is, the length of the lane line at the kth moment is less than half of the difference between the length of the lane line at the k-1th moment and the vehicle moving distance, the gain coefficient length_coefficient = 4.
[0063] S103, determining an observation total variance gain coefficient according to the lane line type variance gain coefficient.
[0064] In an embodiment of the present application, the lane line type variance gain coefficient can be used as the observation total variance gain coefficient sum_coefficient, and the lane line type variance gain coefficient can also be combined with other gain coefficients, such as multiplication or addition, as the observation total variance gain coefficient. The meaning of the observation total variance gain coefficient is to use the observation noise covariance matrix under normal working conditions to calculate the coefficients of the final observation noise covariance matrix, so as to determine a more accurate observation noise.
[0065] In a possible implementation, the total observation variance gain coefficient may be determined according to the lane line type variance gain coefficient and the confidence variance gain coefficient. For example, the two may be multiplied to obtain the total observation variance gain coefficient, thereby improving the accuracy of the observation noise.
[0066] In another possible implementation, the total observation variance gain coefficient may be determined according to the lane line type variance gain coefficient and the lane line length variance gain coefficient, and the total observation variance gain coefficient may be obtained by multiplying the two to improve the accuracy of the observation noise.
[0067] In another possible implementation, the lane line type variance gain coefficient decel_coefficient, the confidence variance gain coefficient confidence_coefficient and the lane line length variance gain coefficient length_coefficient can be multiplied to obtain the total observed variance gain coefficient. It can be expressed by the following formula:
[0068] sum_coefficient=length_coefficient*confidence_coefficient*decel_coefficient
[0069] Specifically, the value range of the observed total variance gain coefficient can be determined according to each variance gain coefficient. For example, if it is obtained by multiplying three variance gain coefficients, the maximum value of the value range of sum_coefficient is the maximum value of the three variance gain coefficients multiplied together, for example, the value range can be 1-16. It can be understood that when the calculated sum_coefficient is greater than 16, the sum_coefficient value is 16, that is, the maximum value is 16.
[0070] S104, determining a second observation noise covariance matrix according to the observation total variance gain coefficient and a preset first observation noise covariance matrix.
[0071] In the embodiment of the present application, the 6-dimensional observation noise covariance matrix of the conventional Kalman filter can be pre-set according to the performance of the front-view camera, recorded as the first observation noise covariance matrix R_, which can be specifically:
[0072]
[0073] Where:
[0074] σ c0 is the observation noise of the c0 value output by the front-view camera when the lane line is clear;
[0075] σ c1 is the observation noise of the c1 value output by the front-view camera when the lane line is clear;
[0076] σ c2 is the observation noise of the c2 value output by the front-view camera when the lane line is clear;
[0077] σ c3 is the observation noise of the c3 value output by the front-view camera when the lane line is clear;
[0078] σ LWis the noise of lane width calculated based on the c0 and c1 values output by the front-view camera when the lane line is clear;
[0079] σ c0′ The noise of the c0 change rate is calculated based on the c0 value output by the front-view camera when the lane line is clear;
[0080] The above six values are all calibrated values of camera performance.
[0081] Specifically, the first observation noise covariance matrix can be the variance of each state quantity of the current detection result, and the value is the corresponding 6*6 matrix. The total observation variance gain coefficient and the first observation noise covariance matrix can be multiplied, that is, the first observation noise covariance matrix is expanded by multiples to obtain the second observation noise covariance matrix as the final observation noise covariance matrix of the Kalman filter. In this way, different Kalman filter observation noise coefficients can be set for different working conditions, and different working conditions can be processed more targetedly, which can make the coefficient changes in the lane centerline equation smoother, avoid coefficient jumps, make the coefficient changes more stable, and make the control of the steering wheel more stable.
[0082] Specifically, when sum_coefficient is 1, it means that the detection of the front-view camera is normal, and the final observation noise covariance matrix (the second observation noise covariance matrix R) is equal to the observation noise covariance matrix under normal working conditions (the first observation noise covariance matrix R_); when the coefficient is greater than 1, it means that the current frame detection is unstable, and the observation noise covariance matrix is increased according to the proportion of the coefficient to reduce the weight of the current detection result.
[0083] That is to say, when the lane line length measurement result is relatively stable, the lane line confidence is greater than or equal to the preset confidence, and the lane line type is not a deceleration line, the observation noise of the Kalman filter is equal to the 6-dimensional observation noise covariance matrix of the conventional Kalman filter, that is, R_. If the observed lane line length is short, the lane line confidence is less than the preset confidence, or the lane line type is not a deceleration line, the first observation noise covariance matrix R_ will be expanded by multiples as the final Kalman filter's observation noise covariance matrix R, so that the observation noise covariance matrix is adjusted according to the working conditions to improve the accuracy of the observation noise.
[0084] In an embodiment of the present application, the second observation noise covariance matrix can be used to determine the coefficients of the lane line equation, so as to control the vehicle driving according to the lane line equation and improve the accuracy and safety of unmanned driving.
[0085] Specifically, the optimal Kalman gain K_ can be determined according to the second observation noise covariance matrix, the state covariance matrix and the observation matrix, which can be expressed by the following formula:
[0086] K = P * H t (H_*P_*H_ t +R) -1
[0087] Among them, P_ is the state covariance matrix,
[0088] Among them, σ0 represents the variance of the state estimation c0 value, σ1 represents the variance of the state estimation c1 value, σ2 represents the variance of the state estimation c2 value, σ3 represents the variance of the state estimation c3 value, σ4 represents the variance of the state estimation LW value, and σ5 represents the variance of the state estimation c0' value.
[0089] H_ represents the observation matrix,
[0090] In an embodiment of the present application, before determining the target state vector at time k output by the Kalman filter based on the optimal Kalman gain, the state vector of the vehicle at time k, the observation vector of the vehicle at time k and the observation matrix, the state vector X_ at time k can also be predicted based on the state vector of the vehicle at time k-1.
[0091] Specifically, it can be expressed using the following state transition formula:
[0092]
[0093] Where c0' is the rate of change of the lateral offset distance c0, c0'=(c0 (k) -c0 (k-1) ) / dt, that is, the rate of change of the lateral offset distance of the same lane line at the kth moment and the k-1th moment, in meters.
[0094] LW is the lane width (Lane Width), in meters, which can be expressed as:
[0095] LW=(c0_l–c0_r)*cos(0.5*arctan(c1_l)+0.5*arctan(c1_r))
[0096] Among them, c0_l represents c0 of the left lane line, c0_r represents c0 of the right lane line, c1_l represents c1 of the left lane line, and c1_r represents c1 of the right lane line.
[0097] That is to say, the state vector at time k can be recorded as c0 is the lateral offset distance of the lane line from the origin of the vehicle coordinate system, c1 is a parameter related to the vehicle heading angle, c2 is a parameter related to the lane line curvature, c3 is a parameter related to the lane line curvature change rate, and LW is the lane width.
[0098] Then, the target state vector X at time k output by the Kalman filter can be determined based on the optimal Kalman gain K_, the vehicle state vector X_ at time k, the vehicle observation vector Z_ at time k, and the observation matrix H_. k :
[0099] X k =X + K (Z - H) X
[0100] Among them, Z_=[c0_;c1_;c2_;c3_;LW_;c0'_], c0_ is the c0 value of the left lane line output by the front-view camera at the kth moment; c1_ is the c1 value of the left lane line output by the front-view camera at the kth moment; c2_ is the c2 value of the left lane line output by the front-view camera at the kth moment; c3_ is the c3 value of the left lane line output by the front-view camera at the kth moment.
[0101] LW_=(c0_–c0_r)*cos(0.5*arctan(c1_)+0.5*arctan(c1_r))
[0102] Among them, c0_r represents c0 of the right lane line, c1_r represents the c1 value of the right lane line, and c0'_observation value is 0.
[0103] Specifically, the vehicle lane centerline equation can be determined according to the target state vector at time k. When the target state vector at time k corresponds to the left lane line, it can be expressed as:
[0104] X k左 =[c0_kl;c1_kl;c2_kl;c3_kl;LW_kl;c0'_kl]
[0105] Among them, c0_kl is the c0 value of the left lane line updated by the Kalman filter at the kth moment; c1_kl is the c1 value of the left lane line updated by the Kalman filter at the kth moment; c2_kl is the c2 value of the left lane line updated by the Kalman filter at the kth moment; c3_kl is the c3 value of the left lane line updated by the Kalman filter at the kth moment; LW_kl is the lane width updated by the Kalman filter at the kth moment; c0'_kl is the c0 change rate of the left lane line updated by the Kalman filter at the kth moment.
[0106] The centerline equation of the lane where the vehicle is located can be determined based on the target state vector corresponding to one or more lane lines.k左 On this basis, appropriate adjustments are made to obtain the lane centerline equation.
[0107] In a possible implementation, the target state vector at time k may include the first target state vector X corresponding to the left lane line k左 The second target state vector X corresponding to the right lane line k右 , determining the vehicle lane centerline equation according to the target state vector at time k, can be specifically, determining the vehicle lane centerline equation according to the first target state vector and the second target state vector.
[0108] The process of determining the second target state vector is similar to that of determining the first target state vector, and will not be repeated here. It should be noted that the items in the observation vector Z_ at time k are replaced with the parameters of the right lane line, and then X can be obtained. k右 =[c0_k2;c1_k2;c2_k2;c3_k2;LW_k2;c0'_k2].
[0109] Among them, c0_k2 is the c0 value of the right lane line updated by the Kalman filter at the kth moment; c1_k2 is the c1 value of the right lane line updated by the Kalman filter at the kth moment; c2_k2 is the c2 value of the right lane line updated by the Kalman filter at the kth moment; c3_k2 is the c3 value of the right lane line updated by the Kalman filter at the kth moment; LW_k2 is the lane width updated by the Kalman filter at the kth moment; c0'_k2 is the c0 change rate of the right lane line updated by the Kalman filter at the kth moment.
[0110] Since the lane centerline is located between the left lane line and the right lane line, it can be determined that X k =[c0_k; c1_k; c2_k; c3_k; LW_k; c0'_k].
[0111] Among them, c0_k=(c0_k1+c0_k2) / 2 is the c0 value of the lane center line updated by the Kalman filter at the kth moment, c1_k=(c1_k1+c1_k2) / 2 is the c1 value of the lane center line updated by the Kalman filter at the kth moment, c2_k=(c2_k1+c2_k2) / 2 is the c2 value of the lane center line updated by the Kalman filter at the kth moment, c3_k=(c3_k1+c3_k2) / 2 is the c3 value of the lane center line updated by the Kalman filter at the kth moment, LW_k is the lane width updated by the Kalman filter at the kth moment, and c0'_k is the c0 change rate of the lane center line updated by the Kalman filter at the kth moment.
[0112] Then the lane centerline equation can be output as: y = c0_k + c1_k*x + c2_k*x 2 +c3_k*x 3 .
[0113] In the examples of this application, refer to Figure 3 As shown in the figure, the horizontal axis represents time and the vertical axis represents the value. The broken line 1 represents the c2 value output by the front-view camera after encountering the deceleration line perception, which obviously has a mutation. The broken line 2 is the c2 value of the lane centerline output by this method, which smoothes the curvature mutation caused by inaccurate camera detection, and the c2 change is obviously smoother.
[0114] The embodiment of the present application provides a method for determining observation noise, obtaining lane line related parameters at time k, wherein the lane line related parameters include lane line type; when the lane line type is a deceleration line, determining the lane line type variance gain coefficient as a first variance gain coefficient, otherwise, determining the lane line type variance gain coefficient as a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient, that is, when the lane line type is a deceleration line, due to the low recognition stability of the deceleration line by the front-view camera, the lane line coefficient output by the front-view camera will fluctuate and be unstable, so a larger gain coefficient can be determined, thereby reducing the degree of trust in the detection result of the front-view camera, and more trusting the prediction result predicted according to the vehicle state at time k-1, so as to improve the accuracy of the second observation noise covariance matrix, and then, determining the observation total variance gain coefficient according to the lane line type variance gain coefficient; then, determining the second observation noise covariance matrix according to the observation total variance gain coefficient and the preset first observation noise covariance matrix. In this way, the second observation noise covariance matrix is adaptively adjusted according to the lane line type, the observation noise is more accurate, the coefficient change in the lane line equation can be smoother, the coefficient jump can be avoided, the coefficient change is more stable, and the control of the steering wheel is also more stable.
[0115] Based on the above method for determining observation noise, the present application embodiment further provides a device for determining observation noise, referring to Figure 4 As shown, it is a structural block diagram of a device for determining observation noise provided in an embodiment of the present application, and the device may include:
[0116] An acquisition unit 201 is used to acquire lane line related parameters at time k, where the lane line related parameters include lane line type;
[0117] A first determining unit 202 is used to determine that the lane line type variance gain coefficient is a first variance gain coefficient when the lane line type is a deceleration line, otherwise, determine that the lane line type variance gain coefficient is a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient;
[0118] A second determining unit 203 is used to determine an observation total variance gain coefficient according to the lane line type variance gain coefficient;
[0119] The third determination unit 204 is configured to determine a second observation noise covariance matrix according to the observation total variance gain coefficient and a preset first observation noise covariance matrix.
[0120] Specifically, the lane line related parameters also include lane line confidence, and the device also includes:
[0121] a fourth determination unit, configured to determine, when the lane line confidence is greater than or equal to a preset confidence, that the confidence variance gain coefficient is a third variance gain coefficient; otherwise, determine that the confidence variance gain coefficient is a fourth variance gain coefficient, and the fourth variance gain coefficient is greater than the third variance gain coefficient;
[0122] The second determining unit is configured to:
[0123] An observation total variance gain coefficient is determined according to the lane line type variance gain coefficient and the confidence variance gain coefficient.
[0124] Specifically, the lane line related parameters also include a first starting point position and a first end point position of the lane line, and the device also includes:
[0125] a fifth determining unit, configured to determine a first length of the lane line according to the first starting point position and the first end point position;
[0126] a sixth determination unit, configured to determine the lane line ratio according to the first length, the second length, and the vehicle moving distance; the second length is determined according to a second starting position and a second end position, wherein the second starting position and the second end position are respectively the starting position and the end position of the lane line at time k-1 output by the camera;
[0127] a seventh determination unit, configured to determine, when the lane line ratio is greater than or equal to a first threshold value, that the lane line length variance gain coefficient is a fifth gain coefficient; otherwise, determine that the lane line length variance gain coefficient is a sixth gain coefficient, wherein the sixth gain coefficient is greater than the fifth gain coefficient;
[0128] The second determining unit is used for:
[0129] An observation total variance gain coefficient is determined according to the lane line type variance gain coefficient and the lane line length variance gain coefficient.
[0130] Specifically, the seventh determining unit is used to:
[0131] When the lane line ratio is greater than or equal to the second threshold value and less than the first threshold value, determining the lane line length variance gain coefficient to be a seventh gain coefficient;
[0132] When the lane line ratio is less than the second threshold, the lane line length variance gain coefficient is determined to be an eighth gain coefficient; and the eighth gain coefficient is greater than the seventh gain coefficient.
[0133] Specifically, the device also includes:
[0134] an eighth determination unit, configured to determine an optimal Kalman gain according to the second observation noise covariance matrix, the state covariance matrix and the observation matrix;
[0135] a ninth determination unit, configured to determine a target state vector at time k output by a Kalman filter according to the optimal Kalman gain, the state vector of the vehicle at time k, the observation vector of the vehicle at time k, and the observation matrix;
[0136] The tenth determination unit is used to determine the vehicle lane centerline equation according to the target state vector at the k moment.
[0137] Specifically, the target state vector at time k includes a first target state vector of a left lane line and a second target state vector of a right lane line, and the tenth determining unit is used to:
[0138] The vehicle lane centerline equation is determined based on the first target state vector and the second target state vector.
[0139] Specifically, the device also includes:
[0140] The prediction unit is used to predict the state vector of the vehicle at time k-1 according to the state vector of the vehicle at time k; the state vector at time k is Among them, c0 is the lateral offset distance of the lane line from the origin of the vehicle coordinate system, c1 is a parameter related to the vehicle heading angle, c2 represents a parameter related to the lane line curvature of the lane line, c3 is a parameter related to the lane line curvature change rate of the lane line, LW is the lane width, and c0' is the change rate of the lateral offset distance.
[0141] The embodiment of the present application provides a device for determining observation noise, including an acquisition unit for acquiring lane line related parameters at time k, wherein the lane line related parameters include a lane line type; a first determination unit for determining the lane line type variance gain coefficient as a first variance gain coefficient when the lane line type is a deceleration line, otherwise, determining the lane line type variance gain coefficient as a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient, that is, when the lane line type is a deceleration line, since the front-view camera has a low recognition stability for the deceleration line, the lane line coefficient output by the front-view camera will fluctuate and be unstable, so a larger gain coefficient can be determined, thereby reducing the degree of trust in the detection result of the front-view camera, and more trusting the prediction result predicted according to the vehicle state at time k-1, so as to improve the accuracy of the second observation noise covariance matrix, then, the second determination unit is used to determine the observation total variance gain coefficient according to the lane line type variance gain coefficient; then, the third determination unit is used to determine the second observation noise covariance matrix according to the observation total variance gain coefficient and the preset first observation noise covariance matrix. In this way, the second observation noise covariance matrix is adaptively adjusted according to the lane line type, the observation noise is more accurate, the coefficient change in the lane line equation can be smoother, the coefficient jump can be avoided, the coefficient change is more stable, and the control of the steering wheel is also more stable.
[0142] In another aspect, the present application provides a computer device, referring to Figure 5 , which is a structural diagram of a computer device provided in an embodiment of the present application, wherein the computer device includes a processor 310 and a memory 320:
[0143] The memory 320 is used to store program codes and transmit the program codes to the processor 310;
[0144] The processor 310 is used to execute the method provided in the above embodiment according to the instructions in the program code.
[0145] The computer device may include a terminal device or a server, and the aforementioned apparatus may be configured in the computer device.
[0146] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.
[0147] In addition, an embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiment.
[0148] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by program instruction hardware, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0149] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0150] The above is only a preferred implementation of the present application. Although the present application has been disclosed as a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still falls within the scope of protection of the technical solution of the present application.
Claims
1. A method for determining observation noise, characterized in that: include: Obtain lane line related parameters at time k, wherein the lane line related parameters include lane line type; When the lane line type is a deceleration line, the lane line type variance gain coefficient is determined to be a first variance gain coefficient; otherwise, the lane line type variance gain coefficient is determined to be a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient; Determine the observation total variance gain coefficient according to the lane line type variance gain coefficient; A second observation noise covariance matrix is determined according to the observation total variance gain coefficient and a preset first observation noise covariance matrix.
2. The method according to claim 1, characterized in that The lane line related parameters also include lane line confidence. Before determining the observation total variance gain coefficient according to the lane line type variance gain coefficient, the method also includes: When the lane line confidence is greater than or equal to a preset confidence, determining the confidence variance gain coefficient as a third variance gain coefficient; otherwise, determining the confidence variance gain coefficient as a fourth variance gain coefficient, and the fourth variance gain coefficient is greater than the third variance gain coefficient; The step of determining the observation total variance gain coefficient according to the lane line type variance gain coefficient comprises: An observation total variance gain coefficient is determined according to the lane line type variance gain coefficient and the confidence variance gain coefficient.
3. The method according to claim 1, characterized in that The lane line related parameters also include a first starting point position and a first end point position of the lane line. Before determining the observation total variance gain coefficient according to the lane line type variance gain coefficient, the method also includes: Determine a first length of the lane line according to the first starting point position and the first end point position; The lane line ratio is determined according to the first length, the second length and the vehicle moving distance; the second length is determined according to the second starting position and the second end position, and the second starting position and the second end position are respectively the starting position and the end position of the lane line at time k-1 output by the camera; When the lane line ratio is greater than or equal to a first threshold, determining the lane line length variance gain coefficient as a fifth gain coefficient; otherwise, determining the lane line length variance gain coefficient as a sixth gain coefficient, wherein the sixth gain coefficient is greater than the fifth gain coefficient; The step of determining the observation total variance gain coefficient according to the lane line type variance gain coefficient comprises: An observation total variance gain coefficient is determined according to the lane line type variance gain coefficient and the lane line length variance gain coefficient.
4. The method according to claim 3, characterized in that Otherwise, determining the lane line length variance gain coefficient as a sixth gain coefficient comprises: When the lane line ratio is greater than or equal to the second threshold value and less than the first threshold value, determining the lane line length variance gain coefficient to be a seventh gain coefficient; When the lane line ratio is less than the second threshold, the lane line length variance gain coefficient is determined to be an eighth gain coefficient; and the eighth gain coefficient is greater than the seventh gain coefficient.
5. The method according to claim 1, characterized in that The method further comprises: Determining an optimal Kalman gain according to the second observation noise covariance matrix, the state covariance matrix and the observation matrix; Determine the target state vector at time k output by the Kalman filter according to the optimal Kalman gain, the state vector of the vehicle at time k, the observation vector of the vehicle at time k and the observation matrix; The vehicle lane centerline equation is determined according to the target state vector at the k moment.
6. The method according to claim 5, characterized in that The target state vector at time k includes a first target state vector of a left lane line and a second target state vector of a right lane line, and determining the vehicle lane centerline equation according to the target state vector at time k includes: The vehicle lane centerline equation is determined based on the first target state vector and the second target state vector.
7. The method according to claim 5, characterized in that Before determining the target state vector at time k output by the Kalman filter according to the optimal Kalman gain, the state vector of the vehicle at time k, the observation vector of the vehicle at time k and the observation matrix, the method further includes: According to the state vector of the vehicle at time k-1, the state vector at time k is predicted; the state vector at time k is X - =[c0,c1,c2,c3,LW,c0'] T k+1 , wherein c0 is the lateral offset distance of the lane line from the origin of the vehicle coordinate system, c1 is a parameter related to the vehicle heading angle, c2 represents a parameter related to the lane line curvature of the lane line, c3 is a parameter related to the rate of change of the lane line curvature of the lane line, LW is the lane width, and c0' is the rate of change of the lateral offset distance.
8. A device for determining observation noise, characterized in that: include: An acquisition unit, used to acquire lane line related parameters at time k, wherein the lane line related parameters include lane line type; A first determining unit, configured to determine, when the lane line type is a deceleration line, that the lane line type variance gain coefficient is a first variance gain coefficient, otherwise, determine that the lane line type variance gain coefficient is a second variance gain coefficient; the first variance gain coefficient is greater than the second variance gain coefficient; A second determining unit, configured to determine an observation total variance gain coefficient according to the lane line type variance gain coefficient; The third determination unit is used to determine a second observation noise covariance matrix according to the observation total variance gain coefficient and a preset first observation noise covariance matrix.
9. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program codes and transmit the program codes to the processor; The processor is configured to execute the method according to any one of claims 1 to 7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.