An ultrasonic radar-based parking space detection obstacle edge positioning method
Patent Information
- Application Number
- CN202211159698.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-09-22
AI Technical Summary
[0004]本发明主要是为了解决超声波雷达角度模糊的特性导致产生干扰点,造成测量误差的问题,提供了一种基于超声波雷达的车位检测障碍物边缘定位方法,包括:1)使用超声波雷达测量障碍物距离;2)根据障碍物距离计算障碍物点坐标;3)根据障碍物距离和障碍物点坐标,获取障碍物点特征值;4)训练逻辑回归模型,区分拖边点和真实障碍物点;5)剔除拖边点,对真实障碍物点进行线段拟合
(1)选择监督学习的逻辑回归模型进行分类处理,区分拖边点与真实障碍物点,剔除拖边点,对真实障碍物点进行直线拟合,从而有效定位障碍物的边缘,准确测量车位宽度;
Smart Images

Figure CN116008997B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and more specifically to a method for locating the edge of an obstacle in a parking space based on ultrasonic radar. Background Technology
[0002] Ultrasonic radar, by emitting high-frequency mechanical waves, can effectively detect the distance to obstacles within its range, and is therefore widely used in vehicle reversing systems. Vehicles are typically equipped with eight ultrasonic radars at the front and rear for collision avoidance detection during parking; four are typically equipped on the sides to measure the distance between the vehicle and surrounding obstacles in real time during movement, enabling effective parking space detection. However, current vehicle-mounted ultrasonic radars are single-transmitter, single-receiver systems, unable to measure the actual angle of obstacles within the beam, and cannot determine the actual orientation of obstacles based solely on distance information. When the vehicle approaches the edge of obstacles such as walls or pillars, the obstacle point calculated from the distance measured by the radar will be affected by the angular ambiguity of ultrasonic radar, extending in open areas and creating interference points. This results in the measured parking space width being smaller than the actual parking space width, causing significant errors. Furthermore, when the actual parking space width is small, it may not be accurately detected, reducing the probability of detecting an effective parking space. Therefore, a classification method is urgently needed to distinguish interference points from actual obstacle points, enabling accurate detection of parking space width.
[0003] Furthermore, traditional obstacle localization methods mostly require fusion calculations with other sensors, such as visual sensors and LiDAR. It is difficult to eliminate interference points generated at the edge of obstacles through algorithms, so the fusion calculation is complex and computationally intensive, making it difficult to implement. Traditional parking space width detection algorithms do not consider the case of obstacles with right angles and are dependent on the vehicle's driving state. If the vehicle's driving state is changed, errors may occur. Traditional real obstacle point and interference point classification algorithms are still in the simulation stage, requiring a large amount of training data and making it difficult to achieve real-time calculations. Therefore, they cannot be ported to automatic parking systems. Summary of the Invention
[0004] This invention primarily addresses the problem of interference points and measurement errors caused by the angular ambiguity of ultrasonic radar. It provides a method for obstacle edge localization in parking space detection based on ultrasonic radar, comprising: 1) measuring the obstacle distance using ultrasonic radar; 2) calculating the obstacle point coordinates based on the obstacle distance; 3) obtaining the obstacle point feature values based on the obstacle distance and obstacle point coordinates; 4) training a logistic regression model to distinguish between trailing edges and true obstacle points; and 5) removing trailing edges and performing line segment fitting on the true obstacle points. This invention, through supervised learning of the logistic regression model, classifies measured obstacle points based on their feature values, eliminates trailing edges caused by ultrasonic radar angular ambiguity, effectively locates obstacle edges, and accurately measures parking space width.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for parking space detection and obstacle edge localization based on ultrasonic radar includes the following steps: Step S1: Use ultrasonic radar to measure the distance to the obstacle; Step S2: Calculate the coordinates of the obstacle point based on the obstacle distance; Step S3: Obtain the feature values of the obstacle points based on the obstacle distance and obstacle point coordinates; Step S4: Train the logistic regression model to distinguish between dragging points and real obstacle points; Step S5: Remove dragging points and perform line segment fitting on the actual obstacle points.
[0007] This invention provides a method for obstacle edge localization in parking space detection based on ultrasonic radar. The specific process is as follows: The ultrasonic radar operates periodically in a self-transmitting and self-receiving manner during vehicle movement. If an obstacle exists within the detection range, multiple target distances can be measured each time, and the measured obstacle distances are updated and recorded. Then, based on the measured obstacle distances, the nearest obstacle distance and the ultrasonic radar coordinates are taken. In the absolute coordinate system, with the ultrasonic radar coordinates as the starting point, the coordinates of the nearest obstacle point are calculated in the direction perpendicular to and outwards from the vehicle's forward movement. Next, based on the calculated obstacle point coordinates, the obstacle point feature values are obtained, including the normalized current coordinates and the line connecting the previous coordinates to the... The vehicle's forward direction angle, the ratio of the current maximum echo energy to the previous maximum echo energy, and the normalized distance to the second obstacle measured so far are used as input values for the prediction function. Based on these sample feature values, a logistic regression model is trained to obtain optimal parameters. Using these optimal parameters, the measured obstacle points are classified as a test set, removing outliers caused by ultrasonic radar angular ambiguity (i.e., interference points). The remaining obstacle points are considered the true obstacle points. Least squares linear fitting is performed on the true obstacle points, and the lines are plotted in an absolute coordinate system. The endpoints of the plotted lines represent the true obstacle edges detected by the ultrasonic radar. This invention, through supervised learning and logistic regression, classifies measured obstacle points based on their feature values, removes outliers caused by ultrasonic radar angular ambiguity, effectively locates obstacle edges, and accurately measures parking space width.
[0008] Preferably, step S1 is performed as follows: the ultrasonic radar operates periodically in a self-transmitting and self-receiving manner during vehicle operation. If an obstacle exists within the detection range, it measures the distances to multiple obstacles, updates and records the measured obstacle distances. If an obstacle exists within the detection range, the ultrasonic radar can measure the distances to multiple targets each time.
[0009] Preferably, step S2 includes the following steps: Step S21: Based on the measured obstacle distance, take the nearest obstacle distance as the actual obstacle detection distance, and record the measured actual obstacle detection distance and ultrasonic radar coordinates. Step S22: In the absolute coordinate system, taking the ultrasonic radar coordinates as the starting point, calculate the coordinates of the nearest obstacle point in the direction perpendicular to the vehicle's forward movement, expressed as: X p =X1-(0.5D+d)sinβ Y p =Y1+(0.5D+d)cosβ In the formula, the current absolute coordinates of the ultrasonic radar are (X1, Y1), and the coordinates of the nearest obstacle point are (X1, Y1). p,Y p ), where D is the width of the vehicle, d is the actual detection distance of the obstacle, and β is the angle between the vehicle's forward direction and the x-axis of the absolute coordinate system.
[0010] Preferably, the obstacle point feature values obtained in step S3 include, but are not limited to, the angle between the line connecting the normalized current coordinates and the previous coordinates and the vehicle's forward direction, the ratio of the maximum echo energy measured by the current ultrasonic radar to the maximum echo energy measured by the previous ultrasonic radar, and the normalized distance to the second obstacle measured by the current ultrasonic radar. This invention uses the angle between the line connecting the normalized current coordinates and the previous coordinates and the vehicle's forward direction, the ratio of the maximum echo energy measured this time to the maximum echo energy measured previously, and the currently measured distance to the second obstacle as the predicted values of the prediction function. It selects three trailing points (i.e., interference points) with feature values that significantly differ from the actual obstacle points as sample features. These features are not strongly correlated with the vehicle's driving state and are therefore insensitive to the vehicle's driving state, making them applicable to various scenarios.
[0011] Preferably, step S4 includes the following steps: Step S41: Construct the prediction function h θ (x), using several feature values of the sample obstacle points as the training set input prediction function h θ (x), the prediction function h θ (x) is represented as: In the formula, x1, x2, ..., x n Let θ1, θ2…θ be the n feature values of the sample points. n For each feature value, the parameter is b, which is the bias coefficient; Step S42: Construct the loss function J(θ), which is expressed as: In the formula, m is the number of training samples, and y i h represents the data category of the i-th training sample. θ (x i Let ) be the prediction function for the i-th training sample; Step S43: Iteratively solve for the optimal J(θ) using the gradient descent method. The update formula for the optimal parameter θ is: In the formula, k is the number of iterations, K is the maximum number of iterations, and α is the learning step size. Let x represent the j-th eigenvalue at the k-th iteration. j The corresponding optimal parameters; Step S44: Substitute the optimal parameters θ obtained in step S43 into the prediction function h constructed in step S41. θ (x), to obtain the prediction function h θ (x)′, taking several feature values of the measured obstacle points as the test set input to the prediction function h. θ (x)′ is used to classify and distinguish between dragging points and real obstacle points.
[0012] Due to the angular ambiguity inherent in ultrasonic radar, when measuring the edges of obstacles with right angles, such as walls and columns, the generated obstacle points tend to extend into open areas, creating a trailing edge phenomenon and leading to misjudgments. To identify these trailing edge points, this invention employs a supervised learning logistic regression model for classification, binary-classifying the true obstacle points with the trailing edge points. By training a sample set, this invention can classify measured obstacle points in real time, thus offering flexibility for use in automated parking systems.
[0013] Preferably, step S5 includes the following steps: Step S51: Remove trailing points; Step S52: Fit a straight line to the real obstacle points, and the endpoints of the resulting line segments are the real obstacle edges detected by the ultrasonic radar.
[0014] For parking spaces facing obstacles with right-angled edges, such as adjacent walls and pillars, this invention categorizes measured obstacle points, eliminating outliers caused by angular ambiguity from ultrasonic radar. It then performs least-squares linear fitting on the actual obstacle points and plots the lines in an absolute coordinate system. The endpoints of the plotted lines represent the actual obstacle edges detected by the ultrasonic radar. This invention effectively locates obstacle edges, accurately measures parking space width, and eliminates the need for fusion with other sensors, saving costs, simplifying calculations, and reducing implementation difficulty.
[0015] Preferably, in step S3, let the projected distance between the ultrasonic radar and the wall edge on the x-axis be s. According to the radar equation, the echo signal energy attenuates with the fourth power of the distance. Therefore, the drag point p r and p r-1 The echo energy ratio is expressed as: In the formula, E r For the dragging point p r Echo energy, E r-1 For the dragging point p r-1 The echo energy, d r For the dragging point p r The closest distance, d r-1 For the dragging point p r-1The closest distance, v is the vehicle speed, and Δt is the interval between ultrasonic radar cycles.
[0016] Preferably, the logistic regression model can be replaced with other binary classification models. Besides using the logistic regression model, this invention can also be implemented using other supervised learning training models, such as k-nearest neighbors (KNN), support vector machines (SVM), Bayesian methods, neural networks, etc.
[0017] Therefore, the advantages of the present invention are: (1) Select a supervised learning logistic regression model for classification processing, distinguish between dragging edge points and real obstacle points, remove dragging edge points, and perform line fitting on real obstacle points to effectively locate the edge of the obstacle and accurately measure the width of the parking space. (2) Select three drag points (i.e. interference points) with significant differences from real obstacle points as sample features. They are not strongly correlated with vehicle driving status, so they are not sensitive to vehicle driving status and are applicable to various scenarios. (3) Locating the edge of an obstacle does not require fusion with other sensors, saving costs, simplifying calculations, and making it easy to implement; (4) It can be used in automatic parking systems, which is flexible. Attached Figure Description
[0018] Figure 1 This is a flowchart of a parking space obstacle edge localization method based on ultrasonic radar in Embodiment 1 of the present invention.
[0019] Figure 2 This is a schematic diagram of obstacle point coordinate calculation in Embodiment 2 of the present invention.
[0020] Figure 3 This is a flowchart of the logistic regression model training process in Embodiment 2 of the present invention.
[0021] Figure 4 This is a schematic diagram of the obstacle detection dragging phenomenon in Embodiment 2 of the present invention.
[0022] Figure 5 This is a schematic diagram illustrating the feature values of obstacle points in Embodiment 2 of the present invention. Figure 5 (a) is a schematic diagram of the features of the first sample. Figure 5 (b) is a schematic diagram of the features of the second sample. Detailed Implementation
[0023] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.
[0024] Example 1:
[0025] A method for obstacle edge localization in parking space detection based on ultrasonic radar, such as... Figure 1As shown, it includes the following steps: Step S1: Use ultrasonic radar to measure the distance to the obstacle; Step S2: Calculate the coordinates of the obstacle point based on the obstacle distance; Step S3: Obtain the feature values of the obstacle points based on the obstacle distance and obstacle point coordinates; Step S4: Train the logistic regression model to distinguish between dragging points and real obstacle points; Step S5: Remove dragging points and perform line segment fitting on the actual obstacle points.
[0026] This embodiment provides a method for obstacle edge localization in parking space detection based on ultrasonic radar. The specific process is as follows: The ultrasonic radar operates periodically in a self-transmitting and self-receiving manner during vehicle movement. If an obstacle exists within the detection range, multiple target distances can be measured each time, and the measured obstacle distances are updated and recorded. Then, based on the measured obstacle distances, the nearest obstacle distance and the ultrasonic radar coordinates are taken. In the absolute coordinate system, with the ultrasonic radar coordinates as the starting point, the coordinates of the nearest obstacle point are calculated in the direction perpendicular to and outwards from the vehicle's forward movement. Next, based on the calculated obstacle point coordinates, the obstacle point feature values are obtained, including the normalized current coordinates and the line connecting the previous coordinates to the... The vehicle's forward direction angle, the ratio of the current maximum echo energy to the previous maximum echo energy, and the normalized distance to the second obstacle are used as input values for the prediction function. Based on these sample feature values, a logistic regression model is trained to obtain optimal parameters. Using these optimal parameters, the measured obstacle points are classified as a test set, removing outliers caused by ultrasonic radar angular ambiguity (i.e., interference points). The remaining obstacle points are considered the true obstacle points. Least squares linear fitting is performed on the true obstacle points, and the lines are plotted in an absolute coordinate system. The endpoints of the plotted lines represent the true obstacle edges detected by the ultrasonic radar. This embodiment uses a supervised learning logistic regression model to classify measured obstacle points based on their feature values, removing outliers caused by ultrasonic radar angular ambiguity, effectively locating obstacle edges, and accurately measuring parking space width.
[0027] The specific process of step S1 is as follows: The ultrasonic radar operates periodically in a self-transmitting and self-receiving manner during vehicle operation. If there are obstacles within the detection range, it measures the distances of multiple obstacles, updates and records the measured obstacle distances. If there are obstacles within the detection range, the ultrasonic radar can measure the distances of multiple targets each time.
[0028] The specific process of step S2 includes the following steps: Step S21: Based on the measured obstacle distance, take the nearest obstacle distance as the actual obstacle detection distance, and record the measured actual obstacle detection distance and ultrasonic radar coordinates. Step S22: In the absolute coordinate system, taking the ultrasonic radar coordinates as the starting point, calculate the coordinates of the nearest obstacle point in the direction perpendicular to the vehicle's forward movement, expressed as: X p =X1-(0.5D+d)sinβ Y p =Y1+(0.5D+d)cosβ In the formula, the current absolute coordinates of the ultrasonic radar are (X1, Y1), and the coordinates of the nearest obstacle point are (X1, Y1). p ,Y p ), where D is the width of the vehicle, d is the actual detection distance of the obstacle, and β is the angle between the vehicle's forward direction and the x-axis of the absolute coordinate system.
[0029] The obstacle point feature values obtained in step S3 include, but are not limited to, the angle between the line connecting the normalized current coordinates and the previous coordinates and the vehicle's forward direction, the ratio of the maximum echo energy measured by the current ultrasonic radar to the maximum echo energy measured by the previous ultrasonic radar, and the normalized distance to the second obstacle measured by the current ultrasonic radar. In this embodiment, three trailing points (i.e., interference points) with significantly different feature values from the actual obstacle points are selected as sample features, which are not strongly correlated with the vehicle's driving state.
[0030] The specific process of step S4 includes the following steps: Step S41: Construct the prediction function h θ (x), using several feature values of the sample obstacle points as the training set input prediction function h θ (x), prediction function h θ (x) is represented as: In the formula, x1, x2, ..., x n Let θ1, θ2…θ be the n feature values of the sample points. n For each feature value, the parameter is b, which is the bias coefficient; Step S42: Construct the loss function J(θ), which is expressed as: In the formula, m is the number of training samples, and y i h represents the data category of the i-th training sample. θ (x i Let ) be the prediction function for the i-th training sample; Step S43: Iteratively solve for the optimal J(θ) using the gradient descent method. The update formula for the optimal parameter θ is: In the formula, k is the number of iterations, K is the maximum number of iterations, and α is the learning step size. Let x represent the j-th eigenvalue at the k-th iteration. j The corresponding optimal parameters; Step S44: Substitute the optimal parameters θ obtained in step S43 into the prediction function h constructed in step S41. θ (x), to obtain the prediction function h θ (x)′, taking several feature values of the measured obstacle points as the test set input prediction function h θ (x)′ is used to classify and distinguish between dragging points and real obstacle points.
[0031] Due to the angular ambiguity of ultrasonic radar, when measuring the edges of obstacles with right angles, such as walls and columns, the generated obstacle points tend to extend into open areas, creating a "dragging edge" phenomenon and leading to misjudgments. To identify these dragging edge points, this embodiment uses a supervised learning logistic regression model for classification, binary-classifying the actual obstacle points and the dragging edge points. This embodiment, through a training sample set, can classify the measured obstacle points in real time.
[0032] The specific process of step S5 includes the following steps: Step S51: Remove trailing points; Step S52: Perform straight line fitting on the real obstacle points, and the endpoints of the resulting line segments are the real obstacle edges detected by the ultrasonic radar.
[0033] For obstacles with right-angled edges, such as adjacent walls and pillars, in this embodiment, the measured obstacle points are classified, and the trailing edges caused by the ambiguity of the ultrasonic radar angle are eliminated. The real obstacle points are fitted with a straight line using the least squares method and drawn in an absolute coordinate system. The endpoints of the drawn line segments are the real obstacle edges detected by the ultrasonic radar.
[0034] In step S3, let the projected distance between the ultrasonic radar and the wall edge on the x-axis be s. According to the radar equation, the echo signal energy attenuates with the fourth power of the distance. Therefore, the drag point p r and p r-1 The echo energy ratio is expressed as: In the formula, E r For the dragging point p r Echo energy, E r-1 For the dragging point p r-1 The echo energy, d r For the dragging point p r The closest distance, d r-1 For the dragging point p r-1The closest distance, v is the vehicle speed, and Δt is the interval between ultrasonic radar cycles.
[0035] Example 2:
[0036] A method for parking space detection and obstacle edge localization based on ultrasonic radar includes the following steps:
[0037] Step A1, Obstacle Distance Measurement: The ultrasonic radar operates periodically in a self-transmitting and self-receiving manner while the vehicle is in motion. If an obstacle exists within the detection range, it can measure the distances of multiple targets each time, update and record the measured obstacle distances, specifically as follows: Step A11: When the vehicle speed is kept below 25 km / h, the ultrasonic radar on the side of the vehicle begins to work cyclically. Step A12: The ultrasonic radar beam range on the side of the vehicle is 60° and the detection distance is 4.5 meters. If there is an obstacle within the range, due to reflection and multipath effect, the radar will measure the distances of multiple obstacles, update and record the measured obstacle distances.
[0038] Step A2, Obstacle Point Coordinate Calculation: Based on the measured obstacle distance, the nearest obstacle distance and ultrasonic radar coordinates are taken each time. In the absolute coordinate system, using the ultrasonic radar coordinates as the starting point, the coordinates of the nearest obstacle point are calculated in the direction perpendicular to the vehicle's forward movement and outward. Specifically: Step A21: Based on the measured distance to the obstacle, take the closest distance as the actual detection distance of the obstacle, and record the closest distance measured this time and the current absolute coordinates of the ultrasonic radar; Step A22, as follows Figure 2 As shown, the current absolute coordinates of the ultrasonic radar are (X1, Y1). The closest distance in the direction perpendicular to the vehicle's forward movement is the coordinate of the obstacle's measurement point (X1, Y1). p ,Y p ), can be represented as: X p =X1-(0.5D+d)sinβ Y p =Y1+(0.5D+d)cosβ In the formula, D is the width of the vehicle, d is the nearest distance to the detected obstacle, and β is the angle between the vehicle's forward direction and the x-axis of the absolute coordinate system.
[0039] Step A3, Obtaining Obstacle Point Feature Values: Based on the obtained obstacle point coordinates, the angle between the line connecting the normalized current coordinates and the previous coordinates and the vehicle's forward direction, the ratio of the current maximum echo energy to the previous maximum echo energy, and the currently measured distance to the second obstacle are used as the predicted values of the prediction function. Specifically, this includes: Step A31: Due to the angular ambiguity of ultrasonic radar, when measuring the edges of obstacles such as walls and columns, the generated obstacle points will extend into open areas, creating a trailing edge phenomenon and producing trailing edge points, such as... Figure 4 As shown, this leads to misjudgment. To identify dragging points, it is necessary to perform binary classification of real obstacle points and dragging points to remove interference points. Therefore, this embodiment selects a supervised learning logistic regression model for classification processing. Step A32: For the dragging edge points, a linear boundary is used for differentiation. Therefore, the prediction function hθ(x) can be expressed as: In the formula, x1, x2, ..., x n Let θ1, θ2…θ be the n feature values of the sample points. n For each feature value, the parameter is b, which is the bias coefficient; in step A33, in this embodiment, three feature values of the sample point are used as sample feature inputs. The first sample feature is the angle between the line connecting the normalized current coordinate and the previous coordinate and the vehicle's forward direction, such as... Figure 5 As shown in (a), connect the dragging edge point p. k and p k-1 Generate a straight line that forms an angle with the direction of vehicle travel. After normalization, the value is used as the feature value input to the feature function (prediction function); Step A34, the second sample feature is the ratio of the maximum echo energy measured by the ultrasonic radar in this instance to the maximum echo energy in the previous instance, such as... Figure 5 As shown in (b), let the projected distance between the ultrasonic radar and the wall edge on the x-axis be s. According to the radar equation, the echo signal energy attenuates with the fourth power of the distance. Therefore, the drag point p r and p r-1 The echo energy ratio is expressed as: In the formula, E r For the dragging point p r Echo energy, E r-1 For the dragging point p r-1 The echo energy, d r For the dragging point p r The closest distance, d r-1 For the dragging point p r-1The closest distance, v is the vehicle speed, and Δt is the interval time of the ultrasonic radar cycle; Step A35, the third sample feature is the distance of the second obstacle measured by the current ultrasonic radar. When the vehicle drives to the edge of the obstacle, since there is no obstacle in the direction of the ultrasonic radar beam normal, the distance measured by the second echo will be much greater than the closest distance or even exceed the range. Therefore, the normalized distance of the second obstacle can be used as the feature value input into the feature function (prediction function).
[0040] Step A4, Logistic Regression Model Training: Based on the sample feature values obtained above, a logistic regression model is trained to obtain the optimal parameters. The process is as follows: Figure 3 As shown, it specifically includes: Step A41, construct the loss function J(θ), which can be expressed as: In the formula, m is the number of training samples, and y i h represents the data category of the i-th training sample. θ (x i J(θ) is the prediction function for the i-th training sample; in step A42, the optimal J(θ) is solved iteratively using the gradient descent method, and the update formula for the optimal parameter θ is: In the formula, k is the number of iterations, K is the maximum number of iterations, and α is the learning step size. Let x represent the j-th eigenvalue at the k-th iteration. j The corresponding optimal parameters.
[0041] Step A5, interference point elimination: Based on the optimal parameters obtained above, the measured obstacle points are classified as test sets, and the dragging points caused by the ambiguity of the ultrasonic radar angle are eliminated. The remaining obstacle points are taken as real obstacle points.
[0042] Step A6, obstacle point line segment fitting: Perform least squares line fitting on the obtained real obstacle points and draw it in the absolute coordinate system. The endpoints of the drawn line segments are the real obstacle edges detected by the ultrasonic radar.
[0043] Besides using the logistic regression model, other supervised learning training models can also be used, such as k-nearest neighbors (KNN), support vector machines (SVM), Bayesian methods, and neural networks.
[0044] In addition to the three sample features mentioned above, other features of obstacle points can be added. In this embodiment, the number of features can be increased on the basis of the original sample features, such as the Euclidean distance between adjacent obstacle points and the closest detection distance.
[0045] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for locating obstacle edges in parking space detection based on ultrasonic radar, characterized in that, Includes the following steps: Step S1: Use ultrasonic radar to measure the distance to the obstacle; Step S2: Calculate the coordinates of the obstacle point based on the obstacle distance; Step S3: Based on the obstacle distance and obstacle point coordinates, obtain the obstacle point feature values, including the angle between the line connecting the normalized current coordinates and the previous coordinates and the vehicle's forward direction, the ratio of the maximum echo energy measured by the ultrasonic radar this time to the maximum echo energy measured by the previous ultrasonic radar, and the normalized current ultrasonic radar measured second obstacle distance. Step S4: Use several feature values of the sample obstacle points as the input prediction function of the training set to train the logistic regression model. Input the feature values of the measured obstacle points into the trained logistic regression model to distinguish between trailing points and real obstacle points. Trailing points are generated due to the angular ambiguity of the ultrasonic radar. Step S5: Remove dragging points and perform line segment fitting on the actual obstacle points.
2. The method for locating obstacle edges in parking space detection based on ultrasonic radar according to claim 1, characterized in that, The specific process of step S1 is as follows: the ultrasonic radar works periodically during vehicle operation. If there are obstacles within the detection range, it measures the distances of multiple obstacles, updates and records the measured obstacle distances.
3. The method for locating obstacle edges in parking space detection based on ultrasonic radar according to claim 1, characterized in that, The specific process of step S2 includes the following steps: Step S21: Based on the measured obstacle distance, take the nearest obstacle distance as the actual obstacle detection distance, and record the measured actual obstacle detection distance and ultrasonic radar coordinates. Step S22: In the absolute coordinate system, taking the ultrasonic radar coordinates as the starting point, calculate the coordinates of the nearest obstacle point in the direction perpendicular to the vehicle's forward movement, expressed as: , In the formula, the current absolute coordinates of the ultrasonic radar are (X1, Y1), and the coordinates of the nearest obstacle point are (X1, Y1). p ,Y p D is the width of the vehicle, d is the actual detection distance of the obstacle, and β is the angle between the vehicle's forward direction and the axis of the absolute coordinate system.
4. The method for locating obstacle edges in parking space detection based on ultrasonic radar according to claim 1, characterized in that, The specific process of step S4 includes the following steps: Step S41: Construct the prediction function h θ (x), the prediction function h θ (x) is represented as: , In the formula, x1, x 2…… x n Let θ1, θ2 be the feature values of the sample points. 2…… θ n Here, b is the parameter corresponding to each feature value, and b is the bias coefficient. Step S42: Construct the loss function J(θ), which is expressed as: , In the formula, m is the number of training samples, and y i h represents the data category of the i-th training sample. θ (x i ) is the prediction function for the i-th training sample; Step S43: Iteratively solve for the optimal J(θ) using the gradient descent method. The update formula for the optimal parameter θ is: , In the formula, k is the number of iterations, K is the maximum number of iterations, α is the learning step size, and θ is the maximum learning step size. j k Let x represent the j-th eigenvalue at the k-th iteration. j The corresponding optimal parameters; Step S44: Substitute the optimal parameters θ obtained in step S43 into the prediction function h constructed in step S41. θ (x), to obtain the prediction function h θ (x)′, taking several feature values of the measured obstacle points as the test set input to the prediction function h. θ (x)′ is used to classify and distinguish between dragging points and real obstacle points.
5. The method for locating obstacle edges in parking space detection based on ultrasonic radar according to claim 1, characterized in that, The specific process of step S5 includes the following steps: Step S51: Remove trailing points; Step S52: Fit a straight line to the real obstacle points, and the endpoints of the resulting line segments are the real obstacle edges detected by the ultrasonic radar.
6. The method for locating obstacle edges in parking space detection based on ultrasonic radar according to claim 1, characterized in that, In step S3, let the projected distance between the ultrasonic radar and the wall edge on the x-axis be s. According to the radar equation, the echo signal energy attenuates with the fourth power of the distance. Therefore, the drag point p r and p r-1 The echo energy ratio is expressed as: , In the formula, E r For the dragging point p r Echo energy, E r-1 For the dragging point p r-1 The echo energy, d r For the dragging point p r The closest distance, d r-1 For the dragging point p r-1 The closest distance, v is the vehicle speed, and Δt is the interval between ultrasonic radar cycles.
7. A method for locating obstacle edges in parking space detection based on ultrasonic radar according to claim 1 or 4, characterized in that, Replace the logistic regression model with any one of the following: k-nearest neighbor (KNN) model, support vector machine (SVM) model, or Bayesian model.
Citation Information
Patent Citations
Methods for early tunnel detection
DE102020212306A1
Ghost point filtering
US11158120B1