Single-chip microcomputer intelligent vehicle teaching aid case intelligent matching method and system
By acquiring and analyzing obstacle information, combining vector information analysis model for path planning, and making obstacle avoidance decisions and path corrections when necessary, the problem of insufficient obstacle avoidance capabilities of smart cars in complex environments is solved, and the accuracy and safety of path planning are improved.
Patent Information
- Application Number
- CN202510424887.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing intelligent vehicle path planning technology lacks obstacle avoidance capabilities in complex environments, especially in environments where dynamic obstacles are dense and paths are complex, it is unable to respond to changes in obstacles in a timely manner, affecting the safety and driving efficiency of smart vehicles.
By obtaining the position and motion state information of the obstacle, the vector information analysis model is used to calculate the speed, direction and acceleration, conduct initial path planning, and calculate the distance of the obstacle. If the obstacle distance is less than the set threshold, the obstacle avoidance decision module is activated to perform secondary motion path planning, and compare and correct according to the path deviation to finally obtain the optimal path.
It improves the obstacle avoidance ability and path planning accuracy of smart cars in complex environments, ensuring the safety and driving efficiency of smart cars.
Smart Images

Figure CN119961697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation systems, and in particular to a method and system for intelligent matching of single-chip microcomputer intelligent vehicle teaching aid cases. Background Art
[0002] In the process of intelligent matching of MCU smart car teaching aids, the vector information of the smart car is needed to describe its motion state and path planning. By analyzing the vector, more accurate path planning and motion control can be achieved. However, in practical applications, due to the complex and changeable environment in which the smart car is located, its motion state and path planning face many technical challenges.
[0003] The existing path planning of smart cars relies on sensor-based data input and path tracking algorithms to calculate the optimal path through simple dynamic path planning. However, the existing path planning technology has the following shortcomings: First, the obstacle avoidance ability of smart cars in complex environments is limited, especially in environments with dense dynamic obstacles and complex paths. The existing path planning method cannot respond to the changes of obstacles in time, thus affecting the safety and driving efficiency of smart cars. Summary of the invention
[0004] The present invention provides a single-chip microcomputer intelligent vehicle teaching aid case intelligent matching method and system to solve the problem of insufficient obstacle avoidance capability in the prior art.
[0005] In the first aspect, in order to solve the above technical problems, the present invention provides a single-chip microcomputer intelligent car teaching aid case intelligent matching method, comprising: Obtain obstacle location and motion status information; Inputting the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration; Performing initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path; Calculating the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance; If the obstacle distance is greater than the set obstacle avoidance threshold, the initial motion path is output as the optimal path; If the obstacle distance is less than the set obstacle avoidance threshold, a secondary motion path planning is performed on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path; Comparing the secondary motion path with the actual path of the smart car to obtain a path deviation; If the path deviation is less than the set deviation threshold, the secondary motion path is output as the optimal path; If the path deviation is greater than the set deviation threshold, the set secondary motion path is corrected based on the error correction mechanism to obtain the optimal path.
[0006] Preferably, the step of inputting the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration includes: Extracting the motion state information and performing data preprocessing through the input layer of the vector information analysis model to obtain standard motion state information; Deducing the standard motion state information through the hidden layer of the vector information analysis model to obtain a mapping relationship; The mapping relationship is calculated through the output layer of the vector information analysis model to obtain speed, direction and acceleration.
[0007] Preferably, performing initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path includes: Based on the Kalman filter algorithm, the motion state of the speed, the direction and the acceleration is estimated to obtain a predicted motion path; The predicted motion path is smoothed based on the Bezier curve to obtain an initial motion path.
[0008] Preferably, the calculating the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance includes: Resampling the initial motion path to obtain key point coordinates; Obstacle distance is calculated by the following formula: in, The first The horizontal coordinates of the key points, The first The vertical coordinates of the key points, For the The horizontal coordinate of the obstacle, For the The vertical coordinate of the obstacle.
[0009] Preferably, if the obstacle distance is less than the set obstacle avoidance threshold, a secondary motion path planning is performed on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path, including: Based on the extended Kalman filter algorithm, a secondary motion state estimation is performed on the obstacle position and the motion state information to obtain a secondary predicted motion path; The secondary predicted motion path is smoothed based on the Bezier curve to obtain a secondary motion path.
[0010] Preferably, the comparing the secondary motion path and the actual path of the smart car to obtain the path deviation includes: The secondary motion path and the actual path of the smart car are resampled to obtain the key point coordinates of the secondary motion path and the actual path of the smart car. The path deviation is calculated by the following formula: in, is the path deviation, is the number of feature points, is the second motion path The horizontal coordinates of the key points, The actual path of the smart car The horizontal coordinates of the key points, is the second motion path The vertical coordinates of the key points, The actual path of the smart car The vertical coordinate of the key point.
[0011] Preferably, if the path deviation is greater than a set deviation threshold, based on an error correction mechanism, the set secondary motion path is corrected to obtain an optimal path, including: Based on the particle filter and the path deviation, the speed, the direction and the acceleration are corrected to obtain a corrected speed, direction and acceleration; Based on the Kalman filter algorithm, the motion state is estimated for the corrected speed, direction and acceleration to obtain three predicted motion paths; The three predicted motion paths are smoothed based on Bezier curves to obtain an optimal motion path.
[0012] In a second aspect, the present invention provides a single-chip microcomputer intelligent car teaching aid case intelligent matching system, comprising: A data acquisition module is used to obtain the obstacle position and motion status information; A vector information analysis module, used to input the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration; An initial path planning module, used to perform initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path; An obstacle distance module, used to calculate the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance; The optimal path module is used to output the initial motion path as the optimal path if the obstacle distance is greater than the set obstacle avoidance threshold; An obstacle avoidance decision module, configured to perform secondary motion path planning on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path if the obstacle distance is less than a set obstacle avoidance threshold; A path deviation module compares the secondary motion path with the actual path of the smart car to obtain a path deviation; Secondary motion path module, if the path deviation is less than the set deviation threshold, the secondary motion path is output as the optimal path; The error correction module is used to correct the set secondary motion path based on the error correction mechanism to obtain the optimal path if the path deviation is greater than the set deviation threshold.
[0013] In a third aspect, the present invention further provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for intelligent matching of single-chip microcomputer intelligent car teaching aids cases as described in any one of the above is implemented.
[0014] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned single-chip microcomputer intelligent car teaching aid case intelligent matching methods.
[0015] Compared with the prior art, the present invention has the following beneficial effects: obtaining the position and motion state information of the obstacle, inputting the motion state information into a pre-established vector information analysis model to obtain the speed, direction and acceleration, performing initial path planning according to the speed, direction and acceleration to obtain the initial motion path, performing obstacle distance calculation according to the initial motion path and the obstacle position to obtain the obstacle distance, if the obstacle distance is greater than the set obstacle avoidance threshold, outputting the initial motion path as the optimal path, if the obstacle distance is less than the set obstacle avoidance threshold, performing secondary motion path planning on the obstacle position and the motion state information based on an obstacle avoidance decision module to obtain the secondary motion path, comparing the secondary motion path with the actual path of the smart car to obtain the path deviation, if the path deviation is less than the set deviation threshold, outputting the secondary motion path as the optimal path, if the path deviation is greater than the set deviation threshold, correcting the set secondary motion path based on the error correction mechanism to obtain the optimal path. The method obtains the obstacle position and the motion state information of the smart car, combines the vector information analysis model, performs initial path planning, and calculates the obstacle distance to determine whether obstacle avoidance is required. When the obstacle distance is less than the set threshold, the obstacle avoidance decision module is started to perform secondary path planning, and the path deviation is compared. If the deviation is large, the path is corrected through the error correction mechanism, and the optimal path is finally obtained. The method solves the problem of insufficient obstacle avoidance capability in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of a method for intelligent matching of single-chip intelligent car teaching aid cases provided by a first embodiment of the present invention; Figure 2 It is a system schematic diagram of a single-chip microcomputer intelligent car teaching aid case intelligent matching method provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Reference Figure 1 The first embodiment of the present invention provides a single-chip intelligent car teaching aid case intelligent matching method, comprising the following steps: S11, obtaining the position and motion state information of the obstacle; wherein the motion state information includes: speed range, steering angle, acceleration trend and stability state; S12, inputting the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration; S13, performing initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path; S14, calculating the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance; S15, if the obstacle distance is greater than the set obstacle avoidance threshold, the initial motion path is output as the optimal path; S16, if the obstacle distance is less than the set obstacle avoidance threshold, performing secondary motion path planning on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path; S17, comparing the secondary motion path and the actual path of the smart car to obtain a path deviation; S18, if the path deviation is less than the set deviation threshold, the secondary motion path is output as the optimal path; S19: If the path deviation is greater than the set deviation threshold, the set secondary motion path is corrected based on the error correction mechanism to obtain the optimal path.
[0019] In step S11, the obstacle position and motion state information are obtained; wherein the motion state information includes: speed range, steering angle, acceleration trend and stability state; It is worth noting that in step S11, the system needs to obtain the position and motion state information of the obstacle. The motion state information includes speed range, steering angle, acceleration trend and stability state, while the position of the obstacle is obtained in real time through the environment perception system of the smart car. The acquisition of the obstacle position mainly depends on the cooperation of multiple devices such as laser radar, ultrasonic sensor, infrared sensor and visual sensor. The laser radar accurately measures the distance between the obstacle and the vehicle by emitting a laser beam and receiving the reflected signal, and calculates the position of the obstacle in three-dimensional space. These data are provided in the form of point clouds. After processing, the smart car system can extract the specific position coordinates of the obstacle. In addition, the ultrasonic sensor is used for the detection of close-range obstacles. It calculates the distance to the obstacle by emitting ultrasonic waves and receiving echo signals, supplementing the long-range scanning capability of the laser radar. The infrared sensor detects the position of the obstacle by detecting the thermal radiation of surrounding objects, especially in low light or night conditions. The visual sensor uses the image captured by the camera to analyze and identify the specific position of the obstacle through image processing technology.
[0020] As for the motion state information, the speed range is obtained through the vehicle speed sensor. The vehicle speed sensor combines the GPS module and the wheel encoder to measure the speed of the smart car in real time, and compares it with the set maximum and minimum speed ranges to obtain the current speed range. The steering angle is monitored in real time by the steering angle sensor. The sensor captures the angle change of the wheel through a potentiometer or a rotary encoder to obtain the current steering angle information. The acceleration trend is obtained through the accelerometer. The accelerometer measures the acceleration and deceleration state of the vehicle in real time, reflecting the movement trend of the vehicle. The stability state is obtained through the inertial measurement unit (IMU). The IMU combines the accelerometer and gyroscope to monitor the vehicle's yaw angle, pitch angle and angular velocity, evaluate whether the vehicle is in a stable state during movement, and provide necessary feedback data to help the control system make adjustments.
[0021] The real-time collection and precise processing of these sensor data enable the system to fully understand the surrounding environment and the movement status of the smart car, providing reliable data support for subsequent path planning, correction and obstacle avoidance decisions.
[0022] In step S12, the motion state information is input into a pre-established vector information analysis model to obtain speed, direction and acceleration, including: The vector information analysis model is a prediction model based on machine learning; The vector information analysis model is divided into three layers, namely input layer, hidden layer and output layer; The input layer extracts and preprocesses the motion state information based on a deep neural network SVM to obtain standard motion state information; The hidden layer derives the standard motion state information based on a nonlinear activation function to obtain a mapping relationship; The output layer calculates the mapping relationship based on a linear activation function to obtain speed, direction and acceleration.
[0023] It is worth noting that in step S12, the system inputs the motion state information into the pre-established vector information analysis model to obtain the speed, direction and acceleration of the smart car. The core of this step is to predict the future motion state of the smart car by modeling the motion state information of the smart car, and further process and extract the required control parameters through different algorithms.
[0024] First, the motion state information includes four main parameters: speed range, steering angle, acceleration trend and stability state. In order to extract the specific speed, direction and acceleration from this information, the system processes it through a vector information analysis model. This model is a prediction model trained based on a machine learning algorithm. By learning from historical motion state data, it can accurately predict the behavior of a smart car in a given motion state.
[0025] The input layer of the model extracts the motion state information, normalizes the four parameters of speed range, steering angle, acceleration trend and stability state, and converts them into a unified input format. Specifically, the speed range is standardized by the speed data obtained by the sensor, the steering angle is obtained by the wheel steering sensor and converted into a numerical value, the stability state is provided by the inertial measurement unit (IMU), and is represented by real-time monitoring of the vehicle's yaw angle and pitch angle, while the acceleration trend is obtained by the accelerometer and extracted by analyzing the trend information of acceleration and deceleration.
[0026] In the vector analysis model, the motion state information is further processed through multiple hidden layers. The hidden layers of the model perform nonlinear transformations on the input data through deep vector machines (SVMs) to extract deep features related to the actual motion state. These hidden layers perform data transformations on the input information to find the potential relationship between the motion state and the final control parameters (such as speed, direction, and acceleration).
[0027] At the output layer, through the reasoning of the model, the system will obtain three specific control parameters: speed, direction, and acceleration. The output layer of the model provides motion control parameters for the smart car based on the predicted values calculated by SVM. These predicted values are obtained by analyzing historical data and real-time input. The speed control value determines the forward speed required by the smart car in the current state, the direction control value determines the driving direction of the smart car, and the acceleration control value determines the acceleration or deceleration state of the vehicle.
[0028] Specifically, speed, direction and acceleration are obtained through mapping relationships based on the acquired motion state information. These mapping relationships are established through learning and model optimization of training data. When the system inputs four parameters, namely speed range, steering angle, acceleration trend and stability state, the model will calculate the speed, direction and acceleration values that match these input parameters, thereby providing accurate output data for path planning and motion control, ensuring that the smart car can accurately perform the predetermined tasks.
[0029] Through such modeling and calculation processes, the system can convert complex motion state information into actual control instructions and provide precise support for the path planning and obstacle avoidance decisions of smart vehicles.
[0030] In step S13, initial path planning is performed according to the speed, the direction and the acceleration to obtain an initial motion path, including: Based on the Kalman filter algorithm, the motion state of the speed, the direction and the acceleration is estimated to obtain a predicted motion path; The predicted motion path is smoothed based on the Bezier curve to obtain an initial motion path.
[0031] It is worth noting that in step S13, the system performs initial path planning based on the motion state information (including speed, direction and acceleration) of the smart car. The specific process is as follows: First, based on the Kalman filter algorithm, the system estimates and corrects the speed, direction, and acceleration of the smart car to obtain more accurate motion state information. Kalman filtering is a recursive estimation algorithm that is mainly used to predict and correct the state of a dynamic system. In this process, the Kalman filter will adjust the estimated value of the vehicle state in real time based on the sensor data and the vehicle's motion model to reduce the error caused by sensor noise. Specifically, at each update, the Kalman filter algorithm first calculates the predicted state at the current moment based on the predicted state and control input at the previous moment, and then corrects it based on the actual measurement value of the sensor. Through this process, the Kalman filter can accurately estimate the motion state of the smart car, including its speed, direction, and acceleration, thereby providing accurate motion data for subsequent path planning.
[0032] After obtaining the precise motion state, the planning process of the initial motion path begins. The system uses the path planning algorithm to calculate the initial motion path of the smart car based on the corrected speed, direction, and acceleration information. Here, the Bezier curve is used to smooth the predicted motion path to obtain the initial smooth motion path. The Bezier curve is a commonly used curve fitting method. It defines the shape of the path through control points, which can effectively smooth the path and avoid sharp turns or discontinuous path points. Specifically, the control points of the Bezier curve are set according to the current motion state of the smart car (speed, direction, acceleration, etc.) to ensure a smooth transition of the path. Through the fitting of the Bezier curve, the system can generate a smooth and continuous path based on the motion prediction results of the smart car, ensuring that the vehicle will not be unstable or change drastically during driving.
[0033] The whole process combines the Kalman filter algorithm and the Bezier curve, so that the initial motion path of the smart car can accurately reflect its motion state and ensure the smoothness and feasibility of the path. This method effectively improves the accuracy of path planning, reduces the impact of sensor noise or dynamic environmental changes, and ensures that the smart car can travel along the optimal and smooth path.
[0034] In step S14, the obstacle distance is calculated according to the initial motion path and the obstacle position to obtain the obstacle distance, including: Resampling the initial motion path to obtain key point coordinates; Obstacle distance is calculated by the following formula: in, The first The horizontal coordinates of the key points, The first The vertical coordinates of the key points, For the The horizontal coordinate of the obstacle, For the The vertical coordinate of the obstacle.
[0035] It is worth noting that in step S14, the system calculates the shortest distance of the obstacle based on the initial motion path and the position of the obstacle. The specific process is as follows: First, the initial motion path is planned based on the motion state information (such as speed, direction, and acceleration) of the smart car. In order to accurately plan the path and make subsequent obstacle avoidance decisions, the system needs to perform detailed path sampling from the initial path. Here, a uniformly spaced sampling method is adopted. This method selects multiple path points from the path at equal intervals to ensure that each key position of the path can be effectively sampled. The advantage of this sampling method is that it can accurately reflect the shape of each section on the path, while ensuring that the sampling points are evenly distributed throughout the path, avoiding the problem of discontinuous path or insufficient data due to uneven sampling intervals. In this way, the system can extract a series of path points from the initial path, and the coordinates of each path point can provide data support for subsequent obstacle detection and path correction.
[0036] The sampling of the path points is based on the set distance interval, that is, starting from the starting point according to the fixed distance step, a path point is selected every predetermined distance interval. This method can provide sufficient accuracy to describe the path and adapt to changes in different environments, because on complex or narrow paths, the sampling interval can be appropriately reduced to ensure the detailed and accurate path information. In relatively flat or straight areas, the sampling interval can be relatively large to improve calculation efficiency.
[0037] Obstacle location acquisition depends on the smart car's sensor system, including lidar, ultrasonic sensors, visual sensors, etc. Through these sensors, the system can obtain the coordinates of obstacles in real time and compare them with the path points. The distance between each path point and the obstacle needs to be calculated using the Euclidean distance, which is suitable for such path planning scenarios because it can directly provide the straight-line distance between the path point and the obstacle, thereby effectively evaluating the safety of the path. The use of the Euclidean distance can directly quantify the spatial relationship between the path point and the obstacle, so that the system can clearly know which path points are close to the obstacles and which path points are safe, which is convenient for subsequent obstacle avoidance and path correction.
[0038] The reason for using Euclidean distance calculation is that it is simple, efficient and can accurately reflect the actual spatial relationship between two points. Accurate distance calculation is crucial for path planning and obstacle avoidance decisions, especially in complex or dynamic environments. Real-time acquisition of the minimum distance between obstacles and path points can ensure that the system can respond quickly and avoid potential collision risks.
[0039] Through this combination of uniformly spaced sampling and Euclidean distance calculation, the system can effectively evaluate the relationship between each point on the path and the surrounding obstacles, providing accurate data support for subsequent path correction and obstacle avoidance decisions. This method not only ensures the accuracy of path planning, but also improves the safety and stability of smart cars in complex environments.
[0040] In step S15, if the obstacle distance is greater than the set obstacle avoidance threshold, the initial motion path is output as the optimal path; It is worth noting that in step S15, the system makes a judgment based on the shortest distance between the obstacle and the path. If the distance of the obstacle is greater than the set threshold, the system will output the initial motion path as the optimal path. The core of this step is to judge the safety and feasibility of the current path. Specifically, the system first calculates the shortest distance from the path point to the obstacle through the path points obtained by path sampling and the obstacle positions obtained in real time. By comparing these shortest distances with the preset safety threshold, it is determined whether the current path can continue to be used as the driving path of the smart car.
[0041] Here, the safety threshold is used to measure the minimum safe distance between the path point and the obstacle to ensure that the smart car will not collide with the obstacle while driving. Assume that the threshold we set is 1.5 meters. The selection of this value takes into account the size of the smart car, the complexity of the environment, and the size of general obstacles. For example, if the obstacle is more than 1.5 meters away from the path point of the smart car, the system will consider the current path to be safe and can continue to drive along this path without adjusting the path. On the contrary, if the obstacle is less than 1.5 meters away from the path point, the system will consider the path to be potentially dangerous, and then activate the obstacle avoidance strategy to correct the path.
[0042] The reason for choosing 1.5 meters as the threshold is that it is set based on the typical size of smart cars, the general conditions of the surrounding environment, and the accuracy of sensors. The width and length of smart cars are between 1 meter and 2 meters, and the threshold of 1.5 meters can ensure that there is enough space on both sides of the car body to avoid collisions with obstacles. At the same time, this value is also set based on the effective measurement range of lidar and other sensors. In most cases, a distance of 1.5 meters is enough for smart cars to respond in time and perform obstacle avoidance operations to ensure driving safety. Setting this value too large may lead to an overly conservative path and affect the driving efficiency of the smart car, while setting it too small may increase the risk of collision. Therefore, 1.5 meters is a reasonable threshold that takes into account safety and efficiency.
[0043] If the obstacle is greater than 1.5 meters away, the system will determine that the current path is safe and no path correction is required. The smart car can continue to drive along the initial path and perform subsequent tasks. If the obstacle is less than 1.5 meters away, the system will start the obstacle avoidance decision module and perform secondary path planning to ensure that the vehicle passes the obstacle area safely.
[0044] In step S16, if the obstacle distance is less than the set obstacle avoidance threshold, a secondary motion path planning is performed on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path, including: Based on the extended Kalman filter algorithm, a secondary motion state estimation is performed on the obstacle position and the motion state information to obtain a secondary predicted motion path; The secondary predicted motion path is smoothed based on the Bezier curve to obtain a secondary motion path.
[0045] It is worth noting that in step S16, the system makes a judgment based on the distance of the obstacle and the set threshold. If the obstacle distance is less than the set value, the obstacle avoidance decision module is activated to further calculate and plan a new motion path. This process includes the following key steps: First, the system processes the obstacle position and motion state information through the extended Kalman filter (EKF) algorithm. Kalman filter is a recursive algorithm for dynamic system state estimation, which can provide optimal estimation in noisy measurement data. Extended Kalman filter (EKF) is an extension of traditional Kalman filter, the main difference is that it can handle nonlinear systems. Traditional Kalman filter algorithm assumes that the state transfer equation and observation equation of the system are linear, but in practical applications, most systems (such as the motion model of smart cars) are nonlinear, and the relationship between state variables and observation values is not a simple linear relationship.
[0046] The extended Kalman filter overcomes this problem by linearizing the nonlinear model of the system. Specifically, the extended Kalman filter approximates the nonlinear function of the system through Taylor expansion at each moment to obtain a linearized model. This approximate model is used for state estimation and prediction, and the predicted value is updated through the Kalman gain, and corrected in combination with the actual measurement value of the sensor, so as to obtain a more accurate motion state estimation.
[0047] In step S16, the main purpose of using the extended Kalman filter is to dynamically estimate the obstacle position and the motion state of the smart car. Since there is a certain nonlinear relationship between the obstacle position and the motion state of the smart car, the extended Kalman filter can still provide an accurate estimate under inaccurate sensor data and motion models. In this way, the system can perform secondary motion path planning based on the current state of the smart car (such as speed, direction, etc.) and the relative position of the obstacle.
[0048] Next, based on the Bezier curve, the system smoothes the secondary motion path after the extended Kalman filter correction. The Bezier curve is a curve fitting method based on control points, which can generate a smooth and continuous path. By using the Bezier curve for interpolation at the key points of the path, the system can ensure that the path transitions smoothly at turns and avoids sharp path changes. This method is very effective in processing the path planning of smart cars, especially in obstacle avoidance and dynamic environments, and can ensure that the vehicle body will not have stability problems due to discontinuity or unevenness of the path.
[0049] In summary, the main advantage of the extended Kalman filter over the Kalman filter is that it can handle nonlinear systems. In the path planning of smart cars, since the relationship between the motion model and the obstacle position is often nonlinear, the use of the extended Kalman filter can effectively correct the system state and provide more accurate estimation results, thereby ensuring that the path planning and obstacle avoidance decisions of smart cars are more accurate and stable.
[0050] In step S17, the secondary motion path and the actual path of the smart car are compared to obtain a path deviation, including: The secondary motion path and the actual path of the smart car are resampled to obtain the key point coordinates of the secondary motion path and the actual path of the smart car. The path deviation is calculated by the following formula: in, is the path deviation, is the number of feature points, is the second motion path The horizontal coordinates of the key points, The actual path of the smart car The horizontal coordinates of the key points, is the second motion path The vertical coordinates of the key points, The actual path of the smart car The vertical coordinate of the key point.
[0051] It is worth noting that in step S17, the system compares the secondary motion path with the actual path of the smart car and calculates the path deviation. The core task of this step is to evaluate the driving effect of the smart car by comparing the difference between the actual path and the planned path, and adjust the path according to the deviation.
[0052] The actual path is obtained by real-time tracking through the smart car's sensor system. During the driving process of the smart car, the on-board system will continuously record the vehicle's location data, which is obtained through devices such as GPS modules, inertial navigation systems (INS) or encoders. The GPS module provides global positioning information for the smart car and tracks the vehicle's location in real time, while the INS system tracks the vehicle's motion state through accelerometers and gyroscopes to calculate the vehicle's speed, direction and acceleration. The coordinated work of these devices enables the system to obtain the actual trajectory of the smart car during driving.
[0053] When the actual path data is collected in real time, the system will record the coordinates of each sampling point. Similar to path sampling, the actual path sampling is also based on uniform interval sampling, and the sampling points are collected according to the preset time interval or distance interval. The coordinates of the sampling points represent the actual position of the vehicle at different time nodes during the driving process. These sampling point data will become the basis for the subsequent calculation of path deviation.
[0054] The path deviation is calculated by comparing the key path points between the secondary motion path and the actual path. First, the secondary motion path is the path adjusted by the obstacle avoidance decision module. This path is a correction of the initial motion path taking into account obstacles. The system samples this path and compares it with the actual path. Specifically, the system calculates the Euclidean distance between each key point on the secondary motion path and the corresponding point on the actual path to obtain the deviation value of each sampled point. The system then accumulates these deviation values and takes the average to calculate the deviation of the overall path.
[0055] The path deviation is calculated by comparing the horizontal and vertical coordinates of each path point, finding the difference between them, and using the Euclidean distance to calculate. This method can quantify the straight-line distance between path points, thereby reflecting the overall difference between paths. Euclidean distance is widely used in such problems because it can accurately measure the straight-line distance between two points and is a simple and effective calculation method for path planning and correction.
[0056] The purpose of calculating the path deviation is to determine whether the smart car is driving along the expected path and to ensure its driving stability. If the path deviation is small, it means that the actual driving path of the smart car is highly consistent with the planned path, and the path planning is successful. If the path deviation is large, it means that the actual driving trajectory of the smart car deviates from the planned path, and the system needs to correct the path to ensure that the vehicle can return to the optimal path.
[0057] In general, path deviation calculation compares the coordinates of key points between the actual path and the secondary motion path, and uses Euclidean distance to quantify the deviation, thereby providing a basis for path correction. In this way, the system can monitor the driving status of the smart car in real time and make corresponding adjustments when the deviation is too large to ensure the safety and stability of the driving process.
[0058] In step S18, if the path deviation is less than the set deviation threshold, the secondary motion path is output as the optimal path; In step S18, the system decides whether to output the secondary motion path as the optimal path based on the comparison between the path deviation and the preset threshold. Specifically, the path deviation is calculated by comparing the difference between the actual driving path of the smart car and the secondary motion path. When the system calculates that the path deviation is less than the set threshold, it means that the smart car can stably and accurately drive along the secondary motion path, and the path deviation is already within an acceptable range. The system will then consider the current secondary motion path to be the optimal path and output it as the driving path of the smart car. If the path deviation is greater than the set threshold, it indicates that there is a large deviation between the actual driving trajectory of the smart car and the predetermined path, which may cause unstable driving or conflict with the surrounding environment. The system will continue to correct the path until the deviation meets the safety standard.
[0059] The path deviation threshold is set to 0.5 meters. The selection of this value takes into account the body size of the smart car, the accuracy of the sensor, the efficiency and safety of path planning. The threshold of 0.5 meters can provide enough space to tolerate the small errors of the sensor in actual applications while ensuring the stability of the vehicle. Considering that the width of the smart car is between 1.5 meters and 2 meters, the deviation threshold of 0.5 meters can not only ensure that the vehicle has enough space to avoid collision with obstacles when adjusting the path, but also effectively prevent the path from being too conservative, thereby affecting the driving efficiency of the vehicle. The accuracy of the sensor is also an important basis for setting the threshold. LiDAR and ultrasonic sensors can provide higher accuracy and can achieve centimeter-level positioning accuracy, while GPS and inertial sensors have lower accuracy. However, the threshold of 0.5 meters can reasonably deal with the accuracy differences between these sensors and ensure that the path planning system of the smart car can respond in a timely and effective manner.
[0060] The selection of 0.5 meters as the threshold also takes into account the timeliness of path correction and the smart car's ability to respond to path changes. If the path deviation is greater than 0.5 meters, it will lead to a larger path adjustment, which will affect the stability of the vehicle, especially in fast driving or complex environments, where excessive path deviation will bring higher risks. The 0.5-meter threshold can ensure that the system avoids too frequent path adjustments while ensuring safety, optimizes system efficiency, and enables the smart car to drive stably in a dynamically changing environment. When the path deviation is less than 0.5 meters, it means that the smart car has successfully remained near the target path, the path correction strategy is no longer frequently triggered, and the smart car can smoothly perform the scheduled task. Therefore, 0.5 meters is a reasonable threshold that can balance safety, efficiency, and path smoothness, ensuring that the system can adjust the path in real time and accurately, and ultimately output the optimal driving route.
[0061] In step S19, if the path deviation is greater than the set deviation threshold, the set secondary motion path is corrected based on the error correction mechanism to obtain the optimal path, including: Based on the particle filter and the path deviation, the speed, the direction and the acceleration are corrected to obtain a corrected speed, direction and acceleration; Based on the Kalman filter algorithm, the motion state is estimated for the corrected speed, direction and acceleration to obtain three predicted motion paths; The three predicted motion paths are smoothed based on Bezier curves to obtain an optimal motion path.
[0062] It is worth noting that in step S19, the system determines whether to correct the path by comparing the path deviation with the set threshold. If the path deviation is greater than the set threshold, the system will start the path correction mechanism and obtain the optimal path through particle filtering and path correction strategy. This process will first correct the path deviation according to the particle filtering algorithm, and then correct the speed, direction and acceleration of the smart car.
[0063] Particle filtering is a nonlinear state estimation algorithm based on the Monte Carlo method. It represents the state of the system by generating multiple particles, each of which has a weight value that reflects the probability that it conforms to the current observation value. In path correction, particle filtering calculates the difference between the current path and the target path by modeling the path deviation. Each particle represents the path correction state, and the system adjusts the position and weight of the particle according to the path deviation, the gap between the actual path and the target path. Through continuous iteration, particle filtering can gradually approach the optimal path. Compared with traditional filtering methods, particle filtering can handle more complex nonlinear problems, so it is particularly suitable for application in the dynamic environment of intelligent vehicle path correction.
[0064] In the process of path correction, the particle filter first estimates and corrects the speed, direction and acceleration of the smart car based on the initial path and the calculated path deviation. The path deviation represents the difference between the actual driving path and the planned path. The particle filter generates multiple particles by modeling and calculating these deviations, and each particle represents a path correction scheme. According to the size of the path deviation, the particle filter will adjust the three parameters of speed, direction and acceleration, and correct the values of these parameters so that the vehicle can return to the optimal path. For example, if the path deviation is large, the particle filter will slow down the driving speed by adjusting the speed, thereby reducing the deviation; if the path deviation is concentrated in a certain large turn, the particle filter will appropriately adjust the direction and acceleration so that the vehicle can turn smoothly and avoid instability.
[0065] Subsequently, the system will further optimize these corrected parameters in combination with the Kalman filter algorithm. The Kalman filter can accurately estimate the speed, direction, and acceleration after the path correction through the feedback mechanism of prediction and measurement. The Kalman filter takes the correction data obtained by the particle filter as input and optimizes these data to make the final motion state more accurate and stable. By combining particle filtering and Kalman filtering, the system can comprehensively consider different path deviations in complex path correction tasks, and effectively adjust the speed, direction, and acceleration of the smart car to ensure that the vehicle can always follow the optimal path.
[0066] Finally, based on the Bezier curve, the system smoothes the three predicted motion paths and further corrects the paths. The Bezier curve adjusts the control points to make the path turns smoother and avoid sharp path changes. In this process, the Bezier curve smoothes the path to ensure a smoother transition after the path adjustment, avoiding unnecessary violent movements or unstable states during the driving of the smart car.
[0067] In summary, the particle filter algorithm is closely integrated with the path deviation, and can adjust the speed, direction and acceleration of the smart car in real time through multiple iterations of path correction, so that the path deviation can be effectively corrected. These parameters are further optimized by combining the Kalman filter, and finally the path is smoothed by the Bezier curve to ensure that the smart car can drive smoothly and safely in a dynamic environment.
[0068] Reference Figure 2 The second embodiment of the present invention provides a single-chip intelligent car teaching aid case intelligent matching system, including: A data acquisition module is used to obtain the obstacle position and motion status information; A vector information analysis module, used to input the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration; An initial path planning module, used to perform initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path; An obstacle distance module, used to calculate the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance; The optimal path module is used to output the initial motion path as the optimal path if the obstacle distance is greater than the set obstacle avoidance threshold; An obstacle avoidance decision module, configured to perform secondary motion path planning on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path if the obstacle distance is less than a set obstacle avoidance threshold; A path deviation module compares the secondary motion path with the actual path of the smart car to obtain a path deviation; Secondary motion path module, if the path deviation is less than the set deviation threshold, the secondary motion path is output as the optimal path; The error correction module is used to correct the set secondary motion path based on the error correction mechanism to obtain the optimal path if the path deviation is greater than the set deviation threshold.
[0069] It should be noted that the single-chip microcomputer intelligent car teaching aid case intelligent matching system provided in an embodiment of the present invention is used to execute all the process steps of the single-chip microcomputer intelligent car teaching aid case intelligent matching method in the above embodiment. The working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.
[0070] The embodiment of the present invention also provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a single-chip computer intelligent vehicle teaching aid case intelligent matching program. When the processor executes the computer program, the steps in the above-mentioned single-chip computer intelligent vehicle teaching aid case intelligent matching method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the error correction module.
[0071] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0072] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0073] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0074] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0075] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0076] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0077] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A single-chip microcomputer intelligent car teaching aid case intelligent matching method, characterized in that: Executed by a computer, including: Obtaining obstacle location and motion state information; wherein the motion state information includes: speed range, steering angle, acceleration trend and stability state; Inputting the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration; Performing initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path; Calculating the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance; If the obstacle distance is greater than the set obstacle avoidance threshold, the initial motion path is output as the optimal path; If the obstacle distance is less than the set obstacle avoidance threshold, a secondary motion path planning is performed on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path; Comparing the secondary motion path with the actual path of the smart car to obtain a path deviation; If the path deviation is less than the set deviation threshold, the secondary motion path is output as the optimal path; If the path deviation is greater than the set deviation threshold, the set secondary motion path is corrected based on the error correction mechanism to obtain the optimal path.
2. The single-chip microcomputer intelligent car teaching aid case intelligent matching method according to claim 1 is characterized in that: The motion state information is input into a pre-established vector information analysis model to obtain speed, direction and acceleration, including: Extracting the motion state information and performing data preprocessing through the input layer of the vector information analysis model to obtain standard motion state information; Deducing the standard motion state information through the hidden layer of the vector information analysis model to obtain a mapping relationship; The mapping relationship is calculated through the output layer of the vector information analysis model to obtain speed, direction and acceleration.
3. The single-chip microcomputer intelligent car teaching aid case intelligent matching method according to claim 1 is characterized in that: The performing initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path includes: Based on the Kalman filter algorithm, the motion state of the speed, the direction and the acceleration is estimated to obtain a predicted motion path; The predicted motion path is smoothed based on the Bezier curve to obtain an initial motion path.
4. The single-chip microcomputer intelligent car teaching aid case intelligent matching method according to claim 1 is characterized in that: The calculating the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance includes: Resampling the initial motion path to obtain key point coordinates; Obstacle distance is calculated by the following formula: in, The first The horizontal coordinates of the key points, The first The vertical coordinates of the key points, For the The horizontal coordinate of the obstacle, For the The vertical coordinate of the obstacle.
5. The single-chip microcomputer intelligent car teaching aid case intelligent matching method according to claim 1 is characterized in that: If the obstacle distance is less than the set obstacle avoidance threshold, a secondary motion path planning is performed on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path, including: Based on the extended Kalman filter algorithm, a secondary motion state estimation is performed on the obstacle position and the motion state information to obtain a secondary predicted motion path; The secondary predicted motion path is smoothed based on the Bezier curve to obtain a secondary motion path.
6. The single-chip microcomputer intelligent car teaching aid case intelligent matching method according to claim 1 is characterized in that: The comparing the secondary motion path and the actual path of the smart car to obtain the path deviation includes: The secondary motion path and the actual path of the smart car are resampled to obtain the key point coordinates of the secondary motion path and the actual path of the smart car. The path deviation is calculated by the following formula: in, is the path deviation, is the number of feature points, is the second motion path The horizontal coordinates of the key points, The actual path of the smart car The horizontal coordinates of the key points, is the second motion path The vertical coordinates of the key points, The actual path of the smart car The vertical coordinate of the key point.
7. The single-chip microcomputer intelligent car teaching aid case intelligent matching method according to claim 1 is characterized in that: If the path deviation is greater than the set deviation threshold, based on the error correction mechanism, the set secondary motion path is corrected to obtain the optimal path, including: Based on the particle filter and the path deviation, the speed, the direction and the acceleration are corrected to obtain a corrected speed, direction and acceleration; Based on the Kalman filter algorithm, the motion state is estimated for the corrected speed, direction and acceleration to obtain three predicted motion paths; The three predicted motion paths are smoothed based on Bezier curves to obtain an optimal motion path.
8. A single-chip microcomputer intelligent car teaching aid case intelligent matching system, characterized in that: include: A data acquisition module is used to obtain the obstacle position and motion status information; A vector information analysis module, used to input the motion state information into a pre-established vector information analysis model to obtain speed, direction and acceleration; An initial path planning module, used to perform initial path planning according to the speed, the direction and the acceleration to obtain an initial motion path; An obstacle distance module, used to calculate the obstacle distance according to the initial motion path and the obstacle position to obtain the obstacle distance; The optimal path module is used to output the initial motion path as the optimal path if the obstacle distance is greater than the set obstacle avoidance threshold; An obstacle avoidance decision module, configured to perform secondary motion path planning on the obstacle position and the motion state information based on the obstacle avoidance decision module to obtain a secondary motion path if the obstacle distance is less than a set obstacle avoidance threshold; A path deviation module is used to compare the secondary motion path with the actual path of the smart car to obtain a path deviation; A secondary motion path module, used to output the secondary motion path as the optimal path if the path deviation is less than a set deviation threshold; The error correction module is used to correct the set secondary motion path based on the error correction mechanism to obtain the optimal path if the path deviation is greater than the set deviation threshold.
9. An electronic device, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the single-chip microcomputer intelligent car teaching aid case intelligent matching method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the single-chip microcomputer intelligent vehicle teaching aid case intelligent matching method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Tunneling machine cutting trace planning system and method
CN109236292A
Intelligent vehicle autonomous path planning method and system, and readable storage medium
CN112798002A
Vehicle curve lane changing obstacle avoidance trajectory planning method based on coordinate system conversion
CN116339320A
Obstacle identification method of road roller
CN118518127A
Unmanned vehicle-combined obstacle map marking method and system
CN119085695A