Processing method and system of ultrasonic ranging signal, vehicle and electronic equipment
By optimizing the processing of ultrasonic ranging signals using time series models and particle filtering algorithms, the problem of insufficient modeling accuracy of ultrasonic ranging signals was solved, signal quality was improved, and the safety and accuracy of driving and construction were ensured.
Patent Information
- Application Number
- CN202211178122.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-09-23
AI Technical Summary
The modeling accuracy of ultrasonic ranging signals in existing technologies is not high, resulting in poor quality of ultrasonic output signals, which affects driving safety and construction quality.
By acquiring the current ultrasonic ranging signal detection and prediction values, and using a time series model and particle filtering algorithm, the weights of sample particles are determined, and normalization and resampling are performed to optimize the filtering process of ultrasonic ranging data.
It improves the quality of ultrasonic output signals, reduces noise and random errors, and enhances driving safety and construction quality.
Smart Images

Figure CN115586531B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to an ultrasonic ranging signal processing method and system, a vehicle and an electronic device. BACKGROUND
[0002] Ultrasonic sensors are widely used in the surrounding environment perception of vehicles. By measuring the time difference between the emission and reception of ultrasonic waves, and combining the real-time sound velocity, the distance between the ultrasonic sensor and the measured object can be calculated. For example, in a parking system, the ultrasonic sensor can measure the distance to eliminate the driver's need to look around when parking and starting the vehicle, thereby improving driving safety and convenience.
[0003] In many cases, the measured object faced by the vehicle in different environments is random, and the ultrasonic sensor on the vehicle and the measured object are in a state of relative static or relative low-speed motion, for example, ultrasonic ranging when parking a vehicle in a garage, and asphalt paving thickness measured by ultrasonic waves when a paving machine is working. In addition, ultrasonic signals are easily affected by air temperature, humidity, airflow, etc., so ultrasonic signals often change randomly and contain a lot of environmental noise.
[0004] Therefore, because the motion model of the measured object relative to the ultrasonic sensor is random or has no obvious motion rule, the general dynamics or kinematics modeling method cannot meet the modeling accuracy of the ultrasonic signal. Thus, the driving safety and / or construction quality of the vehicle based on the ultrasonic sensor for ranging are reduced. SUMMARY
[0005] The present application provides an ultrasonic ranging signal processing method and system, a vehicle and an electronic device to solve the problem of low quality of ultrasonic output signals caused by low modeling accuracy of ultrasonic ranging signals in the prior art, and to achieve high-precision modeling of ultrasonic ranging signals and improve the quality of ultrasonic output signals.
[0006] The present application provides an ultrasonic ranging signal processing method, comprising:
[0007] obtaining first data and second data, the first data being the detection value of the ultrasonic ranging signal at the current time, and the second data being the predicted value of the ultrasonic ranging data at the current time obtained based on a preset time sequence model of sample particles and ultrasonic ranging data; the sample particles being a preset number of sample data generated based on the detection value of the ultrasonic ranging data at the previous time and the predicted value of the ultrasonic ranging data at the previous time, the previous time being a time before the current time;
[0008] determine a weight of each of the sample particles at the current time based on the first data, the second data and a preset observation equation;
[0009] normalize the weight of each of the sample particles at the current time and resample to obtain a final weight of each of the sample particles at the current time;
[0010] determine a calculated value of ultrasonic ranging data at the current time based on a preselected sample particle and the final weight of the preselected sample particle as the ultrasonic ranging data at the current time, the preselected sample particle being the sample particle selected according to a preset rule from the sample particles at the current time.
[0011] According to the method for processing ultrasonic ranging signals, after determining the weight of each of the sample particles at the current time based on the first data, the second data and a preset observation equation, the method further comprises:
[0012] cluster the sample particles at the current time to obtain a plurality of clusters;
[0013] determine the sample particle in the cluster closest to the cluster center based on a cluster center of each of the clusters;
[0014] compensate the weight of the sample particle at the current time in the cluster closest to the cluster center according to a preset compensation value.
[0015] According to the method for processing ultrasonic ranging signals, the normalization of the weight of each of the sample particles at the current time and the resampling comprise:
[0016] randomly select a weight less than or equal to a preset threshold as a first new weight of a sample particle to be corrected, the sample particle to be corrected being the sample particle with a normalized weight greater than the preset threshold after the normalization of the weight;
[0017] distribute the difference between the preset threshold and the first new weight uniformly to other sample particles except the sample particle to be corrected, so that other sample particles obtain a second new weight;
[0018] normalize the first new weight and the second new weight, and perform the resampling again when there is a weight greater than the preset threshold in the new normalized weight.
[0019] According to the method for processing ultrasonic ranging signals, the calculation value of the ultrasonic ranging data at the current time point determined based on the preselected sample particles and the final value of the weight of the preselected sample particles is taken as the ultrasonic ranging data at the current time point, which comprises:
[0020] According to the preset rule, the preselected sample particles are determined from the sample particles at the current time point.
[0021] The weighted sum of the preselected sample particles is taken as the ultrasonic ranging data at the current time point.
[0022] According to the method for processing ultrasonic ranging signals, the preselected sample particles are determined from the sample particles at the current time point according to the preset rule, which comprises:
[0023] Based on the final value of the weight of the sample particles at the current time point, the selection probability of each final value of the weight being selected is determined.
[0024] Based on the selection probability, the cumulative probability of each final value of the weight being selected is determined.
[0025] Based on the cumulative probability and a random number randomly generated within the limited range of the cumulative probability, the preselected sample particles are determined from the sample particles at the current time point.
[0026] Different random numbers are repeatedly generated until the preselected sample particles are determined from the sample particles at the current time point.
[0027] According to the method for processing ultrasonic ranging signals, the method for generating the sample particles comprises:
[0028] The method for generating the sample particles comprises:
[0029] Based on the initial value of the detection value of the ultrasonic ranging data at the previous time point and the predicted value of the ultrasonic ranging data at the previous time point obtained from the preset time sequence model, the generation range of the sample particles at the previous time point is determined.
[0030] The preselected sample particles at the previous time point are generated within the corresponding generation range.
[0031] The present application also provides an ultrasonic ranging signal processing system, which comprises:
[0032] An acquisition module is configured to acquire first data and second data, the first data being a detection value of an ultrasonic ranging signal at a current time, and the second data being a predicted value of ultrasonic ranging data at the current time obtained based on a preset time sequence model of sample particles and ultrasonic ranging data; the sample particles being a preset number of sample data at a previous time generated based on a detection value of ultrasonic ranging data at the previous time and a predicted value of ultrasonic ranging data at the previous time, the previous time being a time before the current time;
[0033] A first processing module is configured to determine a weight of each of the sample particles at the current time based on the first data, the second data, and a preset observation equation.
[0034] A second processing module is configured to normalize and resample the weight of each of the sample particles at the current time to obtain a final value of the weight of each of the sample particles at the current time.
[0035] A third processing module is configured to determine a calculated value of ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle, and use the calculated value as the ultrasonic ranging data at the current time, the preselected sample particle being a sample particle selected from the sample particles at the current time according to a preset rule.
[0036] The application further provides a vehicle, comprising a vehicle body, an ultrasonic sensor arranged on the vehicle body, and an ultrasonic ranging signal processing system as described above.
[0037] The application further provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the ultrasonic ranging signal processing method according to any one of the above when executing the program.
[0038] The application further provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the ultrasonic ranging signal processing method according to any one of the above.
[0039] The application provides an ultrasonic ranging signal processing method, system, vehicle and electronic equipment. The detection value of the current time ultrasonic ranging data is obtained, and the prediction value of the current time ultrasonic ranging data obtained based on sample particles and a preset time sequence model of the ultrasonic ranging data is obtained. Then, the weight of each sample particle at the current time is determined based on the detection value of the current time ultrasonic ranging data, the prediction value of the ultrasonic ranging data and a preset observation equation. After the weight of each sample particle at the current time is normalized, resampling is performed, and then the final weight value allocated to each sample particle at the current time is obtained. Finally, the calculation value of the current time ultrasonic ranging data determined based on the preselected sample particles selected from the sample particles at the current time and the final weight value corresponding to the preselected sample particles is taken as the current time ultrasonic ranging data. The time sequence characteristics of the ultrasonic ranging data are utilized, the ultrasonic ranging data is regarded as a time sequence, a preset time sequence model of the ultrasonic ranging data is used, and then the time sequence model is taken as a prior model in a particle filtering algorithm, so that the detection data of the ultrasonic ranging sensor is filtered and optimized, the noise and random error of the output signal of the ultrasonic sensor are reduced, the quality of the ultrasonic output signal is improved, and the driving safety and / or construction quality are ensured. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0041] Figure 1 is a flowchart of an ultrasonic ranging signal processing method provided by an embodiment of the application;
[0042] Figure 2 is a relationship diagram of the detection value of the ultrasonic sensor and time;
[0043] Figure 3 is a relationship diagram of the estimated value of the detection value processed by the ultrasonic ranging signal processing method provided by the embodiment of the application and time; Figure 2
[0044] Figure 4 is a structural schematic diagram of an ultrasonic ranging signal processing system provided by an embodiment of the application;
[0045] Figure 5 is a structural schematic diagram of an electronic equipment provided by the application. DETAILED DESCRIPTION
[0046] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in conjunction with the drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0047] It can be understood that the distance between the ultrasonic sensor and the object to be measured can be calculated by measuring the time difference from the emission of the ultrasonic wave to the reception of the echo wave, combined with the real-time sound velocity. Therefore, the ultrasonic sensor is more suitable for the scene where the object to be measured moves at a low speed relative to the ultrasonic sensor or is in a relatively static state. Therefore, the current application of the ultrasonic sensor on the vehicle mainly focuses on the parking assistance system, the automatic parking system, the blind area warning system and the leveling system.
[0048] However, the vehicle is often in different environments, and is mostly located outdoors. Therefore, the object to be measured around the vehicle is not fixed with the change of the environment. In addition, the ultrasonic wave itself is easily affected by factors such as air temperature and humidity. The distance detection using the ultrasonic sensor often faces the working condition containing strong noise and interference. At this time, if the ultrasonic ranging data is not processed, random errors are more likely to occur, thereby affecting the driving experience and / or construction quality of the user, and even affecting the driving safety.
[0049] Based on this, the embodiment of the present application provides an ultrasonic ranging signal processing method, thereby improving the accuracy of distance detection based on the ultrasonic sensor, that is, improving the driving safety and / or construction quality of the vehicle.
[0050] The following will be described in conjunction with Figures 1 to 3 The present application provides an ultrasonic ranging signal processing method, which is executed based on the controller of the vehicle and / or the software or hardware therein. The controller can be the vehicle controller provided on the vehicle itself, or a controller separately provided for processing the ultrasonic ranging signal.
[0051] As Figure 1 shown, the ultrasonic ranging signal processing method provided by the embodiment of the present application comprises the following steps:
[0052] 101, obtaining first data and second data, the first data being a detection value of the ultrasonic ranging data at the current time, and the second data being a predicted value of the ultrasonic ranging data at the current time obtained based on a preset time sequence model of sample particles and ultrasonic ranging data; the sample particles being a preset number of sample data generated based on the detection value of the ultrasonic ranging data at the previous time, and the previous time being a time before the current time;
[0053] It can be understood that for a vehicle, the to-be-detected object to be detected and the motion track of the vehicle are not necessarily the same each time of parking or road leveling. Thus, the motion model of the to-be-detected object relative to the ultrasonic sensor is random or has no obvious motion rule. Based on this, it is difficult to meet the modeling accuracy of the ultrasonic signal based on general dynamics or kinematics modeling method.
[0054] Further, the ultrasonic sensor on the vehicle generally sends the detected data to the controller based on a preset period, that is, the detection data is sent to the controller once every preset period, and then the controller judges the distance between the to-be-detected object and the vehicle based on the obtained detection data, and further reminds the user or controls the vehicle action. It can be seen that the ultrasonic signal has obvious time sequence characteristics, and the modeling method based on time sequence can meet the modeling requirements of the ultrasonic signal.
[0055] Specifically, based on the time sequence of the ultrasonic ranging data obtained at each preset period, a time sequence model of the ultrasonic ranging data can be constructed, and then based on the time sequence model and the sample particles at the previous moment, the prior value of each sample particle at the current moment can be obtained, that is, the prediction value of the ultrasonic ranging data at the current moment.
[0056] More specifically, based on the time sequence model, the sample particles at the previous moment can be used to predict the ultrasonic ranging data at the current moment. Therefore, the number of previous moments is related to the specific form of the time sequence model. For example: when the ultrasonic ranging data is subject to a third-order autoregressive model as shown in the following formula 1:
[0057] X t = a1X t-1 + a2X t-2 + a3X t-3 + ω (1)
[0058] Wherein, X t is the ultrasonic ranging data at time t; a i , i = 1, 2, 3 are undetermined coefficients, for example: can be determined by using experimental data through least square method; ω ~ N(0, Q) is a noise subject to normal distribution with mean value 0 and variance Q. The ultrasonic ranging data at the current moment t is determined by the ultrasonic ranging data at three previous moments t-1, t-2 and t-3. Therefore, the first preset number of previous moments is three.
[0059] Furthermore, the number of predicted values for the ultrasonic ranging data at the current moment is determined by the number of sample particles at each previous moment. For example, if the second preset number of sample particles at the previous moment t-1 is ten, the number of predicted values for the ultrasonic ranging data at the current moment that can be obtained through the third-order autoregressive model shown in Formula 1 is also ten. That is, the more sample particles generated at each previous moment, the more predicted values of the ultrasonic ranging data at the current moment will be obtained.
[0060] 102. Based on the first data, the second data, and the preset observation equation, determine the weight of each sample particle at the current moment;
[0061] Specifically, the first data is the detected value of the ultrasonic ranging data at the current moment, that is, the observed value obtained by the ultrasonic sensor at the current moment. The second data is the predicted value of the ultrasonic ranging data at the current moment obtained based on the sample particles and the preset time series model, that is, the prior value at the current moment. The posterior value can be obtained by using the prior value and the observed value.
[0062] Understandably, in particle filtering algorithms, an ultrasonic sensor can be represented by an observation equation, and the form of the observation equation can generally be:
[0063] Z j =h(X) j )+v (2)
[0064] Among them, Z j denoted by , represents the detected value of the ultrasonic ranging data output by the ultrasonic sensor at time j; h(·) is the measurement function; v~N(0,R) is noise that follows a normal distribution with a mean of 0 and a variance of R.
[0065] More specifically, the observation equation shown in Formula 2 above is used as the preset observation equation in the ultrasonic ranging signal processing method provided in this embodiment of the invention. Taking the example that the ultrasonic ranging data follows the third-order autoregressive model shown in Formula 1, the prior value of sample particle i at time j is... for:
[0066]
[0067] At the same time, because the detected value Z of the ultrasonic ranging data at time j j Given that, we can combine formulas 2 and 3, and then use Z... j , The weights of sample particle i at time j-1, the time preceding time j. This allows us to obtain the weight of sample particle i at time j.
[0068]
[0069] 103. Normalize the weight of each sample particle at the current time and resample to obtain the final weight value of each sample particle at the current time;
[0070] Specifically, after determining the weights of each sample particle at time j, the weights need to be normalized and then resampled to reduce the possibility of sample particle degradation, thereby improving the filtering and optimization effect of the ultrasonic ranging data output by the ultrasonic sensor.
[0071] 104. The calculated value of the ultrasonic ranging data at the current moment, determined based on the pre-selected sample particles and the final weight value of the pre-selected sample particles, is used as the ultrasonic ranging data at the current moment. The pre-selected sample particles are the sample particles selected from the sample particles at the current moment according to a preset rule.
[0072] Specifically, as shown in Formula 4, the weight at the current moment is related to the weight at the previous moment. Therefore, in order to obtain the weight of the next moment at the initial moment, initial weights can be assigned to the generated sample particles. For example, initial weights of 1 / n can be assigned to each of the n sample particles; or weights can be randomly assigned to the n sample particles, and then the sum of the weights of each sample particle can be guaranteed to be 1.
[0073] The ultrasonic ranging signal processing method provided in this embodiment of the invention utilizes the temporal characteristics of ultrasonic ranging data, treats ultrasonic ranging data as a time series, presets a time series model of ultrasonic ranging data, and then uses the time series model as a prior model in the particle filter algorithm to achieve filtering optimization of the detection data of ultrasonic ranging sensor, thereby reducing the noise and random error of ultrasonic sensor output signal and improving the quality of ultrasonic output signal.
[0074] As an embodiment of the present invention, after determining the weight of each sample particle at the current moment based on the first data, the second data, and the preset observation equation, the method further includes:
[0075] Cluster the sample particles at the current moment to obtain multiple clusters;
[0076] Based on the cluster center of each cluster, determine the sample particle in the cluster that is closest to the cluster center;
[0077] The weight of the sample particle at the current moment that is closest to the cluster center in the cluster is compensated according to a preset compensation value.
[0078] Specifically, after determining the weight of each sample particle at the current time, the sample particles are clustered, and then for each cluster center, a sample particle closest to the cluster center is selected, and the weight of the selected sample particle is added to a preset compensation value, which can increase the weight of the selected sample particle, facilitate the removal of sample particles far from the cluster center, and thus speed up the iteration of the sample particles, that is, improve the calculation speed of the particle filtering algorithm.
[0079] More specifically, the clustering of the sample particles can select the K-means clustering algorithm, and then the weight of the selected K sample particles is compensated; the preset compensation value can be set as a fixed value, which can be determined according to experience.
[0080] As an embodiment of the present application, the normalization and resampling of the weight of each sample particle at the current time include:
[0081] Within a range less than or equal to a preset threshold, a weight is randomly selected as a first new weight of a sample particle to be corrected, the sample particle to be corrected being a sample particle with a normalized weight greater than the preset threshold after the weight is normalized;
[0082] The difference between the preset threshold and the first new weight is uniformly distributed to other sample particles except the sample particle to be corrected, so that other sample particles obtain second new weights;
[0083] The first new weight and the second new weight are normalized, and when there is a weight greater than the preset threshold in the new normalized weight, the resampling is performed again.
[0084] Specifically, the preset threshold can be set according to experience, for example: 0.8. If the weight of a sample particle is greater than the preset threshold, a weight between 0 and the preset threshold is randomly generated, for example: 0.5, as the new weight of the sample particle to be corrected, and then the difference between the new weight and the preset threshold: 0.8-0.5=0.3 is uniformly distributed to other remaining sample particles, and all weights are normalized again. Repeat this operation until the weight of all sample particles is less than or equal to the preset threshold 0.8, which can effectively correct the sample particles deviating far from other sample particles, that is, abnormal data generated when the ultrasonic sensor detects, thereby effectively slowing down the decay of the sample particles, improving the filtering effect and the stability of the ultrasonic sensor in the face of abnormal detection data output, that is, improving the anti-abnormal interference ability of the ultrasonic sensor.
[0085] As an embodiment of the present application, the calculation value of the ultrasonic ranging data of the current moment based on the preselected sample particles and the final value of the weight of the preselected sample particles is taken as the ultrasonic ranging data of the current moment, comprising:
[0086] According to the preset rule, the preselected sample particles are determined from the sample particles of the current moment;
[0087] The weighted sum of the preselected sample particles is taken as the ultrasonic ranging data of the current moment.
[0088] Specifically, by selecting preselected sample particles from the sample particles whose weights are re-determined based on re-sampling, and then taking the weighted sum of the preselected sample particles as the ultrasonic ranging data of the current moment, the abnormal data detected by the ultrasonic sensor can be further removed, the accuracy of the distance between the vehicle and the object to be measured is improved, and thus the accuracy of the ranging based on the ultrasonic sensor is improved.
[0089] More specifically, the preset rule is used to select sample particles, which can adopt a roulette algorithm or an equidistant selection method.
[0090] As an embodiment of the present application, the preselected sample particles are determined from the sample particles of the current moment according to the preset rule, comprising:
[0091] Based on the final value of the weight of the sample particles of the current moment, a selection probability of each final value of the weight being selected is determined;
[0092] Based on the selection probability, a cumulative probability of each final value of the weight being selected is determined;
[0093] Based on the cumulative probability and a random number randomly generated within the limited range of the cumulative probability, the preselected sample particles are determined from the sample particles of the current moment;
[0094] Different random numbers are repeatedly generated until the preselected sample particles are determined from the sample particles of the current moment.
[0095] Specifically, the selection probability of each weight final value being selected is determined based on the weight final value of the sample particle at the current moment, then the cumulative probability of each weight final value being selected is determined based on the selection probability, and then the preset number of preselected sample particles are determined from the sample particles at the current moment based on the cumulative probability and different random numbers randomly generated within the limited range of the cumulative probability at each round of selection. Thus, the sample particles corresponding to the distances measured closer are easily selected from the sample particles at the current moment, i.e., the probability of selecting abnormal data is reduced, and thus the optimization effect of the detection value of the ultrasonic sensor is improved.
[0096] As an embodiment of the present application, the processing method of the ultrasonic ranging signal provided by the embodiment of the present application further comprises:
[0097] The method for generating the sample particles comprises:
[0098] Based on the detection value of the ultrasonic ranging data at the previous moment and the predicted value of the ultrasonic ranging data at the previous moment obtained by the preset time sequence model, the generation range of the sample particles at the previous moment is determined.
[0099] The preset number of sample particles at the previous moment are generated within the corresponding generation range.
[0100] It can be understood that the sample particles are a plurality of sample data generated around the detection value, so that after the weight of each sample particle is determined based on the detection value and the predicted value at the same moment, the sample particle closest to the actual distance between the object to be measured and the ultrasonic sensor can be determined based on the weight. Therefore, if the distance of the generated sample particle deviating from the detection value or the predicted value, i.e., the coverage range of the sample particle, is not considered, a large number of sample particles deviating far from the actual distance will appear, and the processing of these sample particles is meaningless, i.e., the computing power is wasted and the processing efficiency is reduced.
[0101] Specifically, by generating sample particles within the difference range of the detection value and the predicted value, the generated sample particles can be prevented from deviating seriously from the actual distance, thereby improving the processing efficiency.
[0102] Next, the effect of the processing method provided by the present application is verified by taking the driving behavior of the vehicle facing the same object to be measured as an example.
[0103] Specifically, the detection value of the ultrasonic ranging data directly obtained by the ultrasonic sensor and the estimated value obtained by processing the detection value through the processing method of the ultrasonic ranging signal provided by the embodiment of the present application are plotted into the corresponding graph of the detection distance and the time, respectively, as shown in Figure 2 and Figure 3It can be seen that the processing method provided by the embodiment of the application can effectively process abnormal data obtained by the ultrasonic sensor.
[0104] A processing system of an ultrasonic ranging signal provided by the application is described below, and the processing system of an ultrasonic ranging signal described below can be correspondingly referred to the processing method of an ultrasonic ranging signal described above.
[0105] The processing system of an ultrasonic ranging signal provided by the application comprises an acquisition module 410, a first processing module 420, a second processing module 430 and a third processing module 440, as shown in the figure. Figure 4
[0106] The acquisition module 410 is configured to acquire first data and second data, the first data being a detection value of ultrasonic ranging data at a current time, and the second data being a predicted value of the ultrasonic ranging data at the current time obtained based on a preset time sequence model of sample particles and the ultrasonic ranging data, the sample particles being a preset number of sample data at a previous time generated based on a detection value of the ultrasonic ranging data at the previous time and a predicted value of the ultrasonic ranging data at the previous time, the previous time being a time before the current time.
[0107] The first processing module 420 is configured to determine a weight of each of the sample particles at the current time based on the first data, the second data and a preset observation equation.
[0108] The second processing module 430 is configured to normalize and resample the weight of each of the sample particles at the current time to obtain a final value of the weight of each of the sample particles at the current time.
[0109] The third processing module 440 is configured to determine a calculated value of the ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle, and take the calculated value as the ultrasonic ranging data at the current time, the preselected sample particle being the sample particle selected from the sample particles at the current time according to a preset rule.
[0110] The processing system of the ultrasonic ranging signal provided by the embodiment of the present application obtains the detection value of the ultrasonic ranging data at the current moment, and the predicted value of the ultrasonic ranging data at the current moment obtained based on the preset time sequence model of the sample particle and the ultrasonic ranging data, then determines the weight of each sample particle at the current moment based on the detection value of the ultrasonic ranging data at the current moment, the predicted value of the ultrasonic ranging data and the preset observation equation, and after normalizing the weight of each sample particle at the current moment, performs resampling to obtain the final weight value assigned to each sample particle at the current moment, and finally takes the calculated value of the ultrasonic ranging data at the current moment determined based on the preselected sample particle selected from the sample particles at the current moment and the final weight value corresponding to the preselected sample particle as the ultrasonic ranging data at the current moment. The time sequence characteristics of the ultrasonic ranging data are utilized to regard the ultrasonic ranging data as a time sequence, a preset time sequence model of the ultrasonic ranging data is used, and then the time sequence model is taken as a prior model in the particle filtering algorithm, so that the detection data of the ultrasonic ranging sensor is filtered and optimized, thereby reducing the noise and random error of the output signal of the ultrasonic sensor, i.e. improving the quality of the ultrasonic output signal, and further ensuring the driving safety and / or construction quality.
[0111] Preferably, the processing system of the ultrasonic ranging signal provided by the embodiment of the present application can further comprise a fourth processing module.
[0112] The fourth processing module is configured to cluster the sample particles at the current moment to obtain a plurality of clusters, determine the sample particle closest to the cluster center in each cluster based on the cluster center of the cluster, and compensate the weight of the sample particle closest to the cluster center in the cluster at the current moment according to a preset compensation value.
[0113] Preferably, the second processing module can be further configured to randomly select one weight as a first new weight of a to-be-corrected sample particle within a range less than or equal to a preset threshold, the to-be-corrected sample particle being the sample particle with a normalized weight greater than the preset threshold obtained after normalizing the weight, evenly distribute the difference between the preset threshold and the first new weight to other sample particles except the to-be-corrected sample particle to obtain second new weights of the other sample particles, and normalize the first new weight and the second new weights, and perform the resampling again when there is a weight greater than the preset threshold in the new normalized weight.
[0114] Preferably, the third processing module can be specifically configured to determine the preselected sample particles of the preset number from the sample particles at the current moment according to the preset rule, and take the weighted sum of the preselected sample particles of the preset number as the ultrasonic ranging data at the current moment.
[0115] As preferred, the third processing module can be further specifically configured for determining a selection probability of each of the weight final values being selected based on the weight final value of the sample particle at the current time; determining a cumulative probability of each of the weight final values being selected based on the selection probability; determining the preselected sample particle from the sample particle at the current time based on the cumulative probability and a random number randomly generated within a limited range of the cumulative probability; and repeating the generation of different random numbers until the preselected number of preselected sample particles are determined from the sample particle at the current time.
[0116] As preferred, the processing system of the ultrasonic ranging signal provided by the embodiments of the present application can further comprise a generating module.
[0117] The generating module is configured for determining a generating range of the sample particle at the previous time based on a detection value of the ultrasonic ranging data at the previous time and a predicted value of the ultrasonic ranging data at the previous time obtained by the pre-set time sequence model; and generating the pre-set number of sample particles at the previous time within the corresponding generating range.
[0118] The embodiments of the present application further provide a vehicle comprising a vehicle body, an ultrasonic sensor arranged on the vehicle body, and the processing system of the ultrasonic ranging signal provided by any of the above embodiments.
[0119] It can be understood that the vehicle comprising the processing system of the ultrasonic ranging signal provided by any of the above embodiments has all the advantages and technical effects of the processing system of the ultrasonic ranging signal, which will not be repeated here.
[0120] Specifically, the vehicle can be a passenger car, a commercial vehicle, various working machines, etc.
[0121] Figure 5 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 5As shown, the electronic device can include a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 complete mutual communication through the communications bus 540. The processor 510 can invoke a logical instruction in the memory 530 to execute an ultrasonic ranging signal processing method, the method comprising: obtaining first data and second data, the first data being a detection value of ultrasonic ranging data at a current time, and the second data being a predicted value of ultrasonic ranging data at the current time obtained based on a sample particle and a preset time sequence model of ultrasonic ranging data; the sample particle being a preset number of sample data generated based on a detection value of ultrasonic ranging data at a previous time and a predicted value of ultrasonic ranging data at the previous time, the previous time being a time before the current time; determining a weight of each of the sample particles at the current time based on the first data, the second data, and a preset observation equation; normalizing and resampling the weight of each of the sample particles at the current time to obtain a final value of the weight of each of the sample particles at the current time; determining a calculated value of ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle as the ultrasonic ranging data at the current time, the preselected sample particle being the sample particle selected according to a preset rule from the sample particles at the current time.
[0122] In addition, the logical instruction in the memory 530 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0123] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, enable the computer to perform the method of processing an ultrasonic ranging signal, the method comprising: obtaining first data and second data, the first data being a detection value of ultrasonic ranging data at a current time, the second data being a predicted value of the ultrasonic ranging data at the current time obtained based on a preset time series model of sample particles and the ultrasonic ranging data; the sample particles being a preset number of sample data at a previous time generated based on a detection value of the ultrasonic ranging data at the previous time and a predicted value of the ultrasonic ranging data at the previous time, the previous time being a time before the current time; determining a weight of each of the sample particles at the current time based on the first data, the second data, and a preset observation equation; normalizing and resampling the weight of each of the sample particles at the current time to obtain a final value of the weight of each of the sample particles at the current time; determining a calculated value of the ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle as the ultrasonic ranging data at the current time, the preselected sample particle being the sample particle selected from the sample particles at the current time according to a preset rule.
[0124] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement a method of processing an ultrasonic ranging signal, the method comprising: obtaining first data and second data, the first data being a detection value of ultrasonic ranging data at a current time, the second data being a predicted value of the ultrasonic ranging data at the current time obtained based on a preset time series model of sample particles and the ultrasonic ranging data; the sample particles being a preset number of sample data at a previous time generated based on a detection value of the ultrasonic ranging data at the previous time and a predicted value of the ultrasonic ranging data at the previous time, the previous time being a time before the current time; determining a weight of each of the sample particles at the current time based on the first data, the second data, and a preset observation equation; normalizing and resampling the weight of each of the sample particles at the current time to obtain a final value of the weight of each of the sample particles at the current time; determining a calculated value of the ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle as the ultrasonic ranging data at the current time, the preselected sample particle being the sample particle selected from the sample particles at the current time according to a preset rule.
[0125] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0126] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0127] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of processing an ultrasonic ranging signal, characterized by, The method comprises: obtaining first data and second data, the first data being a detection value of ultrasonic ranging data at a current time, and the second data being a predicted value of the ultrasonic ranging data at the current time obtained based on a preset time sequence model of sample particles and the ultrasonic ranging data; the sample particles being a preset number of sample data at a previous time generated based on a detection value of the ultrasonic ranging data at the previous time and a predicted value of the ultrasonic ranging data at the previous time, the previous time being a time before the current time; determining a weight of each of the sample particles at the current time based on the first data, the second data, and a preset observation equation; normalizing and resampling the weight of each of the sample particles at the current time to obtain a final value of the weight of each of the sample particles at the current time; determining a calculated value of the ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle, the preselected sample particle being a sample particle selected from the sample particles at the current time according to a preset rule, as the ultrasonic ranging data at the current time; after the weight of each of the sample particles at the current time is determined based on the first data, the second data, and the preset observation equation, the method further comprises: clustering the sample particles at the current time to obtain a plurality of clusters; determining a sample particle in the cluster that is closest to a cluster center of each of the clusters based on the cluster center; compensating the weight of the sample particle in the cluster that is closest to the cluster center by a preset compensation value.
2. The method of processing an ultrasonic ranging signal according to claim 1, wherein, The normalizing and resampling of the weight of each of the sample particles at the current time comprises: randomly selecting a weight that is less than or equal to a preset threshold as a first new weight of a to-be-corrected sample particle, the to-be-corrected sample particle being a sample particle whose normalized weight is greater than the preset threshold after the weight is normalized; distributing a difference between the preset threshold and the first new weight uniformly to other sample particles except the to-be-corrected sample particle, so that other sample particles obtain second new weights; normalizing the first new weight and the second new weight, and performing the resampling again when there is a weight greater than the preset threshold in the new normalized weight.
3. The method of processing an ultrasonic ranging signal according to claim 1, wherein, The method of determining a calculated value of the ultrasonic ranging data at the current time based on a preselected sample particle and the final value of the weight of the preselected sample particle as the ultrasonic ranging data at the current time comprises: determining the preset number of preselected sample particles from the sample particles at the current time according to the preset rule; taking a weighted sum of the preset number of preselected sample particles as the ultrasonic ranging data at the current time.
4. The method of processing an ultrasonic ranging signal according to claim 3, wherein, The method of determining the preset number of preselected sample particles from the sample particles at the current time according to the preset rule comprises: determining a selection probability of each of the final values of the weights based on the final values of the weights of the sample particles at the current time. determine a cumulative probability of selection of each of the weight final values based on the selection probability; determine the preselected sample particles from the sample particles at the current time based on the cumulative probability and a random number randomly generated within a limited range of the cumulative probability; repeat the generation of different random numbers until the preselected number of preselected sample particles are determined from the sample particles at the current time.
5. The method of processing an ultrasonic ranging signal according to claim 1, wherein, Further comprising: a method for generating the sample particles, the method comprising: determining a generation range of the sample particles at the previous time based on a detection value of ultrasonic ranging data at the previous time and a prediction value of ultrasonic ranging data at the previous time obtained by the pre-set time series model; generating the pre-set number of sample particles at the previous time within the corresponding generation range.
6. A processing system for ultrasonic ranging signals, characterized by Comprising: an acquisition module configured to acquire first data and second data, the first data being a detection value of ultrasonic ranging data at a current time, the second data being a prediction value of ultrasonic ranging data at the current time obtained by a pre-set time series model based on sample particles and ultrasonic ranging data, the sample particles being a pre-set number of sample data at a previous time generated based on a detection value of ultrasonic ranging data at the previous time and a prediction value of ultrasonic ranging data at the previous time, the previous time being a time before the current time; a first processing module configured to determine a weight of each of the sample particles at the current time based on the first data, the second data, and a pre-set observation equation; a second processing module configured to normalize and resample the weight of each of the sample particles at the current time to obtain a weight final value of each of the sample particles at the current time; a third processing module configured to take a calculation value of ultrasonic ranging data at the current time determined based on a preselected sample particle and the weight final value of the preselected sample particle as the ultrasonic ranging data at the current time, the preselected sample particle being the sample particle selected from the sample particles at the current time according to a pre-set rule; a fourth processing module configured to cluster the sample particles at the current time to obtain a plurality of clusters, and determine a sample particle in each of the clusters that is closest to a cluster center of the cluster based on the cluster center of each of the clusters; compensate the weight of the sample particle at the current time in each of the clusters that is closest to the cluster center by a pre-set compensation value.
7. A vehicle characterized by comprising: Comprising: a vehicle body, an ultrasonic sensor arranged on the vehicle body, and an ultrasonic ranging signal processing system as claimed in claim 6.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the ultrasonic ranging signal processing method as claimed in any one of claims 1 to 5 when executing the program. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the ultrasonic ranging signal processing method as claimed in any one of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Method for simultaneous localization and mapping of mobile robot based on improved particle filter
CN107246873A
Ultrasonic data processing method and device and vehicle
CN110674853A