Ramp estimation method, system, electronic device and readable storage medium
By acquiring data from the accelerometer, gyroscope, and speed sensor, determining the filter coefficient based on the vehicle state, and using different filters to smooth the slope value, the problem of jitter in the slope estimation value when the vehicle starts and brakes is solved, thereby improving the smoothness of autonomous driving and the user experience.
Patent Information
- Application Number
- CN202311737374.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-12-15
AI Technical Summary
When the vehicle is starting and braking, the accelerometer causes the slope estimation value to vibrate due to inertia, affecting the smoothness of autonomous driving and causing frustration and discomfort.
By acquiring data from the accelerometer, gyroscope, and speed sensor, the filter coefficient is determined according to the vehicle state, different filters are used to smooth the slope value, and the slope value is corrected in combination with the gyroscope data to improve measurement accuracy.
Reduce the jitter of slope estimation values, improve the smoothness and user experience of autonomous driving, avoid frustration, and enhance the accuracy of slope estimation.
Smart Images

Figure CN117698736B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and more specifically, to a slope estimation method, system, electronic device, and readable storage medium. Background Art
[0002] At present, with the development of autonomous driving technology, slope estimation is a key parameter for automatic vehicle control. However, when the vehicle is starting or braking, the accelerometer's inertia causes large fluctuations in the collected data, which in turn causes the calculated slope estimation to fluctuate. When the vehicle is automatically controlled, it may stall due to the fluctuation of the slope value, causing discomfort. Summary of the Invention
[0003] The present application proposes a slope estimation method, system, electronic device and readable storage medium.
[0004] In a first aspect, an embodiment of the present application provides a slope estimation method, the method comprising: acquiring data collected by an accelerometer, data collected by a gyroscope, and data collected by a speed sensor; calculating a first acceleration of the vehicle based on the data collected by the speed sensor; determining a first slope value based on the first acceleration and the data collected by the accelerometer; determining a driving state of the vehicle based on a plurality of vehicle states, each of the vehicle states comprising a stationary state and a non-stationary state, the driving state comprising a first state or a second state, the states of adjacent vehicles of a vehicle in the first state being different, and the states of adjacent vehicles of a vehicle in the second state being the same; determining a target filter coefficient based on the driving state of the vehicle, the filter coefficient corresponding to the first state being smaller than the filter coefficient corresponding to the second state; filtering the first slope value based on the target filter coefficient to obtain a second slope value, and determining the target slope value based on the second slope value, the data collected by the gyroscope, and the current vehicle state.
[0005] Optionally, for a possible implementation, determining the target slope value based on the second slope value, the data collected by the gyroscope and the vehicle state includes: obtaining first data collected by the accelerometer and second data collected by the gyroscope when the vehicle is in a stationary state; if the first data is greater than a first threshold and the second data is greater than a second threshold, determining a preset value as the target slope value; if the first data is less than or equal to the first threshold and the second data is greater than the second threshold, determining the second slope value as the target slope value; if the first data is less than or equal to the first threshold and the second data is less than or equal to the second threshold, determining the target slope value based on the second slope value, the data collected by the gyroscope and the vehicle state.
[0006] Optionally, for a possible implementation, the data collected by the gyroscope includes angular velocity information and zero offset error, and the determining the target slope value according to the second slope value, the data collected by the gyroscope and the vehicle state includes: judging whether the vehicle state is a non-stationary state; if the vehicle state is a non-stationary state, determining an offset angle of the vehicle in the driving direction according to the angular velocity information and the zero offset error collected by the gyroscope; and determining the target slope value according to the second slope value and the offset angle.
[0007] Optionally, for a possible implementation, the determining the target slope value according to the second slope value and the offset angle includes: if the absolute value of the first acceleration is less than a third threshold value, and the difference between the second slope value and a historical second slope value is less than a fourth threshold value, determining the second slope value as the target slope value; otherwise, determining the target slope value according to the second slope value and the offset angle.
[0008] Optionally, for a possible implementation, if the vehicle is in a stationary state, the angular velocity information collected by the gyroscope is averaged to update the zero offset error.
[0009] Optionally, for a possible implementation, the determining the target slope value according to the second slope value and the offset angle includes: determining a third slope value according to the second slope value and the offset angle; and filtering the third slope value to obtain the target slope value.
[0010] Optionally, for a possible implementation, the first state includes a starting state or a braking state, the vehicle state of the vehicle in the starting state is a non-stationary state and the historical vehicle state is a stationary state, and the vehicle state of the vehicle in the braking state is a stationary state and the historical vehicle state is a non-stationary state.
[0011] In a second aspect, the embodiments of the present application further provide a slope estimation device, the device comprising: a first obtaining unit, configured to obtain data collected by an accelerometer, data collected by a gyroscope, and data collected by a speed sensor; a second obtaining unit, configured to calculate a first acceleration of a vehicle according to the data collected by the speed sensor; a third obtaining unit, configured to determine a first slope value according to the first acceleration and the data collected by the accelerometer; a first calculating unit, configured to determine a driving state of the vehicle according to a plurality of vehicle states, each of the vehicle states comprising a static state and a non-static state, the driving state comprising a first state or a second state, adjacent vehicle states of the vehicle in the first state being different, and adjacent vehicle states of the vehicle in the second state being the same; a second calculating unit, configured to determine a target filtering coefficient according to the driving state of the vehicle, the filtering coefficient corresponding to the first state being smaller than the filtering coefficient corresponding to the second state; and a third calculating unit, configured to determine a target slope value according to the second slope value, the data collected by the gyroscope, and the vehicle state.
[0012] In a third aspect, the embodiments of the present application further provide an electronic device, comprising: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory, the one or more application programs are configured to be executed by the one or more processors, and the one or more application programs are configured to execute the method of the first aspect.
[0013] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, wherein the computer readable storage medium stores program codes, and the program codes can be invoked by a processor to execute the method of the first aspect.
[0014] The slope estimation method, system, electronic device, and readable storage medium provided in the embodiments of the present application first obtain data collected by an accelerometer, data collected by a gyroscope, and data collected by a velocity sensor; calculate a first acceleration of the vehicle based on the data collected by the velocity sensor; and determine a first slope value based on the first acceleration and the data collected by the accelerometer. Then, the driving state of the vehicle is determined based on multiple vehicle states, each of which includes a stationary state and a non-stationary state, and the driving state includes a first state or a second state. A vehicle in the first state has a different state from adjacent vehicles, while a vehicle in the second state has the same state as adjacent vehicles. Finally, the first slope value is filtered according to the target filter coefficient to obtain a second slope value, and a target slope value is determined based on the second slope value, the data collected by the gyroscope, and the current vehicle state. Because the original measurement data may be affected by noise, interference, or unstable factors, resulting in jitter or errors in the obtained first slope value, it is necessary to smooth the first slope value to remove noise and unnecessary fluctuations. The vehicle state in the first state differs from the historical vehicle state. Specifically, the first state may include a starting state corresponding to a transition from a stationary state to a non-stationary state, or a braking state corresponding to a transition from a non-stationary state to a stationary state. Consequently, in the first state, the accelerometer's collected data may fluctuate significantly due to inertia, causing the calculated slope value to fluctuate repeatedly. This can lead to jitter during automatic vehicle control, resulting in jitter and a poor user experience. Automatic vehicle control is sensitive to fluctuations in slope values during starting or braking states. Therefore, a filter with a smaller filter coefficient is used to smooth the slope value in the first state. In the second state, where the vehicle exhibits less jitter, a filter with a larger filter coefficient is used to smooth the slope value. A smaller filter coefficient is more sensitive to changes in the input signal and better preserves signal details and rapidly changing components. A larger filter coefficient, on the other hand, effectively filters out high-frequency noise and rapidly changing signal components, resulting in a more stable output signal. Therefore, the present application not only filters the first slope value in the first state or the second state, but also sets the filter coefficient corresponding to the first state to be smaller than the filter coefficient corresponding to the second state, so that the slope value in the starting state or the braking state becomes smoother after filtering, thereby avoiding the vehicle from jittering due to the slope value, and improving the user's riding experience. On the other hand, since the accelerometer may produce errors in the case of external vibration or acceleration changes, the gyroscope can provide more accurate measurement results in the case of dynamic motion. The embodiment of the present application determines a target slope value that is smoother than the second slope value based on the second slope value, the data collected by the gyroscope, and the current vehicle state. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A flow chart of a slope estimation method provided by an embodiment of the present application is shown;
[0017] Figure 2 A flowchart of a slope estimation method provided by another embodiment of the present application is shown;
[0018] Figure 3 A flow chart of a slope estimation method provided by another embodiment of the present application is shown;
[0019] Figure 4 A flow chart of a slope estimation method provided by another embodiment of the present application is shown;
[0020] Figure 5 A flowchart of a slope estimation method provided by another embodiment of the present application is shown;
[0021] Figure 6 A flowchart of a slope estimation method provided by another embodiment of the present application is shown;
[0022] Figure 7 A schematic diagram of filtering a first slope value provided by an embodiment of the present application is shown;
[0023] Figure 8 A schematic diagram showing a slope estimation value obtained by the slope estimation method provided in an embodiment of the present application is shown;
[0024] Figure 9 shows a structural block diagram of a slope estimation device provided by an embodiment of the present application;
[0025] Figure 10 A structural block diagram of an electronic device provided in an embodiment of the present application is shown;
[0026] Figure 11 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;
[0027] Figure 12 The structural block diagram of the computer program product provided by the embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.
[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0030] Currently, with the development of autonomous driving technology, slope estimation is a key parameter for automatic vehicle control. An underestimation of the slope estimation value can result in prolonged uphill travel and delayed braking on downhill descents. An overestimation of the slope estimation value during uphill travel can result in excessive uphill acceleration, which can easily lead to safety accidents. An overestimation of the slope estimation value during downhill travel can cause the vehicle to stall on the descent. During vehicle starting and braking, the accelerometer's inertia causes significant fluctuations in the collected data, which in turn causes the calculated slope estimation value to fluctuate. This fluctuation in the slope value can cause the vehicle to jerk during automatic vehicle control. Jerk refers to large fluctuations in speed over a short period of time, such as accelerating, then decelerating, and then accelerating again. Vehicle jerk can be uncomfortable and, in severe cases, can cause motion sickness in passengers.
[0031] Therefore, in an embodiment of the present application, a slope estimation method, system, electronic device and readable storage medium are provided to solve or partially solve the above-mentioned problems.
[0032] See also Figure 1 , Figure 1 A slope estimation method provided in an embodiment of the present application is shown, and the method specifically includes steps S110 to S160.
[0033] Step S110: Acquire data collected by the accelerometer, the gyroscope, and the velocity sensor.
[0034] It should be noted that the accelerometer, gyroscope, and speed sensor are all installed on the vehicle. The data collected by the accelerometer can represent the acceleration value of the vehicle in at least one direction, the data collected by the gyroscope can represent the yaw angular velocity of the vehicle in at least one direction, and the data collected by the speed sensor can be used to detect the vehicle's speed in a certain direction.
[0035] Step S120: Calculate a first acceleration of the vehicle according to the data collected by the speed sensor.
[0036] It should be noted that the vehicle may be an autonomous vehicle, and the first acceleration of the vehicle is calculated based on data collected by a speed sensor installed on the autonomous vehicle.
[0037] The vehicle may also be a multi-mode vehicle with an automatic driving function, which may realize automatic driving or non-automatic driving. The first acceleration of the vehicle is calculated based on data collected by a speed sensor installed on the multi-mode vehicle.
[0038] It should be noted that the speed sensor is used to detect the driving speed of the vehicle. The speed sensor may be a wheel speed sensor, a positioning signal receiver or a windshield speed sensor, which is not specifically limited in this embodiment.
[0039] Among them, the wheel speed sensor is installed near the wheel bearing, using a magnetic field or photoelectric sensor to sense the number of wheel rotations, and calculates the vehicle speed based on the number of rotations and the wheel radius.
[0040] The positioning signal receiver uses the Global Positioning System (GPS) to receive satellite signals and determines the vehicle speed by calculating the change in the vehicle's position.
[0041] Among them, the windshield speed sensor calculates the vehicle speed by measuring the pressure changes of the air flowing in front of the vehicle.
[0042] For example, continuing to take the speed sensor introduced above as a wheel speed sensor as an example, the wheel speed pulse signals of the four wheels of the vehicle are collected by the wheel speed sensors installed on the wheels, and the wheel speed of the vehicle is estimated using the obtained vehicle pulse signals.
[0043] Among them, WheelEdgeFL represents the vehicle's left front wheel speed pulse signal value, WheelEdgeFL pre Indicates the wheel speed pulse signal value of the left front wheel in the previous calculation cycle; WheelEdgeFR indicates the wheel speed pulse signal value of the right front wheel of the vehicle, WheelEdgeFR preIndicates the wheel speed pulse signal value of the right front wheel in the previous calculation cycle; WheelEdgeRL indicates the wheel speed pulse signal value of the left rear wheel of the vehicle, WheelEdgeRL pre Indicates the wheel speed pulse signal value of the left rear wheel in the previous calculation cycle; WheelEdgeRR indicates the wheel speed pulse signal value of the right rear wheel of the vehicle, WheelEdgeRR pre Indicates the wheel speed pulse signal value of the right rear wheel during the previous calculation cycle. The wheel speed pulse signal value refers to the accumulated pulse count of the wheel speed sensor. Edge_Coef represents the distance traveled by the wheel between two wheel speed pulse signal values. dt represents the calculation cycle in seconds. WheelSpd_0 represents the vehicle's wheel speed in km / h, which also represents the vehicle's driving speed. Optional: dt = 0.02s.
[0044] Calculate the average of WheelSpd_0 of N cycles to obtain WheelSpd, where N is optionally 15.
[0045] The obtained vehicle wheel speed WheelSpd is used to estimate the vehicle acceleration in the direction of travel: AccLong_0 = (WheelSpd - WheelSpd pre ) / (dt*3.6)WheelSpd is in m / s; pre is the vehicle wheel speed in the previous calculation cycle; AccLong_0 is the vehicle acceleration in the direction of travel, in m / s 2 .
[0046] Calculate the average of AccLong_0 of N cycles to obtain AccLong, which is used as the first acceleration of the vehicle. Optionally, N is 15.
[0047] Step S130: determining a first slope value according to the first acceleration and data collected by the accelerometer.
[0048] The accelerometer is used to directly measure the acceleration of the vehicle in the direction of travel. The accelerometer can be a single-axis accelerometer, a dual-axis accelerometer, or a tri-axis accelerometer. In other words, the data collected by the accelerometer can include the acceleration of the vehicle in the direction of travel.
[0049] Exemplarily, the accelerometer is a single-axis accelerometer, which can only measure the acceleration of the vehicle in the driving direction.
[0050] Exemplarily, the accelerometer is a dual-axis accelerometer capable of simultaneously measuring acceleration changes of an object in two directions, one of which is a driving direction.
[0051] Exemplarily, the accelerometer is a three-axis accelerometer, which can simultaneously measure the acceleration changes of an object in three directions, one of which is the driving direction.
[0052] It should be noted that the selection of the accelerometer depends on actual needs and is not specifically limited in this embodiment.
[0053] In an optional embodiment, continuing with the first acceleration AccLong of the vehicle obtained based on the data collected by the speed sensor as described above, the accelerometer is a three-axis accelerometer, and the information collected by the three-axis accelerometer includes Ax, Ay, and Az, where Ax is the acceleration of the x-axis, Ay is the acceleration of the y-axis, and Az is the acceleration of the z-axis. The units of Ax, Ay, and Az can all be m / s 2 The information collected by the three-axis accelerometer and the first acceleration AccLong are used to determine the first slope value of the vehicle. Wherein, Ax represents the acceleration in the driving direction collected by the accelerometer.
[0054] Step S140: Determine the driving state of the vehicle based on multiple vehicle states, each of the vehicle states includes a stationary state and a non-stationary state, the driving state includes a first state or a second state, the adjacent vehicle states of the vehicle in the first state are different, and the adjacent vehicle states of the vehicle in the second state are the same.
[0055] It is understood that the calculation of the first acceleration and the determination of the first slope value in the aforementioned steps can be obtained by collecting and calculating vehicle data over a period of time, for example, the period of time can be a cycle. The cycle is a fixed time period, and illustratively, the duration of the cycle is 0.1 seconds.
[0056] The vehicle state represents the state of the vehicle, including a stationary state and a non-stationary state.
[0057] The stationary state may be a state when the vehicle speed is less than or equal to a speed threshold. For example, if the wheel speed sensor detects that the driving speed of the current cycle WheelSpd≤0.01km / h, the vehicle is determined to be in a stationary state; otherwise, the vehicle is determined to be in a non-stationary state.
[0058] For example, if the wheel speed sensor detects that the driving speed in the current cycle is zero, it means that the vehicle state in the current cycle is a stationary state; otherwise, it means that the vehicle state in the current cycle is a non-stationary state.
[0059] Alternatively, the vehicle may be determined to be stationary only if the wheel speed sensor detects a driving speed of WheelSpd ≤ 0.01 km / h for multiple consecutive cycles. In an alternative embodiment, the vehicle is determined to be stationary when the wheel speed sensor detects a driving speed of WheelSpd ≤ 0.01 km / h for more than three cycles; otherwise, the vehicle is determined to be non-stationary. This increases the accuracy of vehicle status determination.
[0060] The historical vehicle state represents the vehicle state of the cycle before the current cycle. If the vehicle state of the vehicle in the current cycle is different from the vehicle state of the previous cycle, it means that the adjacent vehicle states of the vehicle are different, that is, the driving state of the current cycle is the first state. If the vehicle state of the vehicle in the current cycle is a non-stationary state and the historical vehicle state is a stationary state, the driving state of the current cycle is the starting state. If the vehicle state of the vehicle in the current cycle is a stationary state and the historical vehicle state is a non-stationary state, the driving state of the current cycle is the braking state. In other words, the first state includes the starting state and the braking state. If the vehicle state of the vehicle in the current cycle is the same as the vehicle state of the previous cycle, it means that the adjacent vehicle states of the vehicle are the same, that is, the driving state of the current cycle is the second state.
[0061] It should be noted that the braking state is used to represent the process of a vehicle switching from a non-stationary state to a stationary state. For example, if the wheel speed sensor detects a current cycle speed of WheelSpd ≤ 0.01 km / h, the vehicle is determined to be stationary; otherwise, the vehicle is determined to be non-stationary. The braking state is used to represent that the vehicle's speed in the previous cycle was WheelSpd > 0.01 km / h, and the vehicle's speed in the current cycle is WheelSpd ≤ 0.01 km / h.
[0062] For example, if the wheel speed sensor detects a current cycle speed of WheelSpd ≤ 0 km / h, the vehicle is determined to be stationary; otherwise, the vehicle is determined to be non-stationary. The braking state is used to indicate that the vehicle's speed in the previous cycle was WheelSpd > 0 km / h, and the vehicle's speed in the current cycle is WheelSpd ≤ 0 km / h.
[0063] Step S150: determining a target filter coefficient according to the driving state of the vehicle, wherein the filter coefficient corresponding to the first state is smaller than the filter coefficient corresponding to the second state.
[0064] In the first state, the accelerometer's inertia causes significant fluctuations in the collected data, leading to jitter in the calculated slope value. This can cause the vehicle to jerk during automatic control due to the jittering slope value, resulting in a poor user experience. To address this, the first slope value can be smoothed and filtered using the following steps. The slope value obtained during starting or braking scenarios jitters due to inertia, and automatic control is more sensitive to jitter in the starting or braking states. Smoothing the slope value with a filter with a smaller filter coefficient is more sensitive to changes in the input signal and better preserves signal details and rapidly changing components. In the second state, the vehicle exhibits less jitter, so smoothing the slope value with a filter with a larger filter coefficient achieves a better smoothing effect, effectively filtering out high-frequency noise and rapidly changing signal components, and making the output signal more stable.
[0065] Preferably, the second state includes an acceleration state, a deceleration state, and a uniform speed state; wherein, the vehicle state of the vehicle in the acceleration state is the same as the historical vehicle state, and the direction of acceleration is the same as the vehicle's driving direction; the vehicle state of the vehicle in the deceleration state is the same as the historical vehicle state, and the direction of acceleration is opposite to the vehicle's driving direction; the vehicle state of the vehicle in the uniform speed state is the same as the historical vehicle state, and the acceleration is approximately zero; it should be noted that the state in which the vehicle is stationary belongs to a uniform speed state with a speed of 0.
[0066] In an optional embodiment, the target filter coefficient is determined according to the driving state of the vehicle, and the driving state includes a stationary driving state, a starting state, an accelerating state, a decelerating state, and a braking state. Figure 7 As shown, Figure 7 The target filter coefficients for different driving states are shown. For a stationary state, the first-order filter coefficient coef_1 is 0.05; for a starting state, the first-order filter coefficient coef_2 is 0.001; for an accelerating state, the first-order filter coefficient coef_3 is 0.02; for a decelerating state, the first-order filter coefficient coef_4 is 0.02; and for a braking state, the first-order filter coefficient coef_5 is 0.001. If the vehicle's driving state is determined to be starting, the target filter coefficient is set to 0.001; if the vehicle's driving state is determined to be accelerating, the target filter coefficient is set to 0.02.
[0067] Step S160: filtering the first slope value according to the target filter coefficient to obtain a second slope value, and determining a target slope value according to the second slope value, data collected by the gyroscope, and the current vehicle state.
[0068] The second slope value is obtained by filtering the first slope value through a filter. The filter may be a low-pass filter, a high-pass filter, a band-pass filter, or a band-stop filter, which is not limited in this embodiment. Since the accelerometer may produce errors in the case of external vibration or acceleration changes, the gyroscope can provide more accurate measurement results in the case of dynamic motion. In this embodiment of the application, a target slope value that is more accurate than the second slope value is determined based on the second slope value, the data collected by the gyroscope, and the current vehicle state.
[0069] The slope estimation method provided by the embodiments of the present application first acquires data collected by an accelerometer, data collected by a gyroscope and data collected by a speed sensor; calculates a first acceleration of a vehicle according to the data collected by the speed sensor; determines a first slope value according to the first acceleration and the data collected by the accelerometer. Then, the driving state of the vehicle is determined according to a plurality of vehicle states, each of the vehicle states includes a static state and a non-static state, the driving state includes a first state or a second state, the adjacent vehicle states of the vehicle in the first state are different, and the adjacent vehicle states of the vehicle in the second state are the same; finally, the first slope value is filtered according to a target filter coefficient to obtain a second slope value, and a target slope value is determined according to the second slope value, the data collected by the gyroscope and the current vehicle state. Because the original measurement data may be affected by noise, interference or unstable factors, the first slope value obtained may be jittered or incorrect, and therefore the first slope value needs to be smoothed to remove noise and unnecessary fluctuations. Moreover, the vehicle state of the vehicle in the first state is different from the historical vehicle state, that is, the first state may include a starting state corresponding to the switching from the static state to the non-static state, or a braking state corresponding to the switching from the non-static state to the static state. Therefore, when the vehicle is in the first state, the data collected by the accelerometer may be greatly fluctuated due to inertia, and the calculated slope value may be jittered multiple times, which may cause the vehicle to be suddenly stopped when the vehicle is automatically controlled, and the user experience is poor. The slope value in the starting state or the braking state is more sensitive to the automatic control of the vehicle, and therefore a filter with a smaller filter coefficient is used to smooth the slope value in the first state, and a filter with a larger filter coefficient is used to smooth the slope value in the second state. The smaller filter coefficient is more sensitive to the change of the input signal, and can better retain the details and fast-changing part of the signal; and the larger filter coefficient can effectively filter out high-frequency noise and fast-changing signal components, so that the output signal is more stable. Therefore, the first slope value can be filtered in the first state or the second state, and the filter coefficient corresponding to the first state is set to be smaller than the filter coefficient corresponding to the second state, so that the slope value in the starting state or the braking state is smoother after being filtered, and the vehicle is prevented from being suddenly stopped due to the jitter of the slope value, and the user experience is improved. On the other hand, the accelerometer may produce errors in the case of external vibration or acceleration change, and the gyroscope can provide more accurate measurement results in the case of dynamic motion. The target slope value obtained by the embodiments of the present application is smoother than the second slope value, which is determined according to the second slope value, the data collected by the gyroscope and the current vehicle state.
[0070] Please refer to Figure 2 , Figure 2A slope estimation method provided in an embodiment of the present application is shown, and the method specifically includes steps S210 to S290.
[0071] Step S210: Acquire data collected by the accelerometer, the gyroscope, and the velocity sensor.
[0072] Step S220: Calculate a first acceleration of the vehicle according to the data collected by the speed sensor.
[0073] Step S230: Determine a first slope value according to the first acceleration and data collected by the accelerometer.
[0074] Step S240: Determine the driving state of the vehicle based on multiple vehicle states, each of the vehicle states includes a stationary state and a non-stationary state, the driving state includes a first state or a second state, the adjacent vehicle states of the vehicle in the first state are different, and the adjacent vehicle states of the vehicle in the second state are the same.
[0075] Step S250: determining a target filter coefficient according to the driving state of the vehicle, wherein the filter coefficient corresponding to the first state is smaller than the filter coefficient corresponding to the second state.
[0076] Among them, steps S210 to S250 have been described in detail in the above embodiments and will not be repeated here.
[0077] Step S260: Acquire first data collected by the accelerometer and second data collected by the gyroscope when the vehicle is in a stationary state.
[0078] It should be noted that, when the vehicle is in a stationary state, the data collected by the accelerometer is the first data, and the data collected by the gyroscope is the second data.
[0079] For example, the first data collected by the accelerometer and the second data collected by the gyroscope are continuously obtained over a period of time when the vehicle is in a stationary state; specifically, the Ax, Ay, and Az information collected by the accelerometer of the inertial measurement unit (IMU) and the Wx, Wy, and Wz information collected by the gyroscope are obtained, where the first data is Ax, Ay, and Az, and the second data is Wx, Wy, and Wz. Ax is the acceleration of the x-axis in m / s 2 ; Ay is the acceleration of the y-axis, in m / s 2 ; Az is the acceleration of the z-axis, in m / s 2 ; Wx is the angular velocity around the x-axis, in rad / s; Wy is the angular velocity around the y-axis, in rad / s; Wz is the angular velocity around the z-axis, in rad / s.
[0080] Step S270: If the first data is greater than a first threshold, a preset value is determined as a target slope value.
[0081] Specifically, the preset value includes a first preset value or a second preset value. If the first data is greater than a first threshold and the second data is greater than a second threshold, the first preset value is determined as the target slope value. The first preset value is used to indicate that both the accelerometer and the gyroscope are faulty.
[0082] It should be noted that the first threshold is a detection reference value for the accelerometer. If the first data exceeds the first threshold, it indicates that the accelerometer is faulty; otherwise, it indicates that the accelerometer is not faulty. The second threshold is a measurement reference value for the gyroscope. If the second data exceeds the second threshold, it indicates that the gyroscope is faulty; otherwise, it indicates that the gyroscope is not faulty.
[0083] The first data may include multiple parameter information, such as Ax, Ay, and Az. If at least one parameter in the first data is greater than a first threshold, it indicates that the first data is greater than the first threshold. Similarly, the second data may include multiple parameter information, such as Wx, Wy, and Wz. If at least one parameter in the second data is greater than a second threshold, it indicates that the second data is greater than the second threshold.
[0084] Exemplarily, first data collected by the accelerometer and second data collected by the gyroscope when the vehicle is stationary are continuously obtained within 2 seconds; if the first data is greater than a first threshold and the second data is greater than a second threshold, a first preset value is determined as the target slope value, indicating that both the accelerometer and the gyroscope are faulty.
[0085] Preferably, the first threshold is 10m / s 2 , the second threshold is 0.1rad / s
[0086] Step S280: If the first data is less than or equal to a first threshold and the second data is greater than a second threshold, the second slope value is determined as a target slope value.
[0087] Exemplarily, the first data collected by the accelerometer and the second data collected by the gyroscope when the vehicle is stationary are continuously obtained within 2 seconds; if the first data is less than or equal to the first threshold and the second data is greater than the second threshold, it means that the accelerometer is not faulty and the gyroscope is faulty, and the second slope value is determined as the target slope value, that is, the second slope value obtained according to the accelerometer is used as the target slope value. In the case of a gyroscope fault, the present application can still output a suboptimal slope value.
[0088] Step S290: If the first data is less than or equal to the first threshold value and the second data is less than or equal to the second threshold value, determining a target gradient value according to the second gradient value, the data collected by the gyroscope and the vehicle state.
[0089] If the first data is less than or equal to the first threshold value and the second data is greater than the second threshold value, it means that the accelerometer and the gyroscope are normal, and the target gradient value is determined according to the second gradient value, the data collected by the gyroscope and the vehicle state. For details, please refer to the foregoing embodiments.
[0090] It should be noted that the present embodiment only gives an example, and the order of step S260 relative to steps S220 to S250 is not limited.
[0091] The slope estimation method provided by the embodiment of the present application first acquires the first data collected by the accelerometer and the second data collected by the gyroscope when the vehicle is in a stationary state, then compares the size relationship between the first data and the first threshold value and the size relationship between the second data and the second threshold value to determine the fault condition of the accelerometer and the gyroscope, and finally determines the target gradient value according to the fault condition of the accelerometer and the gyroscope. The present application determines the fault condition of the accelerometer and the gyroscope, and if both of them have faults, an error prompt information of a first preset value is output, if only the accelerometer has a fault, an error prompt information of a second preset value is output, if only the gyroscope has a fault, the second gradient value obtained by the accelerometer is taken as the target gradient value, ensuring that the suboptimal slope estimation value can be obtained when part of the sensors are faulty, and if both of them have no faults, the target gradient value is determined according to the second gradient value, the data collected by the gyroscope and the vehicle state. On the one hand, the present application achieves the purpose of monitoring the quality of the accelerometer and the gyroscope, and if there is a fault, it can be replaced in time according to the prompt signal. On the other hand, the present application outputs the target gradient value or the suboptimal target gradient value, which is obtained under the condition that the inertial measurement unit is normal, and does not calculate the gradient value as the target gradient value from the data collected by the accelerometer or the gyroscope which has a fault. From the whole driving process, if both the accelerometer and the gyroscope have faults, no inaccurate gradient value is output, and if the gradient value is output, it means that the accelerometer is working normally, and the accuracy of the output gradient value is higher. As can be seen, the present application improves the accuracy of slope estimation by monitoring the accelerometer and the gyroscope.
[0092] Please refer to Figure 3 , Figure 3 A slope estimation method provided by the embodiment of the present application is shown, and the method specifically includes steps S310 to S390.
[0093] Step S310: Acquire data collected by the accelerometer, the gyroscope, and the velocity sensor.
[0094] Step S320: Calculate a first acceleration of the vehicle based on the data collected by the speed sensor.
[0095] Step S330: Determine a first slope value according to the first acceleration and data collected by the accelerometer.
[0096] Step S340: Determine the driving state of the vehicle based on multiple vehicle states, each of the vehicle states includes a stationary state and a non-stationary state, the driving state includes a first state or a second state, the adjacent vehicle states of the vehicle in the first state are different, and the adjacent vehicle states of the vehicle in the second state are the same.
[0097] Step S350: determining a target filter coefficient according to the driving state of the vehicle, wherein the filter coefficient corresponding to the first state is smaller than the filter coefficient corresponding to the second state.
[0098] Among them, steps S310 to S350 have been described in detail in the above embodiments and will not be repeated here.
[0099] Step S360: Determine whether the vehicle is in a non-stationary state.
[0100] For details on the method of determining whether the vehicle is in a non-stationary state by the driving speed, please refer to the introduction in the previous embodiment.
[0101] Step S370: If the vehicle is in a non-stationary state, the offset angle of the vehicle in the driving direction is determined based on the angular velocity information and the zero bias error collected by the gyroscope.
[0102] It should be noted that the data collected by the gyroscope includes angular velocity information and zero bias error.
[0103] Bias error refers to a fixed deviation in the angular velocity output by the gyroscope when stationary. This deviation causes an error in the gyroscope's angular velocity measurement, resulting in a persistent output even when there is no rotation or motion. The initial value of the bias error can be preset or determined based on actual measurements. For example, the initial Wy bias error is -0.04 rad / s.
[0104] In an optional embodiment, the information collected by the gyroscope includes Wx, Wy, and Wz, where Wx is the angular velocity around the x-axis, Wy is the angular velocity around the y-axis, and Wz is the angular velocity around the z-axis, and the unit can be rad / s. The x-axis is the lateral direction of the vehicle, and the y-axis is the direction of travel of the vehicle. Based on the Wy information collected by the gyroscope installed on the vehicle and the zero bias error, the specific formula for determining the offset angle of the vehicle in the direction of travel is: initial integral dSlop = 0, zero bias error bias = bias_init, bias_init is the initial zero bias error. If the vehicle is in a non-stationary state, Wy is integrated to obtain dSlop = (Wy-bias)*dt, and the integral dSlop is the offset angle of the gyroscope.
[0105] Step 380: If the vehicle is stationary, average the angular velocity information continuously collected by the gyroscope to update the zero bias error.
[0106] In a static state, the bias error may change over time and temperature due to factors such as environmental noise, electronic noise, and mechanical vibration. Therefore, regularly updating the bias error can improve the accuracy of gyroscope measurements.
[0107] To this end, in an embodiment of the present application, after determining whether the vehicle is in a non-stationary state, preferably, if the vehicle is in a stationary state, the angular velocity information continuously collected by the gyroscope is averaged to update the zero bias error.
[0108] If the vehicle is in a stationary state in the current cycle, the angular velocity information continuously collected by the gyroscope is averaged to update the zero bias error Wherein, n represents the number of consecutive cycles, and for example, n=50.
[0109] Preferably, if the vehicle is in a stationary state for m consecutive cycles and m is less than the cycle threshold, the vehicle is determined to be in a paused state; if the vehicle is in a stationary state for f consecutive cycles and f is greater than or equal to the cycle threshold, the vehicle is determined to be in a long-stop state; if the vehicle is in a long-stop state, the angular velocity information continuously collected by the gyroscope is averaged to update the zero bias error.
[0110] For example, the cycle threshold is 200, and if it is detected that the vehicle is in a stationary state for 300 consecutive cycles, it indicates that the vehicle is in a long-term stop state. The angular velocity information continuously collected by the gyroscope within 50 cycles is averaged to update the zero bias error.
[0111] For example, the cycle threshold is 200, and if the number of cycles in which the vehicle is continuously in a stationary state is detected to be 150, it indicates that the vehicle is in a paused state, and the zero bias error remains unchanged.
[0112] In an optional embodiment, the vehicle is in a non-stationary state during driving, and the zero offset error of the gyroscope is an initial zero offset error set in advance. The offset angle of the vehicle in the driving direction is determined according to the angular velocity information collected by the gyroscope installed on the vehicle and the initial zero offset error.
[0113] In an optional embodiment, the vehicle is in a long-stationary state during driving. The zero offset error is updated by averaging the angular velocity information collected by the gyroscope continuously. When the vehicle is started again, the offset angle of the vehicle in the driving direction is determined according to the angular velocity information collected by the gyroscope installed on the vehicle and the updated zero offset error.
[0114] Step S390: determining a target slope value according to the second slope value and the offset angle.
[0115] Continuing with the example of the offset angle dSlop introduced above, set the initial value of the slope Slop = EstSlop_1; EstSlop_1 is the second slope value, and calculate the third slope value of the vehicle Slop = Slop + dSlop as the target slope value.
[0116] Although the accelerometer can directly measure the acceleration of the vehicle, the accelerometer cannot directly distinguish the static acceleration and dynamic acceleration of the object, and thus may produce errors in the case of external vibration or acceleration change. The gyroscope can distinguish the rotation and stationary state of the object, and can provide more accurate measurement results in the case of dynamic motion.
[0117] Therefore, the slope estimation method provided by the embodiments of the present application first obtains a second slope value according to the accelerometer; then determines whether the vehicle is in a non-stationary state; if the vehicle is in a non-stationary state, determines an offset angle of the vehicle in the driving direction according to the angular velocity information collected by the gyroscope installed on the vehicle and a zero offset error; and finally determines a target slope value according to the second slope value and the offset angle. Figure 8 The slope estimation value diagram of the accelerometer combined with the gyroscope provided by the embodiments of the present application is shown, in which the abscissa represents time, and the ordinate represents the slope value (the ratio of the rising height to the horizontal distance on the slope). The first value is the slope value obtained by the accelerometer, and the second value is the slope value obtained by the accelerometer combined with the gyroscope. As can be seen from the diagram, the slope value obtained by the accelerometer is more jittered, and the slope value obtained by the accelerometer combined with the gyroscope is smoother.
[0118] This application obtains a second slope value with more jitter on the premise that the accelerometer measures acceleration. When the vehicle is in a non-stationary state, the offset angle is obtained by integrating the angular velocity monitored in real time by the gyroscope. The offset angle is used to eliminate or partially eliminate the jitter of the second slope value, thereby achieving the effect of smoothing the slope value. This application combines the accelerometer with the gyroscope to make the slope estimation value smoother, the automatic vehicle control smoother, and the user experience.
[0119] See also Figure 4 , Figure 4 A slope estimation method provided in an embodiment of the present application is shown, and the method specifically includes steps S410 to S4100.
[0120] Step S410: Acquire data collected by the accelerometer, the gyroscope, and the velocity sensor.
[0121] Step S420: Calculate a first acceleration of the vehicle according to the data collected by the speed sensor.
[0122] Step S430: Determine a first slope value according to the first acceleration and data collected by the accelerometer.
[0123] Step S440: Determine the driving state of the vehicle based on multiple vehicle states, each of the vehicle states includes a stationary state and a non-stationary state, the driving state includes a first state or a second state, the adjacent vehicle states of the vehicle in the first state are different, and the adjacent vehicle states of the vehicle in the second state are the same.
[0124] Step S450: determining a target filter coefficient according to the driving state of the vehicle, wherein the filter coefficient corresponding to the first state is smaller than the filter coefficient corresponding to the second state.
[0125] Step S460: Determine whether the vehicle is in a non-stationary state.
[0126] Step S470: If the vehicle is in a non-stationary state, the offset angle of the vehicle in the driving direction is determined based on the angular velocity information and the zero bias error collected by the gyroscope.
[0127] Step 480: If the vehicle is stationary, average the angular velocity information continuously collected by the gyroscope to update the zero bias error.
[0128] Among them, steps S410 to S470 have been described in detail in the above embodiments and will not be repeated here.
[0129] Step S490: If the absolute value of the first acceleration is less than a third threshold, and the range difference between the second slope value and the historical second slope value is less than a fourth threshold, the second slope value is determined as the target slope value.
[0130] The first acceleration is an actual acceleration value of the vehicle calculated based on data monitored by a speed sensor, and the range represents the distance between the maximum value and the minimum value in the data set.
[0131] The third threshold represents the reference acceleration of the first acceleration. For example, the third threshold is 0.2 m / s. 2 The absolute value of the first acceleration is less than the third threshold, indicating that the first acceleration is small, which may be a starting state or a braking state. The fourth threshold represents a reference range of the range. For example, the fourth threshold is 0.015. The range value between the second slope value and the historical second slope value is less than the fourth threshold, indicating that the fluctuation of the second slope value obtained in the current time period is small.
[0132] If the absolute value of the first acceleration is less than the third threshold, and the range difference between the second slope value and the historical second slope value is less than the fourth threshold, it can indicate that the fluctuation of the second slope value in the starting state is small, or it can indicate that the fluctuation of the second slope value in the braking state is small. In this case, the second slope value is determined as the target slope value, and the gyroscope is stopped from integrating to calculate the offset angle, thereby reducing unnecessary calculations.
[0133] Step S4100: Otherwise, determine a target slope value according to the second slope value and the offset angle.
[0134] Among them, step S4100 has been introduced in detail in the above embodiment and will not be repeated here.
[0135] The slope estimation method provided in the embodiment of the present application further distinguishes the non-stationary state of the vehicle. If the absolute value of the first acceleration is less than a third threshold value, and the range difference between the second slope value and the historical second slope value is less than a fourth threshold value, it indicates that the fluctuation of the second slope value in the starting state is small, and it may also indicate that the fluctuation of the second slope value in the braking state is small. In this case, the gyroscope is not integrated to calculate the offset angle, and the second slope value is used as the target slope value. This avoids the error accumulation caused by long-term gyroscope integration and improves the calculation speed.
[0136] Preferably, a third slope value is determined according to the second slope value and the offset angle; and the third slope value is filtered to obtain a target slope value.
[0137] The third slope value is filtered using a filter to obtain a target slope value. For a detailed description of the filter, please refer to the aforementioned embodiment. The present application filters the third slope value to obtain a smoother target slope value. Exemplarily, the third slope value is filtered using a first-order low-pass filter to obtain the target slope value, with a filter coefficient of 0.02.
[0138] See also Figure 5 , Figure 5 A slope estimation method provided in an embodiment of the present application is shown, and the method specifically includes steps S510 to S570.
[0139] Step S510: Determine a second slope value based on the first acceleration of the vehicle actually traveling and data collected by an accelerometer installed on the vehicle.
[0140] It should be noted that the first slope value is determined based on the first acceleration of the vehicle's actual driving and the data collected by the accelerometer installed on the vehicle, and the first slope value is filtered to obtain the second slope value. For details, please refer to the aforementioned embodiment; illustratively, the second slope value is EstSlop_1.
[0141] Step S520: Determine the vehicle state based on the driving speed of the current cycle, and determine the driving state of the vehicle in the current cycle based on the vehicle state and the historical vehicle state of the previous cycle.
[0142] Step S530: If the driving state is a pause state, the initial slope value is the second slope value, the initial integral is 0, and the third slope value of the vehicle is calculated as the sum of the second slope value and the initial integral.
[0143] It should be noted that the second state includes a pause state or a long stop state. If the vehicle is in a stationary state for m consecutive cycles and m is less than the cycle threshold, the vehicle is determined to be in a pause state; if the vehicle is in a stationary state for f consecutive cycles and f is greater than or equal to the cycle threshold, the vehicle is determined to be in a long stop state.
[0144] For example, if the driving state is a pause state, the initial slope value Slop=EstSlop_1, the initial integral value dSlop=0, and the third slope value of the vehicle is calculated as Slop=Slop+dSlop.
[0145] Step S540: If the driving state is a long stop state, the initial slope value is the second slope value, the initial integral is 0, the third slope value of the vehicle is calculated as the sum of the second slope value and the initial integral, and the zero bias error of Wy is updated.
[0146] For example, if the driving state is a long stop state, the initial slope value Slop=EstSlop_1, the initial integral value dSlop=0, the third slope value Slop=Slop+dSlop of the vehicle is calculated, and the zero bias error of Wy is updated.
[0147] Step S550: If the driving state is a non-uniform motion state, the initial slope value is the second slope value, Wy is integrated to obtain the offset angle, and the third slope value of the vehicle is calculated as the sum of the second slope value and the offset angle.
[0148] It should be noted that the second state includes a uniform speed state or a non-uniform speed state. The vehicle state of a vehicle in a uniform speed state is a non-stationary state and the driving speed remains unchanged. The vehicle state of a vehicle in a non-uniform speed state is a non-stationary state and the driving speed changes.
[0149] For example, if the vehicle is in a non-uniform motion state, the initial slope value Slop = EstSlop_1, Wy is integrated to obtain dSlop = (Wy-bias) * dt, and the gyroscope offset angle is obtained. The third slope value of the vehicle is calculated as Slop = Slop + dSlop.
[0150] Step S560: If the driving state is a uniform speed state, the initial slope value is updated to the second slope value, Wy is integrated to obtain the offset angle, and the third slope value of the vehicle is calculated as the sum of the second slope value and the offset angle.
[0151] For example, if the vehicle is in a constant speed state, the initial slope value Slop=EstSlop_1 is updated, Wy is integrated to obtain dSlop=(Wy-bias)*dt, and the gyroscope offset angle is obtained. The third slope value of the vehicle is calculated as Slop=Slop+dSlop.
[0152] Step S570: Filter the third slope value to obtain a target slope value.
[0153] See also Figure 6 , Figure 6 A slope estimation method provided in an embodiment of the present application is shown, and the method specifically includes steps S610 to S670.
[0154] Step S610: continuously acquiring inertial measurement unit information over a period of time, where the inertial measurement unit information includes first data collected by an accelerometer and second data collected by a gyroscope when the vehicle is in a stationary state.
[0155] The first data are Ax, Ay and Az, and the second data are Wx, Wy and Wz. Please refer to the above embodiment for details.
[0156] Step S620: Acquire data collected by a speed sensor installed on the vehicle.
[0157] Step S630: Calculate the vehicle's speed based on the data collected by the speed sensor.
[0158] Step S640: Calculate a first acceleration according to the driving speed of the vehicle.
[0159] Step S650: Determine a second slope value according to the acquired first data and the first acceleration.
[0160] Specifically, the Ax information in the first data is used as the second acceleration, and the first slope value is determined based on the first acceleration and the second acceleration collected by the accelerometer installed on the vehicle. The first slope value is filtered to obtain the second slope value. For details, please refer to the above embodiment.
[0161] Step S660: Determine a fifth slope value according to the second slope value, the second data and the driving speed.
[0162] Specifically, the vehicle state is determined based on the driving speed, and the vehicle's driving state for the current cycle is determined based on the vehicle state and the historical vehicle state of the previous cycle. For details, please refer to the previous embodiment. A fifth slope value is determined based on Wy in the second data, the second slope value, and the driving state. The fifth slope value is calculated by combining the second slope value with the angular velocity of the gyroscope.
[0163] Step S670: Filter the fifth slope value to obtain a target slope value.
[0164] See also Figure 9 , Figure 9 A structural block diagram of a slope estimation device 900 provided in an embodiment of the present application is shown. The device 900 includes: a first acquisition unit 910, a second acquisition unit 920, a third acquisition unit 930, a first calculation unit 940, a second calculation unit 950, and a third calculation unit 960.
[0165] The acquisition unit 910 is used to acquire data collected by the accelerometer, the gyroscope, and the speed sensor.
[0166] The second acquiring unit 920 is configured to calculate a first acceleration of the vehicle according to the data collected by the speed sensor.
[0167] The third acquiring unit 930 is configured to determine a first slope value according to the first acceleration and data collected by the accelerometer.
[0168] The first calculation unit 940 is used to determine the driving state of the vehicle based on multiple vehicle states, each of the vehicle states includes a stationary state and a non-stationary state, the driving state includes a first state or a second state, the adjacent vehicle states of the vehicle in the first state are different, and the adjacent vehicle states of the vehicle in the second state are the same.
[0169] The second calculation unit 950 is used to determine a target filter coefficient according to the driving state of the vehicle, and the filter coefficient corresponding to the first state is smaller than the filter coefficient corresponding to the second state.
[0170] The third calculation unit 960 is configured to filter the first slope value according to the target filter coefficient to obtain a second slope value, and determine a target slope value according to the second slope value, data collected by the gyroscope, and a current vehicle state.
[0171] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0172] See also Figure 10 , Figure 10 The following is a block diagram of an electronic device 1000 provided in an embodiment of the present application. The electronic device 1000 may be a vehicle-mounted system, which may be installed in a vehicle. The electronic device 1000 in the present application may include one or more of the following components: a processor 1011, a memory 1012, and one or more application programs, wherein the processor 1011 is electrically connected to the memory 1012, and the one or more application programs are configured to execute the methods described in the aforementioned test method embodiments.
[0173] The processor 1011 can include one or more processing cores. The processor 1011 connects various parts within the entire electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1012, and invoking data stored in the memory 1012, to perform various functions and process data of the electronic device 1000. Optionally, the processor 1011 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 1011 can integrate a combination of one or several of a central processing unit (CPU), a graphics processor (GPU), and a modem. Among them, the CPU is mainly responsible for processing operating systems, user interfaces, computer programs, etc.; the GPU is responsible for rendering and drawing display content; and the modem is responsible for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1011, but be implemented by a separate communication chip. Specifically, one or more processors 1011 can execute the methods described in the foregoing embodiments.
[0174] For some embodiments, the memory 1012 can include a random access memory (RAM) and can also include a read-only memory (ROM). The memory 1012 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1012 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing various method embodiments described below, etc. The data storage area can also store data created by the electronic device 1000 in use, etc.
[0175] Please refer to Figure 11 which shows a structural block diagram of a computer readable storage medium provided by an embodiment of the present application. The computer readable medium 1100 stores program code therein, and the program code can be invoked by a processor to execute the methods described in the above method embodiments.
[0176] Computer-readable storage medium 1100 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Alternatively, computer-readable storage medium 1100 includes non-transitory computer-readable storage medium. Computer-readable storage medium 1100 has storage space for program code 1110 for executing any method steps of the above method. These program codes can be read from or written to one or more computer program products. Program code 1110 can be compressed, for example, in an appropriate form.
[0177] Please refer to Figure 12 , which shows a structural block diagram of a computer program product 1200 provided in an embodiment of the present application. The computer program product 1200 includes a computer program / instruction 1210, which implements the steps of the above method when executed by a processor.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been 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 make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A slope estimation method, characterized in that: The method comprises: Acquire data collected by the accelerometer, data collected by the gyroscope, and data collected by the velocity sensor; Calculating a first acceleration of the vehicle based on data collected by the speed sensor; determining a first slope value according to the first acceleration and data collected by the accelerometer; Determining a driving state of the vehicle according to a plurality of vehicle states, each of the vehicle states including a stationary state and a non-stationary state, the driving state including a first state or a second state, a vehicle in the first state has a different state from adjacent vehicles, and a vehicle in the second state has the same state as adjacent vehicles; determining a target filter coefficient according to the driving state of the vehicle, wherein the filter coefficient corresponding to the first state is smaller than the filter coefficient corresponding to the second state; The first slope value is filtered according to the target filter coefficient to obtain a second slope value, and a target slope value is determined according to the second slope value, data collected by the gyroscope, and a current vehicle state.
2. The method according to claim 1, characterized in that The determining of the target slope value according to the second slope value, the data collected by the gyroscope, and the vehicle state includes: Acquire first data collected by an accelerometer and second data collected by a gyroscope when the vehicle is in a stationary state; If the first data is greater than a first threshold, determining a preset value as a target slope value; If the first data is less than or equal to a first threshold and the second data is greater than a second threshold, determining the second slope value as a target slope value; If the first data is less than or equal to a first threshold and the second data is less than or equal to a second threshold, a target slope value is determined according to the second slope value, data collected by the gyroscope, and the vehicle state.
3. The method according to claim 1, characterized in that The data collected by the gyroscope includes angular velocity information and zero bias error, and determining the target slope value according to the second slope value, the data collected by the gyroscope, and the vehicle state includes: Determining whether the vehicle is in a non-stationary state; If the vehicle is in a non-stationary state, determining the offset angle of the vehicle in the driving direction according to the angular velocity information and the zero bias error collected by the gyroscope; A target slope value is determined according to the second slope value and the offset angle.
4. The method according to claim 3, characterized in that The determining of the target slope value according to the second slope value and the offset angle includes: If the absolute value of the first acceleration is less than a third threshold, and the range difference between the second slope value and the historical second slope value is less than a fourth threshold, determining the second slope value as the target slope value; Otherwise, a target slope value is determined according to the second slope value and the offset angle.
5. The method according to claim 3, characterized in that Also includes: If the vehicle is stationary, the angular velocity information continuously collected by the gyroscope is averaged to update the zero bias error.
6. The method according to claim 3, characterized in that The determining of the target slope value according to the second slope value and the offset angle includes: determining a third slope value according to the second slope value and the offset angle; The third slope value is filtered to obtain a target slope value.
7. The method according to claim 1, characterized in that The first state includes a starting state or a braking state. The vehicle state of the vehicle in the starting state is a non-stationary state and the historical vehicle state is a stationary state. The vehicle state of the vehicle in the braking state is a stationary state and the historical vehicle state is a non-stationary state.
8. A slope estimation device, characterized in that: The device comprises: a first acquisition unit, configured to acquire data collected by the accelerometer, the gyroscope, and the velocity sensor; a second acquisition unit, configured to calculate a first acceleration of the vehicle based on data collected by the speed sensor; a third acquiring unit, configured to determine a first slope value according to the first acceleration and data collected by the accelerometer; a first calculation unit, configured to determine a driving state of the vehicle based on a plurality of vehicle states, each of the vehicle states comprising a stationary state and a non-stationary state, the driving state comprising a first state or a second state, adjacent vehicles of a vehicle in the first state having different states, and adjacent vehicles of a vehicle in the second state having the same states; a second calculation unit, configured to determine a target filter coefficient according to the driving state of the vehicle, the filter coefficient corresponding to the first state being smaller than the filter coefficient corresponding to the second state; A third calculation unit is configured to filter the first slope value according to the target filter coefficient to obtain a second slope value, and determine a target slope value according to the second slope value, data collected by the gyroscope, and the vehicle state.
9. An electronic device, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory, the one or more applications are configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Multi-scene vehicle ramp estimation method and module
CN116061949A
Method and device for determining slope estimation value, storage medium and electronic device
CN116161046A