Method and device for estimating slope of road surface, vehicle and computer readable storage medium
By performing low-pass and band-pass filtering on a single-axis acceleration sensor, combined with slope calculation formulas, the high cost and low-precision problems of road slope estimation in the existing technology are solved, and low-cost and high-precision slope calculation is realized, which is suitable for Intelligent driving system.
Patent Information
- Application Number
- CN202411099831.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-01
AI Technical Summary
The method of estimating pavement slope in the prior art relies on three-axis or six-axis acceleration sensors, which are costly and have low accuracy, and the detection results of single-axis sensors are deviated, and the calculation is complex and difficult, making it difficult to meet the precise demand for slope information of intelligent driving systems. .
Using a single-axis acceleration sensor, low-pass filtering and band-pass filtering of speed and longitudinal acceleration information, combined with slope calculation formulas, the road surface slope is calculated. The low-pass filtering frequency range is 0-5Hz and the band-pass filtering frequency range is 8-25Hz , determine the filtering frequency band through fast Fourier transform and spectrum diagram analysis to improve calculation accuracy.
It realizes low-cost and simple calculation road slope estimation, improves calculation accuracy, is suitable for high-speed processing of on-board processors, reduces resource consumption, and makes up for single-axis accelerometer errors.
Smart Images

Figure CN118876985A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile intelligent control technology, and in particular to a method, device, vehicle and computer-readable storage medium for estimating road slope. Background Art
[0002] The longitudinal slope information of the road is one of the important parameters required by electronic control systems related to vehicle active safety control and cruise control, etc. If the exact slope of the road the vehicle is on cannot be determined, problems such as sliding down the slope, rushing forward, engine speed surge, and inaccurate uphill and downhill speed control may occur when starting. The ESP (electronic stability program), EPB (electronic parking brake system), TCU (automatic transmission control unit), EMS (engine management system) in the vehicle controller, and the intelligent driving system ACC (adaptive cruise control system), AEB (automatic emergency braking system), APA (automatic parking assist) and other functions require more accurate slopes to achieve acceleration and braking on different slopes to meet driving needs.
[0003] Most of the existing methods for estimating road slope rely on three-axis or six-axis acceleration sensors. Three-axis or six-axis acceleration sensors are relatively expensive and the calculation results are relatively accurate. Single-axis sensors are low-cost, but the detection results have certain deviations. In addition, the existing methods for estimating road slope mainly include technical solutions based on vehicle kinematics, vehicle dynamics, or a combination of the two. In the slope estimation method based on vehicle kinematics, it is necessary to low-pass filter the vehicle's motion signal (for example, longitudinal vehicle speed, acceleration, etc.). In the slope estimation method based on vehicle dynamics, it is necessary to combine parameters such as vehicle mass, driving force and braking force, and use recursive least squares method or Kalman filtering method to calculate the final slope information. The calculation is difficult and the accuracy needs to be improved. Summary of the invention
[0004] The purpose of the present invention is to solve the above problems and provide a method, device, vehicle and computer-readable storage medium for estimating road slope. By directly performing low-pass filtering and band-pass filtering on speed and longitudinal acceleration information, combined with the slope calculation formula, accurate calculation of road slope is achieved based on the use of a single-axis acceleration sensor.
[0005] A first aspect of the present invention provides a method for estimating a road slope, which is applicable to a single-axis sensor and includes: acquiring speed information and longitudinal acceleration information; performing low-pass filtering and band-pass filtering on the speed information and longitudinal acceleration information; and calculating a slope value θ according to the following formula:
[0006]
[0007] Among them, w k,BP is the angular velocity at time k after bandpass filtering, wk-1,BP is the angular velocity at time k-1 after bandpass filtering, Acc k,BP is the longitudinal acceleration at time k after bandpass filtering, Acc k,LP is the longitudinal acceleration at time k after low-pass filtering, w k,LP is the angular velocity at time k after low-pass filtering, w k-1,LP is the angular velocity at time k-1 after low-pass filtering, and g is the acceleration due to gravity.
[0008] In a possible implementation, the frequency range of the low-pass filter is 0-5 Hz; the frequency range of the band-pass filter is 8-25 Hz.
[0009] In a possible implementation, the frequency range of the low-pass filter and the band-pass filter is determined in the following manner, specifically including: fixing the frequency of the velocity information and the longitudinal acceleration information to a preset sampling frequency; performing a fast Fourier transform on the processed velocity and longitudinal acceleration information to obtain a corresponding information spectrum diagram; finding a frequency band with the largest spectrum density amplitude based on the spectrum diagram; the frequency band with the largest spectrum density amplitude corresponding to the higher frequency is the frequency range of the band-pass filter, and the upper limit frequency of the frequency band with the largest spectrum density amplitude corresponding to the lower frequency is the frequency of the low-pass filter.
[0010] In a possible implementation, finding the frequency band with the largest frequency spectrum density amplitude based on the spectrum graph includes: presetting a unit frequency bandwidth, starting from 0 Hz, and sequentially calculating the proportion of the energy of the preset unit frequency bandwidth to the total frequency band energy with a preset moving step size K i ; If K1≤K i ≤K2, then K i Valid, wherein K1 is a preset lower limit value of low-pass filtering or band-pass filtering, and K2 is a preset upper limit value of low-pass filtering or band-pass filtering.
[0011] In one possible implementation, if the calculated K i If both are greater than K2, the preset unit bandwidth is shortened by the first preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with the preset moving step size K i , repeat until K i Not greater than K2.
[0012] In one possible implementation, if the calculated K i If both are less than K1, the preset unit bandwidth is increased by a second preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with a preset moving step size. i , repeat until K i Not less than K1.
[0013] In a possible implementation, if the frequency range of the low-pass filter overlaps with the frequency range of the band-pass filter, the frequency range of the band-pass filter is adjusted until the frequency range of the low-pass filter does not overlap with the adjusted frequency range of the band-pass filter.
[0014] The second aspect of the present invention provides a device for estimating the slope of a road surface, comprising: a uniaxial sensor, the uniaxial sensor is used to detect longitudinal acceleration information; a data acquisition module, the data acquisition module is used to collect speed information and longitudinal acceleration information; a data processing module, the data processing module performs low-pass filtering and band-pass filtering on the speed information and longitudinal acceleration information; a slope calculation module, used to calculate the slope value θ according to the following formula:
[0015]
[0016] Among them, w k,BP is the angular velocity at time k after bandpass filtering, w k-1,BP is the angular velocity at time k-1 after bandpass filtering, Acc k,BP is the longitudinal acceleration at time k after bandpass filtering, Acc k,LP is the longitudinal acceleration at time k after low-pass filtering, w k,LP is the angular velocity at time k after low-pass filtering, w k-1,LP is the angular velocity at time k-1 after low-pass filtering, and g is the acceleration due to gravity.
[0017] A third aspect of the present invention provides a vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for estimating road slope as described above when executing the computer program.
[0018] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for estimating the slope of a road surface as described above is implemented.
[0019] Compared with the prior art, the method, device, vehicle and computer-readable storage medium for estimating road slope provided by the embodiments of the present invention have the following beneficial technical effects:
[0020] (1) The present invention uses a single-axis sensor, which has the advantage of low cost compared to the three-axis or six-axis accelerometer used in the prior art. It uses the vehicle kinematic equation, which is simple to calculate and consumes less resources.
[0021] (2) After using a single-axis sensor, the velocity information and longitudinal acceleration information are first low-pass filtered and band-pass filtered, and then calculated, which improves the accuracy of the calculation. The calculation method is simple and facilitates high-speed processing by the on-board processor.
[0022] (3) The present invention provides three methods for selecting the frequency range of low-pass filtering and band-pass filtering, namely, a fixed frequency band, a frequency band calculated through a spectrum diagram, and an adaptively selected frequency band. The above three methods are of great significance to the accuracy of the final frequency range, and the accuracy of the three methods gradually increases. It is well known that for signal filtering, different parameters are used to filter the velocity information and the longitudinal acceleration information, and the results obtained are completely different. The present application compensates for the error caused by the single-axis accelerometer by selecting different frequency ranges. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flow chart of a method for estimating road slope provided in Embodiment 1 of the present invention;
[0025] Figure 2 The frequency spectrum of the longitudinal acceleration information provided in Embodiment 1 of the present invention after FFT;
[0026] Figure 3 The frequency spectrum of the speed information provided in Embodiment 1 of the present invention after FFT;
[0027] Figure 4 The waveform diagram of the longitudinal acceleration information before and after low-pass filtering provided in Embodiment 1 of the present invention;
[0028] Figure 5 The waveform diagram of the speed information before and after low-pass filtering provided by Embodiment 1 of the present invention;
[0029] Figure 6 The waveform diagram of the longitudinal acceleration information before and after bandpass filtering provided in Embodiment 1 of the present invention;
[0030] Figure 7 The waveform diagram of the speed information before and after bandpass filtering provided by Embodiment 1 of the present invention;
[0031] Figure 8 A schematic diagram of a device for estimating road slope provided in Embodiment 2 of the present invention;
[0032] Fig. 9 This is a schematic diagram of the structure of a vehicle provided in Example 3 of the present invention.
[0033] Figure numerals: 10, single-axis sensor; 11, data acquisition module; 12, data processing module; 13, slope calculation module; 20, memory; 21, processor; 22, computer program. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0035] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. 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.
[0036] Example 1
[0037] The embodiment of the present invention provides a method for estimating road slope, which is applicable to a single-axis sensor, such as Figure 1 As shown, it includes: S1 obtains speed information and longitudinal acceleration information; S2 performs low-pass filtering and band-pass filtering on the speed information and longitudinal acceleration information; S3 calculates the slope value θ according to the following formula:
[0038]
[0039] Among them, w k,BP is the angular velocity at time k after bandpass filtering, w k-1,BP is the angular velocity at time k-1 after bandpass filtering, Acc k,BP is the longitudinal acceleration at time k after bandpass filtering, Acc k,LP is the longitudinal acceleration at time k after low-pass filtering, w k,LP is the angular velocity at time k after low-pass filtering, w k-1,LP is the angular velocity at time k-1 after low-pass filtering, and g is the acceleration due to gravity.
[0040] In step S1, the speed information may be the vehicle speed or the angular velocity of the vehicle. In the embodiment of the present invention, the angular velocity of the vehicle is used, and the angular velocity information of the vehicle may come from the MCU, the vehicle speed sensor, and the ABS, etc. The longitudinal acceleration information is monitored by a single-axis sensor. The accelerometer may be welded on the controller (TCU or MCU) in the form of a chip, or may be installed on the frame in the form of a separate sensor. Its acceleration data may be connected to the main controller via the SPI bus or the CAN bus, etc. The speed information and the longitudinal acceleration information are the relationship between time or sampling period and the speed or angular velocity.
[0041] In step S2, the velocity information and the longitudinal acceleration information are subjected to low-pass filtering and band-pass filtering. In the embodiment of the present invention, the frequency of the low-pass filtering is lower than the frequency of the band-pass filtering. By performing band-pass filtering on the velocity information, the influence of gravity can be removed, and the relationship between acceleration and angular velocity is obtained:
[0042]
[0043] After the intermediate value c is calculated, the speed information and the longitudinal acceleration information are low-pass filtered. At this time, the speed information and the longitudinal acceleration information include the speed and the effect of gravity, and the slope value θ can be calculated. It should be pointed out that the present invention can use a single-axis sensor to measure the longitudinal acceleration. Combined with the algorithm proposed in the present invention, it can well compensate for the error caused by the poor measurement accuracy of the single-axis sensor. It can be understood that the multi-axis sensor is also applicable. The multi-axis sensor has high measurement accuracy, but compared with the single-axis sensor, the cost of the multi-axis sensor is higher.
[0044] Specifically, in the embodiment of the present invention, the frequency range of the low-pass filter is 0-5 Hz; the frequency range of the band-pass filter is 8-25 Hz.
[0045] As another preferred embodiment of the present invention, the frequency range of the low-pass filtering and the band-pass filtering is determined in the following manner, specifically including:
[0046] S20 fixes the frequency of velocity and longitudinal acceleration information to a preset sampling frequency to facilitate system calculations;
[0047] S21 performs fast Fourier transform on the processed velocity and longitudinal acceleration information to obtain a corresponding information spectrum diagram;
[0048] like Figure 2 and 3 As shown, the data is converted into a spectrum with frequency as the horizontal axis and intensity as the vertical axis.
[0049] S22 finds the frequency band with the largest spectrum density amplitude based on the spectrum diagram; the frequency band with the largest spectrum density amplitude corresponding to the higher frequency is the frequency range of the bandpass filter, and the upper limit frequency of the frequency band with the largest spectrum density amplitude corresponding to the lower frequency is the frequency of the lowpass filter.
[0050] According to the initial equation It can be seen that the spectrum energy of the acceleration signal after fast Fourier transform (FFT) is equal to the sum of the spectrum energies of cw& and gθ. Figure 2 and Figure 3 It can be seen that in the low-frequency region, velocity and acceleration both have a considerable proportion of energy. Figure 3 It can be seen that there is also a considerable amount of energy when the frequency is in the range of 10 to 20 Hz, that is, the value of the angular velocity ω falls in this frequency band, that is, 10 to 20 Hz can be set as the upper and lower cutoff frequencies when the speed is band-pass filtered. This method requires the determination of the upper and lower bounds. Another optional method is to first determine the upper frequency of the band-pass filter, and then determine the frequency bandwidth of the speed by looking up the table (empirical value or the value recorded in the last storage unit) during initialization. The lower frequency can be calculated based on this bandwidth and the upper frequency, which is more convenient. The frequency value of the low-pass filter can be selected at 5 Hz.
[0051] As another preferred embodiment, in order to determine the frequency band range of low-pass filtering and band-pass filtering to better filter the velocity information and longitudinal acceleration information, the embodiment of the present invention proposes the following method, in step S22, finding the frequency band with the largest frequency spectrum density amplitude based on the frequency spectrum diagram, including:
[0052] S220 presets the unit frequency bandwidth, starts from 0 Hz, and sequentially calculates the proportion of the energy of the preset unit frequency bandwidth to the total frequency bandwidth energy with a preset moving step length K i .
[0053] It should be noted that the preset unit bandwidth is determined based on the prior art or based on the frequency range determined by the inventor after analyzing the spectrum diagram. Preferably, the initial value of the frequency band range for low-pass filtering is in the range of 2-5 Hz, and the initial value of the frequency band range for band-pass filtering is in the range of 8-10 Hz. The preset moving step length is in the range of 0.5-1 Hz, and K is calculated step by step by increasing the step length. i This will lay a good foundation for the subsequent determination of the range of low-pass filtering and band-pass filtering. Specifically, set a preset unit frequency band width bw, start from the low frequency 0Hz, set the moving step to h, that is, the first frequency band value is [0, bw], the second is [h, bw+h], and so on, and calculate the proportion of the energy of each unit frequency band bw to the total frequency band energy K i(i=0, 1, 2, N...) The moving step is preferably 0.1-0.5 Hz. If the moving step is too short, the amount of calculation will increase. If the moving step is longer, the accuracy of the value taken for the bandwidth range will be poor. Therefore, in the embodiment of the present invention, the moving step is preferably 0.1-0.5 Hz.
[0054] S221 If K1≤K i ≤K2, then K i Valid, wherein K1 is a preset lower limit value of low-pass filtering or band-pass filtering, and K2 is a preset upper limit value of low-pass filtering or band-pass filtering.
[0055] It should be noted that the values of K1 and K2 are determined based on experience or the spectrum diagram of the actual situation of a specific vehicle. For example, when low-pass filtering is used, the value range of K1 is 0.10-0.20, and the value range of K2 is 0.25-0.35; when band-pass filtering is used, the value range of K1 is 0.20-0.25, and the value range of K2 is 0.28-0.37. i If both are greater than K2, the preset unit bandwidth is shortened by the first preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with the preset moving step size K i , repeat until K i Not greater than K2. If the calculated K i If both are less than K1, the preset unit bandwidth is increased by a second preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with a preset moving step size. i , repeat until K i Not less than K1.
[0056] The first preset bandwidth and the second preset bandwidth can be the same value or different values. For example, the first preset bandwidth and the second preset bandwidth are both 0.1 Hz. For the band range initial value of the bandpass filter, the preset unit bandwidth is shortened by the first preset bandwidth to obtain 7.9 Hz, and the preset unit bandwidth is increased by the second preset bandwidth to obtain 8.1 Hz. The value range of the first preset bandwidth and the second preset bandwidth is preferably 0.1-0.5 Hz. If the value is too small, the calculation amount is large. If the value is too large, the final structure will deviate greatly from the true value.
[0057] Specifically, if the frequency range of the low-pass filter overlaps with the frequency range of the band-pass filter, the frequency range of the band-pass filter is adjusted until the frequency range of the low-pass filter does not overlap with the frequency range of the adjusted band-pass filter. The acceleration band is mainly concentrated in a relatively low frequency, and the velocity band is at a relatively high frequency. By setting the frequency range of the low-pass filter and the frequency range of the band-pass filter to not overlap, the accuracy of the calculation result after the final filtering can be improved.
[0058] If the final calculation result is: if the frequency range of the low-pass filter is 2-3Hz, then the low-pass filter value is 3Hz; if the frequency range of the band-pass filter is 10-20Hz, then the value is 10-20Hz.
[0059] The waveforms after low-pass filtering and band-pass filtering of the velocity information and longitudinal acceleration information are shown in the figure below: Figure 4-7 shown.
[0060] Example 2
[0061] The embodiment of the present invention discloses a device for estimating the slope of a road surface, such as Figure 8 As shown, it includes: a single-axis sensor 10, which is used to detect longitudinal acceleration information; a data acquisition module 11, which is used to collect speed information and longitudinal acceleration information; a data processing module 12, which performs low-pass filtering and band-pass filtering on the speed information and longitudinal acceleration information; a slope calculation module 13, which is used to calculate the slope value θ according to the following formula:
[0062]
[0063] Among them, w k,BP is the angular velocity at time k after bandpass filtering, w k-1,BP is the angular velocity at time k-1 after bandpass filtering, Acc k,BP is the longitudinal acceleration at time k after bandpass filtering, Acc k,LP is the longitudinal acceleration at time k after low-pass filtering, w k,LP is the angular velocity at time k after low-pass filtering, w k-1,LP is the angular velocity at time k-1 after low-pass filtering, and g is the acceleration due to gravity.
[0064] Specifically, in the embodiment of the present invention, in the data processing module 12, the frequency range of the low-pass filter is 0-5 Hz; the frequency range of the band-pass filter is 8-25 Hz.
[0065] As another preferred embodiment of the present invention, the frequency range of the low-pass filter and the band-pass filter in the data processing module 12 is determined in the following manner, specifically including:
[0066] S20 fixes the frequency of velocity and longitudinal acceleration information to a preset sampling frequency to facilitate system calculations;
[0067] S21 performs fast Fourier transform on the processed velocity and longitudinal acceleration information to obtain a corresponding information spectrum diagram;
[0068] S22 finds the frequency band with the largest spectrum density amplitude based on the spectrum diagram; the frequency band with the largest spectrum density amplitude corresponding to the higher frequency is the frequency range of the bandpass filter, and the upper limit frequency of the frequency band with the largest spectrum density amplitude corresponding to the lower frequency is the frequency of the lowpass filter.
[0069] As another preferred embodiment, in order to determine the frequency band range of low-pass filtering and band-pass filtering to better filter the velocity information and longitudinal acceleration information, the embodiment of the present invention proposes the following method, in step S22, finding the frequency band with the largest frequency spectrum density amplitude based on the frequency spectrum diagram, including:
[0070] S220 presets the unit frequency bandwidth, starts from 0 Hz, and sequentially calculates the proportion of the energy of the preset unit frequency bandwidth to the total frequency bandwidth energy with a preset moving step length K i .
[0071] It should be noted that the preset unit bandwidth is determined based on the prior art or based on the frequency range determined by the inventor after analyzing the spectrum diagram. Preferably, the initial value of the frequency band range for low-pass filtering is in the range of 2-5 Hz, and the initial value of the frequency band range for band-pass filtering is in the range of 8-10 Hz. The preset moving step length is in the range of 0.5-1 Hz, and K is calculated step by step by increasing the step length. i This will lay a good foundation for the subsequent determination of the range of low-pass filtering and band-pass filtering. Specifically, set a preset unit frequency band width bw, start from the low frequency 0Hz, set the moving step to h, that is, the first frequency band value is [0, bw], the second is [h, bw+h], and so on, and calculate the proportion of the energy of each unit frequency band bw to the total frequency band energy K i (i=0, 1, 2, N...) The moving step is preferably 0.1-0.5 Hz. If the moving step is too short, the amount of calculation will increase. If the moving step is longer, the accuracy of the value taken for the bandwidth range will be poor. Therefore, in the embodiment of the present invention, the moving step is preferably 0.1-0.5 Hz.
[0072] S221 If K1≤K i ≤K2, then K i Valid, wherein K1 is a preset lower limit value of low-pass filtering or band-pass filtering, and K2 is a preset upper limit value of low-pass filtering or band-pass filtering.
[0073] It should be noted that the values of K1 and K2 are determined based on experience or the spectrum diagram of the actual situation of a specific vehicle. For example, when low-pass filtering is used, the value range of K1 is 0.10-0.20, and the value range of K2 is 0.25-0.35; when band-pass filtering is used, the value range of K1 is 0.20-0.25, and the value range of K2 is 0.28-0.37. i If both are greater than K2, the preset unit bandwidth is shortened by the first preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with the preset moving step size K i , repeat until K i Not greater than K2. If the calculated K i If both are less than K1, the preset unit bandwidth is increased by a second preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with a preset moving step size. i , repeat until K i Not less than K1.
[0074] The first preset bandwidth and the second preset bandwidth can be the same value or different values. For example, the first preset bandwidth and the second preset bandwidth are both 0.1 Hz. For the band range initial value of the bandpass filter, the preset unit bandwidth is shortened by the first preset bandwidth to obtain 7.9 Hz, and the preset unit bandwidth is increased by the second preset bandwidth to obtain 8.1 Hz. The value range of the first preset bandwidth and the second preset bandwidth is preferably 0.1-0.5 Hz. If the value is too small, the calculation amount is large. If the value is too large, the final structure will deviate greatly from the true value.
[0075] Specifically, if the frequency range of the low-pass filter overlaps with the frequency range of the band-pass filter, the frequency range of the band-pass filter is adjusted until the frequency range of the low-pass filter does not overlap with the frequency range of the adjusted band-pass filter. The acceleration band is mainly concentrated in a relatively low frequency, and the velocity band is at a relatively high frequency. By setting the frequency range of the low-pass filter and the frequency range of the band-pass filter to not overlap, the accuracy of the calculation result after the final filtering can be improved.
[0076] If the final calculation result is: if the frequency range of the low-pass filter is 2-3Hz, then the low-pass filter value is 3Hz; if the frequency range of the band-pass filter is 10-20Hz, then the value is 10-20Hz.
[0077] Example 3
[0078] The embodiment of the present invention further provides a vehicle, such as Fig. 9As shown, the vehicle includes a memory 20, a processor 21, and a computer program 22 stored in the memory and capable of running on the processor, and the processor 21 implements the method for estimating the road slope when executing the computer program 22. Specifically, steps S1-S3, S20-S22 and / or S220-S221 in Embodiment 1 are implemented.
[0079] The vehicle may include but is not limited to a processor 21 and a memory 20. Those skilled in the art will appreciate that Fig. 9 These are merely examples of vehicles and do not constitute a limitation of the vehicle. The vehicle may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, a computing vehicle may also include an input and output vehicle, a network access vehicle, a bus, etc.
[0080] The processor 21 may be a central processing unit (CPU), or 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.
[0081] The memory 20 may be an internal storage unit of the vehicle, such as a hard disk or memory of the vehicle. The memory 20 may also be an external storage unit of the vehicle, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the vehicle. Further, the memory 20 may also include both an internal storage unit of the vehicle and an external storage unit. The memory 20 is used to store computer programs and other programs and data required by the vehicle. The memory 20 may also be used to temporarily store data that has been output or is to be output.
[0082] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; 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, and should be included in the protection scope of the present application. The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present invention.
Claims
1. A method for estimating road slope, the method being applicable to a single-axis sensor, characterized in that: include: Obtain speed information and longitudinal acceleration information; Performing low-pass filtering and band-pass filtering on the velocity information and the longitudinal acceleration information; The slope value θ is calculated according to the following formula: Among them, w k,BP is the angular velocity at time k after bandpass filtering, w k-1 ,BP is the angular velocity at time k-1 after bandpass filtering, Acc k,BP is the longitudinal acceleration at time k after bandpass filtering, Acc k,LP is the longitudinal acceleration at time k after low-pass filtering, w k,LP is the angular velocity at time k after low-pass filtering, w k-1 ,LP is the angular velocity at time k-1 after low-pass filtering, and g is the acceleration due to gravity.
2. The method for estimating road slope according to claim 1, characterized in that: The frequency range of the low-pass filter is 0-5 Hz; The frequency range of the bandpass filter is 8-25 Hz.
3. The method for estimating road slope according to claim 1, characterized in that: The frequency range of the low-pass filter and the band-pass filter is determined in the following manner, specifically including: Fixing the frequency of the speed information and the longitudinal acceleration information to a preset sampling frequency; Perform fast Fourier transform on the processed velocity information and longitudinal acceleration information to obtain a corresponding information spectrum diagram; Find the frequency band with the largest spectral density amplitude based on the spectrum diagram; The frequency band with the largest spectral density amplitude corresponding to the higher frequency is the frequency range of the bandpass filter, and the upper limit frequency of the frequency band with the largest spectral density amplitude corresponding to the lower frequency is the frequency of the lowpass filter.
4. The method for estimating road slope according to claim 3, characterized in that: Finding a frequency band with the largest frequency spectrum density amplitude based on the frequency spectrum diagram includes: The preset unit bandwidth, starting from 0 Hz, calculates the proportion of the energy of the preset unit bandwidth to the total bandwidth energy K in sequence with the preset moving step length i ; If K1≤K i ≤K2, then K i Valid, wherein K1 is a preset lower limit value of low-pass filtering or band-pass filtering, and K2 is a preset upper limit value of low-pass filtering or band-pass filtering.
5. The method for estimating road slope according to claim 4, characterized in that: If the calculated K i If both are greater than K2, the preset unit bandwidth is shortened by the first preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with the preset moving step length. i , repeat until K i Not greater than K2.
6. The method for estimating road slope according to claim 4, characterized in that: If the calculated K i If both are less than K1, the preset unit bandwidth is increased by a second preset bandwidth, starting from 0 Hz, and the proportion of the energy of the preset unit bandwidth to the total bandwidth energy is calculated in sequence with a preset moving step size. i , repeat until K i Not less than K1.
7. The method for estimating road slope according to claim 5 or 6, characterized in that: If the frequency range of the low-pass filter overlaps with the frequency range of the band-pass filter, the frequency range of the band-pass filter is adjusted until the frequency range of the low-pass filter does not overlap with the adjusted frequency range of the band-pass filter.
8. A device for estimating road slope, characterized in that: include: A single-axis sensor, wherein the single-axis sensor is used to detect longitudinal acceleration information; A data acquisition module, the data acquisition module is used to collect speed information and longitudinal acceleration information; A data processing module, wherein the data processing module performs low-pass filtering and band-pass filtering on the speed information and the longitudinal acceleration information; The slope calculation module is used to calculate the slope value θ according to the following formula: Among them, w k,BP is the angular velocity at time k after bandpass filtering, w k-1,BP is the angular velocity at time k-1 after bandpass filtering, Acc k,BP is the longitudinal acceleration at time k after bandpass filtering, Acc k,LP is the longitudinal acceleration at time k after low-pass filtering, w k,LP is the angular velocity at time k after low-pass filtering, w k-1,LP is the angular velocity at time k-1 after low-pass filtering, and g is the acceleration due to gravity.
9. A vehicle comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
