Gradient detection method and device, vehicle control device and program product
Through the Kalman filtering method combined with inertial sensors and wheel speed sensors, a slope detection method is constructed, which solves the problem of inaccurate slope detection in the existing technology, and realizes the efficient and high accuracy of slope detection of electric mopeds.
Patent Information
- Application Number
- CN202510866789.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-08-15
AI Technical Summary
The existing slope detection methods are not comprehensive enough, resulting in low detection accuracy, especially when electric mopeds go uphill, it is impossible to accurately determine whether it is necessary to increase the motor assist ratio or switch mechanical gears.
The Kalman filtering method is used to combine inertial sensors and wheel speed sensors. By obtaining the y-axis mileage and speed of the vehicle, the Kalman filtering equation is constructed and the slope results are calculated, which avoids errors caused by using only the inertial sensors and improves the detection accuracy.
By reducing the calculation amount and error state estimation, the accuracy and efficiency of slope detection are improved, ensuring the slope detection accuracy of electric mopeds under different working conditions.
Smart Images

Figure CN120482057A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a slope detection method, device, vehicle control device and program product. Background Art
[0002] Currently, electric assisted bicycles have become a convenient means of transportation, and their convenience and comfort are important indicators that influence the user experience. During riding, the motor outputs a certain proportion of assist torque based on the pedaling force, making riding easier. On uphill sections, without increasing the motor's assist ratio or switching the mechanical gear, the user needs to pedal with greater force to offset the influence of gravity and enable the vehicle to ascend smoothly. Determining whether to increase the motor's assist ratio or switch the mechanical gear requires accurately determining the slope.
[0003] However, existing slope detection methods are not comprehensive enough, which reduces the detection accuracy. Summary of the Invention
[0004] The embodiments of the present application provide a slope detection method, device, vehicle control device and program product to solve the problem that the existing technology is not comprehensive enough and reduces the detection accuracy.
[0005] In a first aspect, an embodiment of the present application provides a slope detection method, comprising:
[0006] Obtain the vehicle's y-axis mileage; the y-axis specifically refers to a coordinate axis with the vehicle's center of mass as the origin, along the vehicle's longitudinal axis and pointing toward the vehicle's front end;
[0007] A Kalman filter equation is constructed based on the y-axis mileage, the y-axis speed, and the sine value of the slope;
[0008] Based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle, a slope result of the road surface on which the vehicle is located is calculated.
[0009] An embodiment of the present application provides a slope detection method that obtains a vehicle's y-axis mileage. The y-axis specifically refers to a coordinate axis extending along the vehicle's longitudinal axis and pointing toward the vehicle's front, with the vehicle's center of mass as its origin. A Kalman filter equation is constructed based on the y-axis mileage, y-axis speed, and the sine value of the slope. The slope of the road surface on which the vehicle is located is calculated based on the Kalman filter equation and measurement information output by an inertial sensor installed on the vehicle. This application combines the y-axis mileage, inertial sensor measurement information, and Kalman filtering to determine the slope result, avoiding the large errors caused by using only inertial sensors and improving the accuracy of slope detection.
[0010] In a possible implementation of the first aspect, the Kalman filter equation is an error state Kalman filter equation; and calculating the slope of the road surface on which the vehicle is located based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle includes:
[0011] Obtaining a historical actual value of a state vector of the error state Kalman filter equation at a previous moment;
[0012] Based on the measurement information and the historical actual value, an estimated value of a state vector corresponding to the error state Kalman filter equation at a target time is calculated; the target time is after the previous time;
[0013] The slope result is calculated based on the estimated value and the error state Kalman filter equation.
[0014] In the above implementation, since the dimension of the error state Kalman filter equation is low, the computational complexity of slope detection achieved by combining the error state Kalman filter equation in this embodiment is much smaller than the nonlinear model of slope obtained by solving the attitude of quaternion, thereby improving the detection efficiency of the slope.
[0015] In a possible implementation of the first aspect, the measurement information includes the x-axis angular velocity and y-axis acceleration of the vehicle at the target time, where the x-axis refers to a coordinate axis perpendicular to the y-axis and pointing to the right side of the vehicle; the state vector includes the sine value of the slope, the y-axis velocity, the y-axis mileage, the x-axis gyroscope bias, and the y-axis accelerometer bias; and calculating an estimated value of the state vector corresponding to the error state Kalman filter equation at the target time based on the measurement information and the historical actual value includes:
[0016] Calculating an estimated value of the slope sine value at the target time based on the x-axis gyroscope zero bias, the x-axis angular velocity, the historical actual value corresponding to the slope sine value of the inertial sensor at the target time, and a time interval; the time interval being the difference between the target time and the previous time;
[0017] Calculate an estimated value of the y-axis velocity at the target time based on the y-axis accelerometer bias of the inertial sensor at the target time, the y-axis acceleration, the estimated value of the sine value of the slope, the acceleration of gravity, the historical actual value corresponding to the y-axis velocity, and the time interval;
[0018] Based on the y-axis accelerometer zero bias of the inertial sensor at the target moment, the y-axis acceleration, the historical actual value corresponding to the sine value of the slope, the historical actual value corresponding to the y-axis velocity, the gravitational acceleration, the historical actual value corresponding to the y-axis mileage, and the time interval, an estimated value of the y-axis mileage at the target moment is calculated.
[0019] In the above embodiment, since the measurement information only includes the vehicle's x-axis angular velocity and y-axis acceleration at the target time, there is no need to use the inertial sensor's 3-axis gyroscope and 3-axis accelerometer for posture recognition, thereby reducing the amount of computation and improving detection efficiency. Furthermore, the state vector in this embodiment only includes the slope sine value, y-axis velocity, y-axis mileage, x-axis gyroscope bias, and y-axis accelerometer bias. That is, the system state in this embodiment is a 5x1 matrix, resulting in a 5x5 covariance matrix and a 1x1 Kalman gain matrix K. Compared to the prior art, where the state vector also includes other gyroscope biases, resulting in a 6x1 system state, a 6x6 covariance matrix P, and a 6x3 Kalman gain matrix K, this embodiment further reduces the amount of computation. Furthermore, because riding an electric assisted bicycle involves continuous acceleration and deceleration, constantly changing acceleration, and intense mechanical vibration, using only the gyroscope and accelerometer outputs from the inertial sensors for attitude calculation does not satisfy the prerequisite that the accelerometer data approximates the acceleration due to gravity, which can easily lead to large errors in the attitude calculation results. Therefore, this embodiment combines the acquired Y-axis mileage to determine the final slope result, which can reduce these errors and thus improve detection accuracy.
[0020] In a possible implementation of the first aspect, calculating the slope result based on the estimated value and the error state Kalman filter equation includes:
[0021] Adjusting a noise covariance matrix of the error state Kalman filter equation based on a current operating condition of the vehicle to obtain a target noise covariance matrix;
[0022] Determining a process model corresponding to the error state Kalman filter equation based on the estimated value;
[0023] updating a state covariance matrix of an error state Kalman filter equation based on the process model to obtain a first state covariance matrix;
[0024] Calculating a Kalman gain based on the target noise covariance matrix and the first state covariance matrix;
[0025] The slope result is calculated based on the Kalman gain and the estimated value.
[0026] In the above implementation, the noise covariance matrix is flexibly adjusted according to the current working conditions, thereby realizing adaptive adjustment of the filter parameters without manual intervention, reducing the performance degradation caused by traditional fixed parameter filtering in complex scenarios, and thus improving the detection accuracy.
[0027] In a possible implementation of the first aspect, calculating the slope result based on the Kalman gain and the estimated value includes:
[0028] Calculate an error state estimate based on the estimated value of the y-axis mileage at the target time, the measured value of the y-axis mileage at the target time, and the Kalman gain;
[0029] The slope result is calculated based on the error state estimate and the estimate value.
[0030] In the above implementation, the final slope result is determined in combination with the error state estimation value determined by the Kalman gain, thereby improving the detection accuracy.
[0031] In a possible implementation of the first aspect, after calculating the slope result based on the estimated value and the error state Kalman filter equation, the method further includes:
[0032] resetting the error state estimate to zero;
[0033] Based on the Kalman gain and the first state covariance matrix, the state covariance matrix of the error state Kalman filter equation is updated to obtain a second state covariance matrix.
[0034] In the above-described embodiment, each time a slope result is obtained through the error state Kalman filter, the final system state vector is obtained based on the error state estimate vector and the system state estimate. It is generally assumed that the system state vector obtained at this time is consistent with the actual value, i.e., the error has been eliminated. Therefore, it is necessary to reset the error state estimate after each calculation to obtain the slope result. If the error state estimate is not reset, errors will be repeatedly superimposed, leading to system oscillation and divergence. At the same time, in actual applications, if the covariance matrix is not updated, although the reset error state is zero, the covariance matrix still retains the uncertainty of the previous cycle, causing the prediction stage to mistakenly believe that a large estimation error exists, triggering unnecessary corrections. Therefore, this embodiment updates the state covariance matrix, thereby improving the accuracy of slope detection at a subsequent time.
[0035] In a possible implementation of the first aspect, obtaining the y-axis mileage of the vehicle includes:
[0036] Acquiring wheel information of the vehicle and pulse information output by a wheel speed sensor provided on the vehicle;
[0037] The y-axis mileage is calculated based on the pulse information and the wheel information.
[0038] In the above embodiment, the Y-axis mileage is calculated using the wheel speed sensor, which avoids the quadratic integration drift problem of using pure inertial navigation (such as accelerometer integration of the inertial sensor), thereby improving the accuracy of the slope result obtained by subsequent calculation.
[0039] In a second aspect, an embodiment of the present application provides a slope detection device, comprising:
[0040] A first acquisition unit is configured to acquire the y-axis mileage of the vehicle; the y-axis specifically refers to a coordinate axis having the center of mass of the vehicle as its origin, along the longitudinal axis of the vehicle and pointing toward the front of the vehicle;
[0041] A construction unit, configured to construct a Kalman filter equation based on the y-axis mileage, the y-axis speed, and the sine value of the slope;
[0042] The first calculation unit is configured to calculate a slope result of a road surface on which the vehicle is located based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle.
[0043] In a third aspect, an embodiment of the present application provides a vehicle control device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the slope detection method as described in any one of the first aspects above is implemented.
[0044] In a fourth aspect, an embodiment of the present application 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 slope detection method as described in any one of the above-mentioned first aspects is implemented.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a vehicle control device, enables the vehicle control device to execute the slope detection method described in any one of the above-mentioned first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] 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 embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 This is a schematic diagram of a carrier coordinate system constructed with the center of mass of the vehicle as the origin, provided in one embodiment of the present application;
[0048] Figure 2 This is a flowchart of an implementation of a slope detection method provided in one embodiment of the present application;
[0049] Figure 3 is a flowchart of an implementation of a slope detection method provided by another embodiment of the present application;
[0050] Figure 4 is a flow chart of an implementation of a slope detection method provided in yet another embodiment of the present application;
[0051] Figure 5 is a structural diagram of a slope detection device provided in one embodiment of the present application;
[0052] Figure 6 It is a structural diagram of a vehicle control device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0054] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0055] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0056] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0057] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0058] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0059] Currently, electric assisted bicycles have become a convenient means of transportation, and their convenience and comfort are important indicators that influence the user experience. During riding, the motor outputs a certain proportion of assist torque based on the pedaling force, making riding easier. On uphill sections, without increasing the motor's assist ratio or switching the mechanical gear, the user needs to pedal with greater force to offset the influence of gravity and enable the vehicle to ascend smoothly. Determining whether to increase the motor's assist ratio or switch the mechanical gear requires accurately determining the slope.
[0060] The existing technology usually performs attitude recognition based on the 3-axis gyroscope and 3-axis accelerometer of the MEMS inertial sensor (including two types of devices: MEMS gyroscope and MEMS accelerometer) to determine the slope. Among them, the MEMS gyroscope is an angular velocity detection device. Specifically, the attitude solution process of the gyroscope and accelerometer of the existing MEMS inertial sensor is: integrating the gyroscope data, predicting the attitude, and correcting the predicted attitude using the residual difference between the direction of the acceleration data and the direction of the gravity vector of the predicted attitude. Among them, the accelerometer data contains the acceleration of acceleration and deceleration motion, and during acceleration and deceleration motion, the direction of the acceleration data is inconsistent with the direction of the gravity vector of the predicted attitude. The premise for the attitude solution of the existing technology is that it is in a static state or a uniform motion state, and the accelerometer data is approximately the acceleration of gravity.
[0061] However, since the riding motion of an electric power-assisted bicycle has the characteristics of continuous acceleration and deceleration, constant changes in acceleration, and severe mechanical vibration, the existing technology does not meet the premise that the accelerometer data is approximately the acceleration of gravity when only using gyroscopes and accelerometers for attitude calculation, resulting in large errors in the attitude calculation results and reduced detection accuracy.
[0062] Based on this, an embodiment of the present application proposes a slope detection method, thereby avoiding the problem of large errors caused by using only inertial sensors for posture calculation in the prior art, and improving the accuracy of slope detection.
[0063] See also Figure 1 , Figure 1 Schematic diagram of a carrier coordinate system constructed with the center of mass of the vehicle as the origin, provided in one embodiment of the present application. Figure 1 As shown, the y-axis of the carrier coordinate system in the embodiment of the present application is the coordinate axis along the longitudinal axis of the vehicle and pointing to the front of the vehicle, the x-axis is the coordinate axis perpendicular to the y-axis and pointing to the right side of the vehicle, and the z-axis is perpendicular to the vehicle chassis and vertically upward.
[0064] It should be noted that in all embodiments of the present application, the vehicle is an electric power-assisted vehicle, and the vehicle is equipped with an inertial sensor and a wheel speed sensor. The inertial sensor is a sensor including two types of devices: a 3-axis gyroscope and a 3-axis accelerometer, and the wheel speed sensor is a high-precision wheel speed sensor.
[0065] In practical applications, the high-precision wheel speed sensor can be a magnetoelectric sensor, a Hall effect sensor, or a magnetoresistive sensor.
[0066] See also Figure 2 , Figure 2 This is a flowchart of an implementation of a slope detection method provided in an embodiment of the present application. In this embodiment of the present application, the slope detection method is performed by a vehicle control device. The vehicle control device may be an integrated chip provided in the vehicle.
[0067] like Figure 2 As shown, the slope detection method provided in one embodiment of the present application may include S101 to S103, which are described in detail as follows:
[0068] In S101, the y-axis mileage of the vehicle is obtained; the y-axis specifically refers to a coordinate axis that takes the center of mass of the vehicle as the origin, runs along the longitudinal axis of the vehicle and points to the front of the vehicle.
[0069] In an embodiment of the present application, in order to detect the slope of the road on which the vehicle is located in real time, the vehicle control device can obtain the vehicle's y-axis mileage in real time.
[0070] In one embodiment of the present application, the vehicle control device may obtain the y-axis mileage of the vehicle through the following steps, as detailed below:
[0071] Acquiring wheel information of the vehicle and pulse information output by a wheel speed sensor provided on the vehicle;
[0072] The y-axis mileage is calculated based on the pulse information and the wheel information.
[0073] In one implementation of this embodiment, the vehicle control device can obtain the vehicle wheel information in real time through a server to which it is wirelessly connected. The server can be a desktop computer, a computer, or other device.
[0074] It should be noted that wheel information includes the vehicle's wheel diameter and wheel speed sensor resolution, while pulse information includes the number of pulses output by the wheel speed sensor per unit time. Wheel diameter specifically refers to the radius of the wheel, and wheel speed sensor resolution specifically refers to the baseline number of pulses output by the wheel speed sensor per one rotation of the vehicle's wheel.
[0075] In this embodiment, after obtaining the pulse information and wheel information, the vehicle control device can calculate the number of vehicle wheel rotations based on the number of pulses in the pulse information and the wheel speed sensor resolution in the wheel information. The vehicle control device can then calculate the vehicle's y-axis mileage based on the number of rotations and the vehicle's wheel diameter.
[0076] Specifically, y-axis mileage = [number of pulses*(2π*wheel diameter)] / wheel speed sensor resolution.
[0077] In S102 , a Kalman filter equation is constructed based on the y-axis mileage, the y-axis speed, and the sine value of the slope.
[0078] In practical applications, the Kalman filter relies on measurable data (such as inertial sensor data, wheel speed sensor data, etc.) to update the state. If the mathematical relationship between the state variable and the above measurable data is complex (such as nonlinear), it needs to be processed through linearization (such as extended Kalman filter EKF), which may introduce linearization errors. The sine value of the slope is directly related to the acceleration (such as the first Newton's law, the gravity component is G (vehicle gravity) * sθ x (sine of slope), acceleration = acceleration due to gravity * sine of slope), using the sine of slope as the state vector of the Kalman filter equation can avoid the nonlinear problem of calculating acceleration.
[0079] It should be noted that since acceleration = gravitational acceleration * sine of slope, combined with the existing motion equation, acceleration can be calculated from y-axis mileage and y-axis speed. Therefore, sine of slope can also be calculated from y-axis mileage and y-axis speed.
[0080] In some possible embodiments, in combination with S101, the vehicle control device can calculate the time interval of a single pulse based on the number of pulses in the pulse information. Thereafter, the vehicle control device can calculate the y-axis speed of the vehicle based on the time interval and the wheel diameter and wheel speed sensor resolution in the wheel information.
[0081] Specifically, y-axis speed=(2π*wheel diameter) / (time interval*wheel speed sensor resolution).
[0082] Therefore, in the embodiment of the present application, after obtaining the y-axis mileage, the vehicle control device can construct a Kalman filter equation based on the three parameters of the y-axis mileage, the above-mentioned y-axis speed and the above-mentioned slope sine value.
[0083] In some possible embodiments, since the error state Kalman filter equation has a low dimension, in this embodiment, the above-mentioned Kalman filter method may be an error state Kalman filter method.
[0084] In this embodiment, the state vector of the error state Kalman filter equation may include a system state vector and an error system state vector.
[0085] It should be noted that the system state vector X = [sθ x ,r y ,v y ,β ay ,β ωx ] T , where sθ x is the sine value of the slope, r y is the y-axis mileage, v y is the y-axis velocity, β ay is the y-axis accelerometer bias, β ωx is the x-axis gyroscope bias;
[0086] System error state vector δX=[δsθ x ,δr y ,δv y ,δβ ay ,δβ ωx ] T , where δsθ x is the slope sine error, δr y is the y-axis mileage error, δv y is the y-axis velocity error, δβ ay is the y-axis accelerometer bias error, δβ ωx is the x-axis gyroscope bias error.
[0087] In S103 , the slope of the road on which the vehicle is located is calculated based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle.
[0088] In an embodiment of the present application, after constructing the Kalman filter equation, the vehicle control device can perform relevant operations on the above Kalman filter equation based on the measurement information output by the vehicle's inertial sensor and the working principle of the existing Kalman filter to obtain the final slope result.
[0089] It should be noted that the above slope result may include the actual values of the three parameters, namely, the slope sine value, the y-axis distance, and the y-axis speed, at the target time. The target time may be the current time or any time after the current time.
[0090] The current time specifically refers to the time when the vehicle control device obtains the y-axis mileage of the vehicle.
[0091] The measurement information may only include the x-axis angular velocity (ie, the x-axis gyroscope measurement value) and the y-axis acceleration of the vehicle at the target time.
[0092] In one embodiment of the present application, since the error state Kalman filter equation has a low dimension and the amount of computation required to implement slope detection using the error state Kalman filter equation is much less than a nonlinear model that directly estimates the slope angle, in order to improve the efficiency of slope detection, when the Kalman filter equation is an error state Kalman filter equation, the vehicle control device can specifically perform the following steps: Figure 3 Steps S201 to S203 shown in FIG. 2 obtain the slope of the slope, as detailed below:
[0093] In S201, the historical actual value of the state vector of the error state Kalman filter equation at the previous moment is obtained.
[0094] In this embodiment, since the Kalman filter includes an estimated value of the state vector, and the estimated value of the state vector can be estimated by the historical actual value of the state vector, the vehicle control device can obtain the historical actual value of the state vector of the error state Kalman filter equation at the previous moment.
[0095] It should be noted that since the state vector of the error state Kalman filter equation includes the slope sine value, y-axis mileage and y-axis speed, the above-mentioned historical actual values may include the historical actual values corresponding to the slope sine value, the historical actual values corresponding to the y-axis mileage and the historical actual values corresponding to the y-axis speed.
[0096] In S202, based on the measurement information and the historical actual value, an estimated value of the state vector corresponding to the error state Kalman filter equation at a target time is calculated; the target time is after the previous time.
[0097] In this embodiment, after obtaining the historical actual value of the state vector of the error state Kalman filter equation at a previous moment, the vehicle control device can calculate an estimated value of the state vector corresponding to the error state Kalman filter equation at a target moment based on the measurement information and the historical actual value. The target moment is after the previous moment.
[0098] In one embodiment of the present application, when the measurement information includes the x-axis angular velocity and y-axis acceleration of the vehicle at the target time, and the state vector includes the sine value of the slope, the y-axis velocity, the y-axis mileage, the x-axis gyroscope bias, and the y-axis accelerometer bias, the vehicle control device can specifically obtain an estimated value of the state vector corresponding to the error state Kalman filter equation at the target time according to the following steps, as detailed below:
[0099] Calculating an estimated value of the slope sine value at the target time based on the x-axis gyroscope zero bias, the x-axis angular velocity, the historical actual value corresponding to the slope sine value of the inertial sensor at the target time, and a time interval; the time interval being the difference between the target time and the previous time;
[0100] Calculate an estimated value of the y-axis velocity at the target time based on the y-axis accelerometer bias of the inertial sensor at the target time, the y-axis acceleration, the estimated value of the sine value of the slope, the acceleration of gravity, the historical actual value corresponding to the y-axis velocity, and the time interval;
[0101] Based on the y-axis accelerometer zero bias of the inertial sensor at the target moment, the y-axis acceleration, the historical actual value corresponding to the sine value of the slope, the historical actual value corresponding to the y-axis velocity, the gravitational acceleration, the historical actual value corresponding to the y-axis mileage, and the time interval, an estimated value of the y-axis mileage at the target moment is calculated.
[0102] In this embodiment, zero offset refers to a constant error output by the sensor when there is no external acceleration or external angular velocity input.
[0103] It should be noted that the x-axis gyroscope bias and the y-axis accelerometer bias of the inertial sensor at the target time can be determined according to actual needs and are not limited here.
[0104] The time interval refers to the difference between the target moment and the previous moment.
[0105] In one embodiment of the present application, the vehicle control device may specifically calculate an estimated value of the slope sine value at the target time according to the following formula:
[0106] sθ xT =sθ xt +(ω x -β ωx )·Δt;
[0107] Where sθ xT Represents the estimated value of the slope sine at the target time, sθ xt Indicates the historical actual value corresponding to the sine value of the slope, ω xrepresents the x-axis angular velocity, β ωx represents the zero bias of the x-axis gyroscope, and Δt represents the time interval.
[0108] In another embodiment of the present application, the vehicle control device may specifically calculate an estimated value of the y-axis mileage at the target time according to the following formula:
[0109] r yT =r yt +v y ·Δt+(a y -β ay -g·sθ xt )·Δt 2 / 2;
[0110] Among them, r yT Represents the estimated value of the y-axis mileage at the target time, r yt Indicates the historical actual value corresponding to the y-axis mileage, v yt Indicates the historical actual value corresponding to the y-axis speed, β ay Indicates the y-axis accelerometer zero bias, a y represents the y-axis acceleration, sθ xt It represents the historical actual value corresponding to the sine value of the slope, g represents the acceleration of gravity, and Δt represents the time interval.
[0111] In yet another embodiment of the present application, the vehicle control device may calculate an estimated value of the y-axis speed at the target time according to the following formula:
[0112] v yT =v yt +(a y -β ay -g·sθ xt )·Δt;
[0113] Among them, v yT Represents the estimated value of the y-axis velocity at the target time, v yt Indicates the historical actual value corresponding to the y-axis speed, β ay Indicates the y-axis accelerometer zero bias, a y represents the y-axis acceleration, sθ xt It represents the historical actual value corresponding to the sine value of the slope, g represents the acceleration of gravity, and Δt represents the time interval.
[0114] As can be seen above, because the measurement information only includes the vehicle's x-axis angular velocity and y-axis acceleration at the target moment, there is no need to use the inertial sensor's 3-axis gyroscope and 3-axis accelerometer for posture recognition, thereby reducing the amount of computation and improving detection efficiency. Furthermore, the state vector in this embodiment only includes the slope sine value, y-axis velocity, y-axis mileage, x-axis gyroscope bias, and y-axis accelerometer bias. That is, the system state in this embodiment is a 5x1 matrix, resulting in a 5x5 covariance matrix and a 1x1 Kalman gain matrix K. Compared to the prior art, where the state vector also includes other gyroscope biases, resulting in a 6x1 system state, a 6x6 covariance matrix P, and a 6x3 Kalman gain matrix K, this embodiment further reduces the amount of computation. Furthermore, because riding an electric assisted bicycle involves continuous acceleration and deceleration, constantly changing acceleration, and intense mechanical vibration, using only the gyroscope and accelerometer outputs from the inertial sensors for attitude calculation does not satisfy the prerequisite that the accelerometer data approximates the acceleration due to gravity, which can easily lead to large errors in the attitude calculation results. Therefore, this embodiment combines the acquired Y-axis mileage to determine the final slope result, which can reduce these errors and thus improve detection accuracy.
[0115] In S203, the slope result is calculated based on the estimated value and the error state Kalman filter equation.
[0116] In this embodiment, after obtaining the estimated value of the state vector corresponding to the error state Kalman filter equation at the target time, the vehicle control device can continue to refer to the working principle of the existing error state Kalman filter, and continue to perform corresponding operations on the error state Kalman filter equation at this time in combination with the above estimated value to obtain the final slope result.
[0117] In one embodiment of the present application, since the vehicle has different effects on the wheel speed sensor and the inertial sensor when in different working conditions, the fluctuations of the wheel speed sensor and the inertial sensor under different working conditions are also different, which makes the noise covariance matrix in the Kalman filter different, thereby affecting the accuracy of the slope estimation. That is to say, during the dynamic driving of the vehicle, the accuracy of the slope estimation is significantly affected by the vehicle working conditions (such as acceleration and deceleration, etc.). Therefore, the vehicle control device can be specifically implemented as follows: Figure 4 The steps S301 to S305 shown above obtain the final slope result, which is described in detail as follows:
[0118] In S301 , based on the current operating condition of the vehicle, the noise covariance matrix of the error state Kalman filter equation is adjusted to obtain a target noise covariance matrix.
[0119] In this embodiment, the current operating condition includes, but is not limited to, constant vehicle speed and acceleration / deceleration. When the vehicle is traveling at a constant speed, the wheel speed change rate is small, and the accelerometer measurement value (i.e., the y-axis acceleration in the measurement information output by the inertial sensor) is close to the gravity component. When the vehicle is traveling at an acceleration / deceleration rate, the wheel speed change rate is large, and the accelerometer measurement value includes a significant non-gravity component.
[0120] The noise covariance matrix includes the process noise covariance matrix and the observation noise covariance matrix.
[0121] In this embodiment, when the current operating condition is that the vehicle is traveling at a constant speed, it means that the vehicle is in a low-noise operating condition. Therefore, the vehicle control device can reduce the value of the process noise covariance matrix and reduce the value of the observation noise covariance matrix to obtain the target noise covariance matrix, that is, the target process noise covariance matrix and the target observation noise covariance matrix.
[0122] When the current operating condition is vehicle acceleration / deceleration, the vehicle control device can increase the value of the process noise covariance matrix and reduce the value of the observation noise covariance matrix to obtain the target noise covariance matrix, that is, the target process noise covariance matrix and the target observation noise covariance matrix.
[0123] In S302, based on the estimated value, a process model corresponding to the error state Kalman filter equation is determined.
[0124] It should be noted that the process model, also known as the state transition model, is used to reflect the dynamic change law of the system state.
[0125] In some possible embodiments, the process model Φ is specifically as follows:
[0126]
[0127] In S303 , the state covariance matrix of the error state Kalman filter equation is updated based on the process model to obtain a first state covariance matrix.
[0128] In this embodiment, the vehicle control device can specifically update the first state covariance matrix according to the following equation:
[0129] P=Φ*P*Φ T +Q;
[0130] Wherein, P represents the first state covariance matrix, Φ represents the process model, and Q represents the target process noise covariance matrix in the target noise covariance matrix.
[0131] In S304 , a Kalman gain is calculated based on the target noise covariance matrix and the first state covariance matrix.
[0132] In this embodiment, the vehicle control device can specifically calculate the Kalman gain according to the following equation:
[0133] K=P1*H T / (H*P1*H T +R);
[0134] Wherein, K represents the Kalman gain, P1 represents the first state covariance matrix, H represents the observation model, and R represents the target observation noise covariance matrix in the target noise covariance matrix.
[0135] It should be noted that H = [0, 1, 0, 0, 0].
[0136] In S305 , the slope result is calculated based on the Kalman gain and the estimated value.
[0137] In this embodiment, after obtaining the Kalman gain, the vehicle control device can continue to refer to the working principle of the existing error state Kalman filter, and combine the above Kalman gain and the above estimated value to continue to perform corresponding operations on the error state Kalman filter equation at this time to obtain the final slope result.
[0138] In one embodiment of the present application, the vehicle control device may implement step S305 according to the following steps, which are described in detail as follows:
[0139] Calculate an error state estimate based on the estimated value of the y-axis mileage at the target time, the measured value of the y-axis mileage at the target time, and the Kalman gain;
[0140] The slope result is calculated based on the error state estimate and the estimate value.
[0141] It should be noted that the measured value of the y-axis mileage at the target time specifically refers to the actual value corresponding to the y-axis mileage obtained when the vehicle control device executes step S101.
[0142] In some possible embodiments, the vehicle control device may specifically obtain the actual value corresponding to the y-axis mileage through the vehicle's wheel information and the pulse information output by the vehicle's wheel speed sensor.
[0143] In this embodiment, the vehicle control device can specifically calculate the error state estimation value according to the following equation:
[0144] δx=K*(r y -r yT );
[0145] Among them, δ x represents the error state estimate, K represents the Kalman gain, ry Represents the measured value of the y-axis mileage at the target time, r yT Indicates the estimated value of the y-axis mileage at the target time.
[0146] Afterwards, the vehicle control device can specifically sum the above-mentioned error state estimation value and the estimated value of the state vector corresponding to the error state Kalman filter equation at the target time, and determine the actual value of the slope sine value, the actual value of the y-axis mileage and the actual value of the y-axis speed in the sum obtained as the final slope result.
[0147] As can be seen above, the slope detection method provided by the embodiments of the present application obtains the vehicle's y-axis mileage; the y-axis specifically refers to a coordinate axis with the vehicle's center of mass as its origin, along the vehicle's longitudinal axis and pointing toward the vehicle's front; constructs a Kalman filter equation based on the y-axis mileage, y-axis speed, and the sine value of the slope; and calculates the slope of the road surface on which the vehicle is located based on the Kalman filter equation and measurement information output by an inertial sensor installed on the vehicle. This application combines the y-axis mileage, inertial sensor measurement information, and Kalman filtering to determine the slope result, avoiding the large errors caused by using only inertial sensors and improving the accuracy of slope detection.
[0148] In one embodiment of the present application, each time a slope result is obtained through an error state Kalman filter, the final system state vector is obtained based on the error state estimate vector and the system state estimate. It is generally assumed that the resulting system state vector is consistent with the actual state, i.e., the error has been eliminated. Therefore, the error state estimate needs to be reset after each slope result is calculated. If the error state estimate is not reset, errors will be repeatedly superimposed, leading to system oscillation and divergence. Therefore, in this embodiment, after the vehicle control device obtains the final slope result, the vehicle control device can reset the error state estimate to zero to avoid subsequent slope detection at a later time based on the error state estimate at that time, which may result in low detection accuracy.
[0149] In another embodiment of the present application, in actual applications, if the covariance matrix is not updated, although the error state after reset is zero, the covariance matrix still retains the uncertainty of the previous cycle, causing the prediction stage to mistakenly believe that there is a large estimation error, causing unnecessary corrections. Therefore, in this embodiment, after the vehicle control device resets the error state estimate to zero, the vehicle control device can update the state covariance matrix of the error state Kalman filter equation based on the Kalman gain and the first state covariance matrix to obtain a second state covariance matrix to improve the accuracy of slope detection at a subsequent time.
[0150] In this embodiment, the vehicle control device can specifically obtain the second state covariance matrix through the following equation:
[0151] P2=(IK*H)*P1*(IK*H) T +K*R*K T ;
[0152] Wherein, P2 represents the second state covariance matrix, I represents the identity matrix, K represents the Kalman gain, H represents the observation model, P1 represents the first state covariance matrix, and R represents the target observation noise covariance matrix in the target noise covariance matrix.
[0153] In another embodiment of the present application, due to bias drift in the accelerometer and gyroscope in the inertial sensor, even if the bias is calibrated before leaving the factory, the bias will still drift after long-term use, thereby increasing the error. Therefore, in this embodiment, after step S305, since the vehicle control device sums the error state estimate and the estimated value of the state vector corresponding to the error state Kalman filter equation at the target time, and uses the slope sine value, y-axis mileage, and y-axis speed in the sum obtained as the final slope result, and the state vector corresponding to the error state Kalman filter equation also includes the x-axis gyroscope bias and the y-axis accelerometer bias, in this embodiment, the vehicle control device can also update the x-axis gyroscope bias and the y-axis accelerometer bias in the state vector in real time using the actual value of the x-axis gyroscope bias and the actual value of the y-axis accelerometer bias in the sum obtained, thereby achieving online learning of the x-axis gyroscope bias and the y-axis accelerometer bias in the state vector, reducing the error in the slope result caused by the bias.
[0154] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0155] Corresponding to the slope detection method described in the above embodiment, Figure 5 The schematic diagram of the structure of a slope detection device provided by an embodiment of the present application is shown. For the sake of convenience, only the parts related to the embodiment of the present application are shown. Figure 5 The slope detection device 400 includes: a first acquisition unit 41, a construction unit 42 and a first calculation unit 43.
[0156] The first acquisition unit 41 is used to acquire the y-axis mileage of the vehicle; the y-axis specifically refers to a coordinate axis that takes the center of mass of the vehicle as the origin, runs along the longitudinal axis of the vehicle and points to the front of the vehicle.
[0157] The construction unit 42 is used to construct a Kalman filter equation based on the y-axis mileage, the y-axis speed and the slope sine value.
[0158] The first calculation unit 43 is configured to calculate a slope result of the road surface on which the vehicle is located based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle.
[0159] In one embodiment of the present application, the Kalman filter equation is an error state Kalman filter equation; the first calculation unit 43 specifically includes: a second acquisition unit, a second calculation unit and a third calculation unit.
[0160] in:
[0161] The second acquisition unit is used to obtain the historical actual value of the state vector of the error state Kalman filter equation at the previous moment.
[0162] The second calculation unit is used to calculate an estimated value of the state vector corresponding to the error state Kalman filter equation at a target time based on the measurement information and the historical actual value; the target time is after the previous time.
[0163] The third calculation unit is used to calculate the slope result based on the estimated value and the error state Kalman filter equation.
[0164] In one embodiment of the present application, the measurement information includes the x-axis angular velocity and y-axis acceleration of the vehicle at the target time, where the x-axis refers to the coordinate axis perpendicular to the y-axis and pointing to the right side of the vehicle; the state vector includes the sine value of the slope, the y-axis velocity, the y-axis mileage, the x-axis gyroscope bias, and the y-axis accelerometer bias; the second calculation unit specifically includes: a fourth calculation unit, a fifth calculation unit, and a sixth calculation unit. Among them:
[0165] The fourth calculation unit is used to calculate an estimated value of the slope sine value at the target moment based on the x-axis gyroscope zero bias, the x-axis angular velocity, the historical actual value corresponding to the slope sine value of the inertial sensor at the target moment, and the time interval; the time interval refers to the difference between the target moment and the previous moment.
[0166] The fifth calculation unit is used to calculate the estimated value of the y-axis velocity at the target moment based on the y-axis accelerometer zero bias of the inertial sensor at the target moment, the y-axis acceleration, the estimated value of the sine value of the slope, the acceleration of gravity, the historical actual value corresponding to the y-axis velocity, and the time interval.
[0167] The sixth calculation unit is used to calculate the estimated value of the y-axis mileage at the target moment based on the y-axis accelerometer zero bias of the inertial sensor at the target moment, the y-axis acceleration, the historical actual value corresponding to the sine value of the slope, the historical actual value corresponding to the y-axis velocity, the gravitational acceleration, the historical actual value corresponding to the y-axis mileage, and the time interval.
[0168] In one embodiment of the present application, the third calculation unit specifically includes: an adjustment unit, a model determination unit, a first updating unit, a seventh calculation unit, and an eighth calculation unit.
[0169] The adjustment unit is used to adjust the noise covariance matrix of the error state Kalman filter equation based on the current working condition of the vehicle to obtain a target noise covariance matrix.
[0170] The model determination unit is used to determine the process model corresponding to the error state Kalman filter equation based on the estimated value.
[0171] The first updating unit is used to update the state covariance matrix of the error state Kalman filter equation based on the process model to obtain a first state covariance matrix.
[0172] The seventh calculation unit is configured to calculate a Kalman gain based on the target noise covariance matrix and the first state covariance matrix.
[0173] The eighth calculation unit is used to calculate the slope result based on the Kalman gain and the estimated value.
[0174] In one embodiment of the present application, the eighth calculation unit specifically includes: a ninth calculation unit and a tenth calculation unit.
[0175] The ninth calculation unit is used to calculate an error state estimation value based on the estimated value of the y-axis mileage at the target time, the measured value of the y-axis mileage at the target time, and the Kalman gain.
[0176] The tenth calculation unit is used to calculate the slope result based on the error state estimation value and the estimation value.
[0177] In one embodiment of the present application, the slope detection device 400 further includes: a reset unit and a second update unit.
[0178] The resetting unit is used to reset the error state estimation value to zero.
[0179] The second updating unit is used to update the state covariance matrix of the error state Kalman filter equation based on the Kalman gain and the first state covariance matrix to obtain a second state covariance matrix.
[0180] In one embodiment of the present application, the first acquisition unit 41 specifically includes: a third acquisition unit and an eleventh calculation unit.
[0181] The third acquiring unit is used to acquire wheel information of the vehicle and acquire pulse information output by a wheel speed sensor provided on the vehicle.
[0182] The eleventh calculation unit is used to calculate the Y-axis mileage based on the pulse information and the wheel information.
[0183] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0184] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0185] Figure 6 This is a schematic diagram of the structure of a vehicle control device provided in one embodiment of the present application. Figure 6 As shown, the vehicle control device 5 of this embodiment includes: at least one processor 50 ( Figure 6 Only one is shown in the figure) a processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein when the processor 50 executes the computer program 52, the steps in any of the above-mentioned slope detection method embodiments are implemented.
[0186] The vehicle control device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 6 This is merely an example of the vehicle control device 5 and does not constitute a limitation on the vehicle control device 5 . The vehicle control device 5 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the vehicle control device 5 may also include input and output devices, network access devices, etc.
[0187] The processor 50 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, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0188] In some embodiments, the memory 51 may be an internal storage unit of the vehicle control device 5, such as the internal memory of the vehicle control device 5. In other embodiments, the memory 51 may also be an external storage device of the vehicle control device 5, 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 control device 5. Furthermore, the memory 51 may also include both the internal storage unit of the vehicle control device 5 and an external storage device. The memory 51 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 51 may also be used to temporarily store data that has been output or is about to be output.
[0189] An embodiment of the present application further 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 steps in the above-mentioned various method embodiments can be implemented.
[0190] An embodiment of the present application provides a computer program product. When the computer program product runs on a vehicle control device, the vehicle control device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the vehicle control device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0192] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0193] The above-described 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. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A slope detection method, characterized in that: include: Obtain the vehicle's y-axis mileage; the y-axis specifically refers to a coordinate axis with the vehicle's center of mass as the origin, along the vehicle's longitudinal axis and pointing toward the vehicle's front end; A Kalman filter equation is constructed based on the y-axis mileage, the y-axis speed, and the sine value of the slope; Based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle, a slope result of the road surface on which the vehicle is located is calculated.
2. The slope detection method according to claim 1, wherein: The Kalman filter equation is an error state Kalman filter equation; the slope result of the road surface on which the vehicle is located is calculated based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle, including: Obtaining a historical actual value of a state vector of the error state Kalman filter equation at a previous moment; Based on the measurement information and the historical actual value, an estimated value of a state vector corresponding to the error state Kalman filter equation at a target time is calculated; the target time is after the previous time; The slope result is calculated based on the estimated value and the error state Kalman filter equation.
3. The slope detection method according to claim 2, wherein: The measurement information includes the x-axis angular velocity and y-axis acceleration of the vehicle at the target time, where the x-axis refers to a coordinate axis perpendicular to the y-axis and pointing to the right side of the vehicle; the state vector includes the sine value of the slope, the y-axis velocity, the y-axis mileage, the x-axis gyroscope bias, and the y-axis accelerometer bias; and based on the measurement information and the historical actual values, an estimated value of the state vector corresponding to the error state Kalman filter equation at the target time is calculated; The target moment is after the previous moment, including: Calculating an estimated value of the slope sine value at the target time based on the x-axis gyroscope zero bias, the x-axis angular velocity, the historical actual value corresponding to the slope sine value of the inertial sensor at the target time, and a time interval; the time interval being the difference between the target time and the previous time; Calculate an estimated value of the y-axis velocity at the target time based on the y-axis accelerometer bias of the inertial sensor at the target time, the y-axis acceleration, the estimated value of the sine value of the slope, the acceleration of gravity, the historical actual value corresponding to the y-axis velocity, and the time interval; Based on the y-axis accelerometer zero bias of the inertial sensor at the target moment, the y-axis acceleration, the historical actual value corresponding to the sine value of the slope, the historical actual value corresponding to the y-axis velocity, the gravitational acceleration, the historical actual value corresponding to the y-axis mileage, and the time interval, an estimated value of the y-axis mileage at the target moment is calculated.
4. The slope detection method according to claim 2, wherein: The calculating the slope result based on the estimated value and the error state Kalman filter equation includes: Based on the current operating condition of the vehicle, adjusting the noise covariance matrix of the error state Kalman filter equation to obtain a target noise covariance matrix; Determining a process model corresponding to the error state Kalman filter equation based on the estimated value; updating a state covariance matrix of an error state Kalman filter equation based on the process model to obtain a first state covariance matrix; Calculating a Kalman gain based on the target noise covariance matrix and the first state covariance matrix; The slope result is calculated based on the Kalman gain and the estimated value.
5. The slope detection method according to claim 4, wherein: The calculating the slope result based on the Kalman gain and the estimated value includes: Calculate an error state estimate based on the estimated value of the y-axis mileage at the target time, the measured value of the y-axis mileage at the target time, and the Kalman gain; The slope result is calculated based on the error state estimate and the estimate value.
6. The slope detection method according to claim 5, wherein: After calculating the slope result based on the estimated value and the error state Kalman filter equation, the method further includes: resetting the error state estimate to zero; Based on the Kalman gain and the first state covariance matrix, the state covariance matrix of the error state Kalman filter equation is updated to obtain a second state covariance matrix.
7. The slope detection method according to any one of claims 1 to 6, characterized in that: The obtaining of the vehicle's y-axis mileage includes: Acquiring wheel information of the vehicle and pulse information output by a wheel speed sensor provided on the vehicle; The y-axis mileage is calculated based on the pulse information and the wheel information.
8. A slope detection device, characterized in that: include: A first acquisition unit is configured to acquire the y-axis mileage of the vehicle; the y-axis specifically refers to a coordinate axis having the center of mass of the vehicle as its origin, along the longitudinal axis of the vehicle and pointing toward the front of the vehicle; A construction unit, configured to construct a Kalman filter equation based on the y-axis mileage, the y-axis speed, and the sine value of the slope; The first calculation unit is configured to calculate a slope result of a road surface on which the vehicle is located based on the Kalman filter equation and measurement information output by an inertial sensor provided on the vehicle.
9. A vehicle control device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the slope detection method according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the slope detection method according to any one of claims 1 to 7 when being executed.
Citation Information
Cited By
Unmanned aerial vehicle fusion height estimation method, unmanned aerial vehicle and medium
CN121655464A