Slope calculation method and device for road where vehicle is located, vehicle and storage medium
Patent Information
- Application Number
- CN202610742545.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-21
AI Technical Summary
[0005]本申请提供一种车辆所处道路的坡度计算方法、装置、车辆及存储介质,以解决相关技术中,由于基于油门相关行车数据的进行坡度计算仅适配人工驾驶工况,无法适配智能泊车运行场景,而利用坡度传感器的计算方式对硬件配置存在硬性要求,无法适配未装配传感器的车型,导致车辆控制组件在坡道场景下无法有效获取坡度信息等问题
[0028]本申请第五方面实施例提供一种计算机程序产品,所述计算机程序产品存储计算机程序,该程序被处理器执行时实现如上的车辆所处道路的坡度计算方法。
Smart Images

Figure CN122607336A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent parking assistance technology, and in particular to a method, device, vehicle, and storage medium for calculating the slope of the road where the vehicle is located. Background Technology
[0002] Currently, during the development of intelligent parking assistance functions, the interface of the longitudinal control component has been changed to a positive torque interface. In complex driving scenarios such as slopes, the torque compensation calculation needs to be completed with the help of slope information. At the same time, it is impossible to obtain slope-related data from the chassis supplier, so the vehicle control component can only complete the slope calculation autonomously.
[0003] In related technologies, the initial value provided by the slope sensor is used to calculate the slope. Alternatively, the throttle depth and the trend of throttle depth change can be used as typical working condition information to estimate the slope, or the current throttle pedal opening value can be obtained to calculate the slope.
[0004] However, in related technologies, slope calculation based on throttle-related driving data is only suitable for manual driving conditions and cannot be adapted to intelligent parking operation scenarios, resulting in a decrease in the accuracy of slope calculation and failure to meet the slope compensation requirements under positive torque interface. Furthermore, the calculation method using slope sensors has strict requirements on hardware configuration and cannot be adapted to models without sensors, which urgently needs to be improved. Summary of the Invention
[0005] This application provides a method, device, vehicle, and storage medium for calculating the slope of a road where a vehicle is located, in order to solve the problems in related technologies, such as the fact that slope calculation based on throttle-related driving data is only suitable for manual driving conditions and cannot be adapted to intelligent parking operation scenarios, and the calculation method using slope sensors has rigid requirements on hardware configuration and cannot be adapted to vehicle models without sensors, resulting in the vehicle control components being unable to effectively obtain slope information in slope scenarios.
[0006] The first aspect of this application provides a method for calculating the slope of a road where a vehicle is located, comprising the following steps: when the vehicle is in parking assist mode, collecting vehicle data of the vehicle; identifying the current operating condition of the vehicle based on the vehicle data; matching a slope calculation command based on the current operating condition, and calculating the actual slope of the road where the vehicle is located in response to the slope calculation command.
[0007] Through the above-mentioned technical means, the embodiments of this application can collect vehicle data when the vehicle is in parking assistance mode, and call the corresponding slope calculation logic according to different working conditions to autonomously calculate the actual slope of the road. By adopting different calculation methods for different working conditions, the accuracy and stability of the slope calculation value are improved, providing real-time and accurate slope information for longitudinal torque compensation, and improving the control accuracy and safety of the intelligent parking system on slopes.
[0008] Optionally, in one embodiment of this application, the step of collecting vehicle data includes: collecting the original longitudinal acceleration value of the vehicle and filtering the original longitudinal acceleration value to obtain the longitudinal acceleration value of the vehicle; collecting the left rear wheel speed value and the right rear wheel speed value of the vehicle, calculating the average wheel speed value of the vehicle based on the left rear wheel speed value and the right rear wheel speed value, calculating the original average wheel acceleration value of the vehicle based on the average wheel speed value, and filtering the original average wheel acceleration value to obtain the average wheel acceleration value of the vehicle; collecting the original gear value of the vehicle, calculating the gear coefficient of the vehicle based on the original gear value and the original longitudinal acceleration value; collecting the obstacle avoidance marker value and the remaining tracking distance of the current trajectory of the vehicle; and generating the vehicle data based on the longitudinal acceleration value, the average wheel acceleration value, the gear coefficient, the obstacle avoidance marker value, and the remaining tracking distance of the current trajectory.
[0009] Through the above-mentioned technical means, the embodiments of this application can collect longitudinal acceleration values, average wheel acceleration values, gear coefficients, obstacle avoidance marker values, and the remaining tracking distance of the current trajectory. By filtering, noise interference is eliminated, the accuracy of basic parameter collection is improved, and multi-dimensional vehicle status information is integrated to generate vehicle data, thereby providing a comprehensive and accurate data foundation for subsequent working condition identification and slope calculation.
[0010] Optionally, in one embodiment of this application, calculating the gear coefficient of the vehicle based on the original gear value and the original longitudinal acceleration value includes: determining the gear coefficient as a first coefficient in response to the original gear value being a forward gear; determining the gear coefficient as a second coefficient in response to the original gear value being a reverse gear; determining the gear coefficient as the second coefficient in response to the original gear value being a parking gear or neutral gear and the original longitudinal acceleration value being negative; and determining the gear coefficient as the first coefficient in response to the original gear value being a parking gear or neutral gear and the original longitudinal acceleration value being positive.
[0011] Through the above-mentioned technical means, the embodiments of this application can calculate the corresponding gear coefficient according to the vehicle's gear status and the sign of longitudinal acceleration. This allows the actual driving direction to be determined based on the sign of the original longitudinal acceleration in scenarios where the gear signal, such as parking or neutral, cannot directly reflect the vehicle's movement trend. This avoids the problem of inaccurate slope calculation when the vehicle rolls or moves unexpectedly on a slope, thereby improving the accuracy of slope calculation and adaptability to operating conditions.
[0012] Optionally, in one embodiment of this application, identifying the current operating condition of the vehicle based on the vehicle data includes: determining that the current operating condition of the vehicle is a predicted operating condition in response to the remaining tracking distance of the current trajectory being less than a first preset threshold; determining that the current operating condition is a stationary operating condition in response to the left rear wheel speed value and the right rear wheel speed value being both preset stationary values and maintaining the preset stationary values for a duration exceeding a preset duration; determining that the current operating condition of the vehicle is an obstacle avoidance operating condition in response to the obstacle avoidance flag value not being equal to a second preset threshold; and determining that the current operating condition of the vehicle is a normal operating condition in response to the vehicle's current operating condition not being the predicted operating condition, the stationary operating condition, or the obstacle avoidance operating condition.
[0013] Through the above-mentioned technical means, the embodiments of this application can automatically divide the parking process into four typical working conditions: prediction, stationary, obstacle avoidance, and normal, based on conditions such as the remaining trajectory distance, wheel speed static duration, and obstacle avoidance marker position value. This allows for matching a suitable slope calculation strategy for each working condition, preventing the direct application of conventional algorithms in unstable or special states from causing slope estimation distortion.
[0014] Optionally, in one embodiment of this application, the step of matching a slope calculation instruction based on the current operating condition and calculating the actual slope of the road where the vehicle is located in response to the slope calculation instruction includes: in response to the current operating condition of the vehicle being the predicted operating condition, matching the slope calculation instruction corresponding to the predicted operating condition to calculate the actual slope based on past slope values; in response to the current operating condition of the vehicle being the stationary operating condition, matching the slope calculation instruction corresponding to the stationary operating condition to calculate the average value of longitudinal acceleration values over a preset past time period, and calculating the actual slope based on the longitudinal acceleration values. The average value is used to determine the actual slope; in response to the current operating condition of the vehicle being the obstacle avoidance condition, the slope calculation instruction corresponding to the obstacle avoidance condition is matched to determine the calibration parameters of the vehicle based on the obstacle avoidance flag value, and the actual slope is calculated based on the longitudinal acceleration value, the calibration parameters, the average wheel acceleration value, and the gear coefficient; in response to the current operating condition of the vehicle being the normal operating condition, the slope calculation instruction corresponding to the normal operating condition is matched to calculate the actual slope based on the longitudinal acceleration value, the average wheel acceleration value, and the gear coefficient.
[0015] Through the above-mentioned technical means, the embodiments of this application can select an intelligent slope calculation strategy based on the working condition identification results. Different slope calculation algorithms are adopted for predicted working conditions, static working conditions, obstacle avoidance working conditions and normal working conditions, realizing scene adaptive optimization of slope calculation. Moreover, the calculation is simple and can be performed on a low-computing-power vehicle computing platform while ensuring real-time performance. This improves the accuracy and stability of slope calculation results in all scenarios and ensures the smooth and reliable execution of torque compensation control actions based on slope data.
[0016] A second aspect of this application provides a slope calculation device for a road where a vehicle is located, comprising: a data acquisition module for acquiring vehicle data when the vehicle is in parking assist mode; an identification module for identifying the current operating condition of the vehicle based on the vehicle data; and a calculation module for matching a slope calculation command based on the current operating condition and calculating the actual slope of the road where the vehicle is located in response to the slope calculation command.
[0017] Through the above-mentioned technical means, the embodiments of this application can collect vehicle data when the vehicle is in parking assistance mode, and call the corresponding slope calculation logic according to different working conditions to autonomously calculate the actual slope of the road. By adopting different calculation methods for different working conditions, the accuracy and stability of the slope calculation value are improved, providing real-time and accurate slope information for longitudinal torque compensation, and improving the control accuracy and safety of the intelligent parking system on slopes.
[0018] Optionally, in one embodiment of this application, the acquisition module includes: a first acquisition unit, configured to acquire the original longitudinal acceleration value of the vehicle and filter the original longitudinal acceleration value to obtain the longitudinal acceleration value of the vehicle; a second acquisition unit, configured to acquire the left rear wheel speed value and the right rear wheel speed value of the vehicle, calculate the average wheel speed value of the vehicle based on the left rear wheel speed value and the right rear wheel speed value, calculate the original average wheel acceleration value of the vehicle based on the average wheel speed value, and filter the original average wheel acceleration value to obtain the average wheel acceleration value of the vehicle; a third acquisition unit, configured to acquire the original gear value of the vehicle, calculate the gear coefficient of the vehicle based on the original gear value and the original longitudinal acceleration value; a fourth acquisition unit, configured to acquire the obstacle avoidance marker value and the remaining tracking distance of the current trajectory of the vehicle; and a generation unit, configured to generate the vehicle data based on the longitudinal acceleration value, the average wheel acceleration value, the gear coefficient, the obstacle avoidance marker value, and the remaining tracking distance of the current trajectory.
[0019] Through the above-mentioned technical means, the embodiments of this application can collect longitudinal acceleration values, average wheel acceleration values, gear coefficients, obstacle avoidance marker values, and the remaining tracking distance of the current trajectory. By filtering, noise interference is eliminated, the accuracy of basic parameter collection is improved, and multi-dimensional vehicle status information is integrated to generate vehicle data, thereby providing a comprehensive and accurate data foundation for subsequent working condition identification and slope calculation.
[0020] Optionally, in one embodiment of this application, the third acquisition unit includes: a first determining subunit, configured to determine the gear coefficient as a first coefficient in response to the original gear value being a forward gear; a second determining subunit, configured to determine the gear coefficient as a second coefficient in response to the original gear value being a reverse gear; a third determining subunit, configured to determine the gear coefficient as the second coefficient in response to the original gear value being a parking gear or neutral gear and the original longitudinal acceleration value being negative; and a fourth determining subunit, configured to determine the gear coefficient as the first coefficient in response to the original gear value being a parking gear or neutral gear and the original longitudinal acceleration value being positive.
[0021] Through the above-mentioned technical means, the embodiments of this application can calculate the corresponding gear coefficient according to the vehicle's gear status and the sign of longitudinal acceleration. This allows the actual driving direction to be determined based on the sign of the original longitudinal acceleration in scenarios where the gear signal, such as parking or neutral, cannot directly reflect the vehicle's movement trend. This avoids the problem of inaccurate slope calculation when the vehicle rolls or moves unexpectedly on a slope, thereby improving the accuracy of slope calculation and adaptability to operating conditions.
[0022] Optionally, in one embodiment of this application, the identification module includes: a first determining unit, configured to determine that the current operating condition of the vehicle is a predicted operating condition in response to the remaining tracking distance of the current trajectory being less than a first preset threshold; a second determining unit, configured to determine that the current operating condition is a stationary operating condition in response to the left rear wheel speed value and the right rear wheel speed value being both preset stationary values and the duration of maintaining the preset stationary values exceeding a preset duration; a third determining unit, configured to determine that the current operating condition of the vehicle is an obstacle avoidance operating condition in response to the obstacle avoidance flag value not being equal to a second preset threshold; and a fourth determining unit, configured to determine that the current operating condition of the vehicle is a normal operating condition in response to the current operating condition of the vehicle not being the predicted operating condition, the stationary operating condition, or the obstacle avoidance operating condition.
[0023] Through the above-mentioned technical means, the embodiments of this application can automatically divide the parking process into four typical working conditions: prediction, stationary, obstacle avoidance, and normal, based on conditions such as the remaining trajectory distance, wheel speed static duration, and obstacle avoidance marker position value. This allows for matching a suitable slope calculation strategy for each working condition, preventing the direct application of conventional algorithms in unstable or special states from causing slope estimation distortion.
[0024] Optionally, in one embodiment of this application, the calculation module includes: a first calculation unit, configured to, in response to the vehicle's current operating condition being the predicted operating condition, match the slope calculation instruction corresponding to the predicted operating condition to calculate the actual slope based on past slope values; a second calculation unit, configured to, in response to the vehicle's current operating condition being the stationary operating condition, match the slope calculation instruction corresponding to the stationary operating condition to calculate the average value of longitudinal acceleration values over a preset past time period, and determine the actual slope based on the average value of the longitudinal acceleration values; and a third calculation unit, configured to... In response to the vehicle's current operating condition being the obstacle avoidance condition, the slope calculation instruction corresponding to the obstacle avoidance condition is matched to determine the vehicle's calibration parameters based on the obstacle avoidance flag value, and the actual slope is calculated based on the longitudinal acceleration value, the calibration parameters, the average wheel acceleration value, and the gear coefficient; the fourth calculation unit is used to respond to the vehicle's current operating condition being the normal operating condition, match the slope calculation instruction corresponding to the normal operating condition, and calculate the actual slope based on the longitudinal acceleration value, the average wheel acceleration value, and the gear coefficient.
[0025] Through the above-mentioned technical means, the embodiments of this application can select an intelligent slope calculation strategy based on the working condition identification results. Different slope calculation algorithms are adopted for predicted working conditions, static working conditions, obstacle avoidance working conditions and normal working conditions, realizing scene adaptive optimization of slope calculation. Moreover, the calculation is simple and can be performed on a low-computing-power vehicle computing platform while ensuring real-time performance. This improves the accuracy and stability of slope calculation results in all scenarios and ensures the smooth and reliable execution of torque compensation control actions based on slope data.
[0026] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for calculating the slope of the road where the vehicle is located as described in the above embodiments.
[0027] A fourth aspect of this application provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for calculating the slope of the road where the vehicle is located.
[0028] A fifth aspect of this application provides a computer program product that stores a computer program that, when executed by a processor, implements the above-described method for calculating the slope of the road where the vehicle is located.
[0029] This application embodiment can collect vehicle data when the vehicle is in parking assist mode and call corresponding slope calculation logic according to different operating conditions to autonomously calculate the actual road slope. By adopting different calculation methods for different operating conditions, the accuracy and stability of the slope calculation value are improved, providing real-time and accurate slope information for longitudinal torque compensation, and improving the control accuracy and safety of the intelligent parking system on slopes. This solves the problems in related technologies, such as slope calculation based on throttle-related driving data only being suitable for manual driving conditions and not for intelligent parking scenarios, and the calculation method using slope sensors having rigid hardware requirements and not being suitable for vehicles without sensors, resulting in the vehicle control components being unable to effectively obtain slope information in slope scenarios.
[0030] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0031] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a method for calculating the slope of a road where a vehicle is located, according to an embodiment of this application. Figure 2 This is a flowchart illustrating a method for calculating the slope of a road where a vehicle is located, according to an embodiment of this application. Figure 3 This is a schematic diagram of a slope calculation device for a road where a vehicle is located, provided according to an embodiment of this application. Figure 4 This is a structural schematic diagram of a vehicle provided according to an embodiment of this application.
[0032] Figure label: 10-Slope calculation device for the road where the vehicle is located; 100-Acquisition module, 200-Identification module, 300-Calculation module; 401-Memory, 402-Processor, 403-Communication interface. Detailed Implementation
[0033] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0034] The following description, with reference to the accompanying drawings, outlines a method, apparatus, vehicle, and storage medium for calculating the slope of a road where a vehicle is located, representing an embodiment of this application. Addressing the issues raised in the background section regarding slope calculation based on throttle-related driving data (which is only suitable for manual driving and not for intelligent parking scenarios), and the requirement for hardware limitations in slope sensor-based calculations (which are unsuitable for vehicles without sensors), this application provides a method for calculating the slope of a road where a vehicle is located. This method collects vehicle data while the vehicle is in parking assist mode and calls corresponding slope calculation logic for different operating conditions to autonomously calculate the actual road slope. By employing different calculation methods for different operating conditions, the accuracy and stability of the slope calculation value are improved, providing real-time and accurate slope information for longitudinal torque compensation and enhancing the control precision and safety of the intelligent parking system on slopes. This solves the problems in related technologies, such as the fact that slope calculation based on throttle-related driving data is only suitable for manual driving conditions and cannot be adapted to intelligent parking operation scenarios, while the calculation method using slope sensors has rigid requirements on hardware configuration and cannot be adapted to vehicle models without sensors, resulting in the vehicle control components being unable to effectively obtain slope information in slope scenarios.
[0035] Specifically, Figure 1 This is a flowchart illustrating a method for calculating the slope of a road where a vehicle is located, provided in an embodiment of this application.
[0036] like Figure 1 As shown, the method for calculating the slope of the road where the vehicle is located includes the following steps: In step S101, when the vehicle is in parking assist mode, vehicle data is collected.
[0037] It is understood that, in the embodiments of this application, the parking assist mode refers to the operating state in which the vehicle is automatically controlled by the system to drive and brake longitudinally to complete the parking maneuver, at which time the driver's manual operation is removed; vehicle data can refer to the set of parameters reflecting the vehicle's status and environmental information during the parking process, which may include longitudinal acceleration value, average wheel acceleration value, gear coefficient, obstacle avoidance sign position value, and remaining tracking distance of the current trajectory, etc.
[0038] In actual implementation, the embodiments of this application can collect vehicle data and data from other components of the intelligent parking assist function, and perform data processing. For example, after the vehicle controller recognizes that the parking assist function is activated and the vehicle is in parking assist mode, the embodiments of this application can automatically start the data acquisition process, and complete parameter retrieval based on the vehicle's inertial measurement unit, rear wheel speed sensor, gear signal acquisition component, and parking planning component.
[0039] This application embodiment can complete the directional collection of vehicle data in the parking assistance mode scenario, providing a reliable data foundation for subsequent slope calculation, avoiding the dependence of slope sensor hardware configuration and the limitation of human driving condition data collection, and adapting to the slope compensation requirements of the positive torque interface of the longitudinal control component.
[0040] In step S102, the current operating condition of the vehicle is identified based on the vehicle data.
[0041] It is understood that, in the embodiments of this application, "operating condition" refers to the specific operating state of the vehicle during the parking assistance process, used to distinguish the vehicle's motion characteristics under different scenarios, and may include predicted operating condition, stationary operating condition, obstacle avoidance operating condition, and normal operating condition.
[0042] For example, embodiments of this application can determine the current operating condition based on the collected data. Specifically, embodiments of this application can integrate various types of collected vehicle data and compare and verify them one by one with the built-in operating condition determination rules. The parking and driving stage is determined by the trajectory distance parameter, the vehicle start-stop state is determined by the wheel speed parameter, and the driving interference state is determined by the obstacle avoidance signal. Through multi-dimensional parameter linkage comparison, the current operating state of the vehicle is automatically classified and divided.
[0043] This application embodiment can intelligently identify parking conditions based on vehicle data, accurately distinguish the operating status under various parking conditions, and clarify the differences in the force and motion patterns of the vehicle body under different conditions, thereby ensuring the accuracy and reliability of condition identification and providing a precise decision-making basis for subsequent differentiated slope calculation.
[0044] In step S103, a slope calculation command is matched according to the current working condition, and in response to the slope calculation command, the actual slope of the road where the vehicle is located is calculated.
[0045] It is understood that the slope calculation instructions in this application embodiment can be interpreted as slope calculation functions or algorithm flows pre-bound for different working conditions. The actual slope refers to the slope value corresponding to the angle between the road surface where the vehicle is currently located and the horizontal plane.
[0046] In actual implementation, the embodiments of this application can use different methods to calculate the slope according to different working conditions, perform post-processing on the calculation results, and make targeted adaptations to the motion control components of the intelligent parking assistance function to generate the slope values required by the motion control components in order to improve the comfort of motion control.
[0047] For example, embodiments of this application can establish a working condition-instruction mapping table. Once a specific working condition is identified, the system automatically calls the corresponding slope calculation algorithm, imports various vehicle operating parameters that have been optimized in the previous stage to participate in the calculation, and finally calculates the actual road slope, sending the calculation results to the motion control component in real time. For instance, under predicted working conditions, a historical slope continuation calculation instruction is called; under stationary working conditions, an acceleration average value calculation instruction is called; under obstacle avoidance working conditions, a compensation calculation instruction with calibration parameters is called; and under normal working conditions, a multi-parameter fusion calculation instruction is called, thereby achieving scene-adaptive slope calculation.
[0048] The embodiments of this application can match the corresponding calculation instructions according to the working condition type to complete the slope solution, ensuring the optimality of slope calculation under different scenarios, significantly improving the accuracy and applicability of slope calculation results, ensuring that the slope calculation results fit the actual road conditions, and meeting the control requirements of real-time slope torque compensation during intelligent parking.
[0049] Optionally, in one embodiment of this application, collecting vehicle data includes: collecting the vehicle's original longitudinal acceleration value and filtering the original longitudinal acceleration value to obtain the vehicle's longitudinal acceleration value; collecting the left rear wheel speed value and the right rear wheel speed value of the vehicle to calculate the vehicle's average wheel speed value based on the left rear wheel speed value and the right rear wheel speed value; calculating the vehicle's original average wheel acceleration value based on the average wheel speed value and filtering the original average wheel acceleration value to obtain the vehicle's average wheel acceleration value; collecting the vehicle's original gear value to calculate the vehicle's gear coefficient based on the original gear value and the original longitudinal acceleration value; collecting the vehicle's obstacle avoidance marker position value and the remaining tracking distance of the current trajectory; and generating vehicle data based on the longitudinal acceleration value, the average wheel acceleration value, the gear coefficient, the obstacle avoidance marker position value, and the remaining tracking distance of the current trajectory.
[0050] It is understood that, in the embodiments of this application, the original longitudinal acceleration value can be understood as the unprocessed longitudinal acceleration signal directly output by the inertial measurement unit; the average wheel speed value refers to the arithmetic mean of the left rear wheel speed and the right rear wheel speed, and the original average wheel acceleration value refers to the acceleration value obtained by differentiating the average wheel speed value over time; the gear coefficient can be understood as a parameter characterizing the equivalent driving direction of the vehicle; the obstacle avoidance flag value can be used to indicate the current urgency of obstacle avoidance; the remaining tracking distance of the current trajectory refers to the path length from the current vehicle position to the parking target endpoint.
[0051] In actual implementation, this embodiment can acquire the raw longitudinal acceleration value from the inertial measurement unit, filter the raw longitudinal acceleration value to eliminate high-frequency noise and vehicle body vibration interference, and obtain the longitudinal acceleration value. The wheel speed values of the left and right rear wheels are acquired from the wheel speed sensors of the left and right rear wheels, respectively. The average wheel speed value is calculated using the left and right rear wheel speed values. The original average wheel acceleration value is obtained by differentiating the average wheel speed value. The original average wheel acceleration value is then filtered to obtain the average wheel acceleration value.
[0052] Furthermore, in this embodiment, the original gear value can be read from the vehicle's CAN (Controller Area Network), and the gear coefficient can be calculated based on the original gear value and the original longitudinal acceleration value. In this embodiment, obstacle avoidance flag information can be collected from the obstacle avoidance component. The obstacle avoidance component will comprehensively determine the current urgency of obstacle avoidance based on information such as vehicle speed and the distance between the vehicle and the obstacle, and calculate the current obstacle avoidance flag value. If obstacle avoidance is not required at present, the obstacle avoidance flag value defaults to 0.
[0053] Furthermore, in this embodiment of the application, the remaining tracking distance of the current trajectory can be read from the motion control component. When the intelligent parking assistance function is running, the planning component will plan a trajectory and send it to the motion control component each time the gear is shifted. The motion control component will perform trajectory tracking and calculate the remaining tracking distance of the current trajectory in real time.
[0054] The embodiments of this application can collect longitudinal acceleration values, average wheel acceleration values, gear coefficients, obstacle avoidance marker values, and the remaining tracking distance of the current trajectory. By filtering, noise interference is eliminated, the accuracy of basic parameter collection is improved, and multi-dimensional vehicle status information is integrated to generate vehicle data, thereby providing a comprehensive and accurate data foundation for subsequent working condition identification and slope calculation.
[0055] Optionally, in one embodiment of this application, calculating the vehicle's gear coefficient based on the original gear value and the original longitudinal acceleration value includes: determining the gear coefficient as a first coefficient in response to the original gear value being a forward gear; determining the gear coefficient as a second coefficient in response to the original gear value being a reverse gear; determining the gear coefficient as a second coefficient in response to the original gear value being a parking gear or neutral gear and the original longitudinal acceleration value being negative; and determining the gear coefficient as a first coefficient in response to the original gear value being a parking gear or neutral gear and the original longitudinal acceleration value being positive.
[0056] It is understood that in the embodiments of this application, the first coefficient and the second coefficient are preset numerical parameters. The first coefficient and the second coefficient are opposite values. For example, the first coefficient can be 1, corresponding to the forward direction, and the second coefficient can be -1, corresponding to the reverse direction. Forward and reverse gears are commonly used driving gears during parking, while parking gear and neutral gear are the vehicle's standby gears.
[0057] In actual implementation, this embodiment can read the original gear value from the vehicle's CAN bus and calculate the gear coefficient based on the original gear value and the original longitudinal acceleration value: if the original gear value is forward, the gear coefficient is 1; if the original gear value is reverse, the gear coefficient is -1; if the original gear value is parking or neutral and the original longitudinal acceleration value is negative, the gear coefficient value is -1; if the original gear value is parking or neutral and the original longitudinal acceleration value is positive, the gear coefficient value is 1.
[0058] For example, in this embodiment, when the original gear is forward, the system directly assigns a gear coefficient of 1, indicating that the vehicle has the intention or direction to drive forward; when the original gear is reverse, it assigns a value of -1. When the gear is in park or neutral, since the gear signal cannot provide a driving direction, this embodiment infers the direction based on the original longitudinal acceleration value: if the original longitudinal acceleration is negative, it indicates that the vehicle is sliding backward, and the equivalent driving direction is reverse, so it is assigned a value of -1; if the original longitudinal acceleration is positive, it indicates that the vehicle is sliding forward, so it is assigned a value of +1. Therefore, the correct equivalent direction coefficient can still be determined in scenarios such as rolling backward on a slope.
[0059] This application embodiment can calculate the corresponding gear coefficient based on the vehicle's gear status and the sign of longitudinal acceleration. In scenarios where gear signals such as parking or neutral cannot directly reflect the vehicle's movement trend, the actual driving direction can be determined based on the sign of the original longitudinal acceleration, and an appropriate gear coefficient can be selected for slope calculation. This avoids the problem of slope calculation accuracy when the vehicle rolls or moves unexpectedly on a slope, thereby improving the accuracy of slope calculation and adaptability to operating conditions.
[0060] Optionally, in one embodiment of this application, identifying the current operating condition of the vehicle based on vehicle data includes: determining the current operating condition of the vehicle as a predicted operating condition in response to the remaining tracking distance of the current trajectory being less than a first preset threshold; determining the current operating condition as a stationary operating condition in response to the left rear wheel speed value and the right rear wheel speed value being both preset stationary values and maintaining the preset stationary values for a duration exceeding a preset duration; determining the current operating condition of the vehicle as an obstacle avoidance operating condition in response to the obstacle avoidance flag value not being equal to a second preset threshold; and determining the current operating condition of the vehicle as a normal operating condition in response to the vehicle's current operating condition not being a predicted operating condition, a stationary operating condition, or an obstacle avoidance operating condition.
[0061] It is understood that the first preset threshold in this embodiment is a variable parameter, determined by the characteristics of the original longitudinal acceleration value collected by the vehicle inertial measurement unit. For example, the first preset threshold can be set to 0.5 meters. The first preset threshold can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here. The preset stationary value can be 0, and the preset duration can be 1 second. The preset duration cannot exceed the shift time. The preset stationary value and preset duration can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here. The second preset threshold can be 0. The obstacle avoidance flag value is related to the urgency of obstacle avoidance. If obstacle avoidance is not required at present, the obstacle avoidance flag value is 0 by default. When the obstacle avoidance flag value is not 0, it is determined that there is an obstacle interfering with the parking path. The second preset threshold can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0062] For example, in this embodiment, when the remaining tracking distance is less than a first preset threshold, the vehicle's current operating condition can be determined as a predicted operating condition. The first preset threshold is a variable parameter determined by the characteristics of the original longitudinal acceleration value collected by the vehicle's inertial measurement unit. Generally, when the remaining tracking distance is less than the first preset threshold, the original longitudinal acceleration value will oscillate violently, resulting in low reliability. If both the left wheel speed and the right rear wheel speed are 0 and remain at 0 for more than a preset duration, the vehicle is determined to be stationary, and the current operating condition is determined to be a stationary operating condition. If the obstacle avoidance flag value is not equal to 0, the vehicle's current operating condition is determined to be an obstacle avoidance operating condition. The obstacle avoidance flag value is related to the urgency of obstacle avoidance; if obstacle avoidance is not required, the obstacle avoidance flag value defaults to 0. If none of the above operating conditions apply, the vehicle's current operating condition is determined to be a normal operating condition.
[0063] The embodiments of this application can automatically divide the parking process into four types of conditions based on conditions such as the remaining trajectory distance, the duration of wheel speed stillness, and the obstacle avoidance marker value: predicted condition, stationary condition, obstacle avoidance condition, and normal condition. This allows for the matching of appropriate slope calculation strategies for each condition, preventing the direct application of conventional algorithms in unstable or special conditions from causing slope estimation distortion.
[0064] Optionally, in one embodiment of this application, matching a slope calculation command according to the current operating condition and calculating the actual slope of the road where the vehicle is located in response to the slope calculation command includes: matching a slope calculation command corresponding to the predicted operating condition in response to the current operating condition of the vehicle to calculate the actual slope based on past slope values; matching a slope calculation command corresponding to the stationary operating condition in response to the current operating condition of the vehicle to calculate the average value of longitudinal acceleration values over a preset past time period and determine the actual slope based on the average value of longitudinal acceleration values; matching a slope calculation command corresponding to the obstacle avoidance operating condition in response to the current operating condition of the vehicle to determine the vehicle's calibration parameters based on the obstacle avoidance flag value and calculate the actual slope based on the longitudinal acceleration value, calibration parameters, average wheel acceleration value, and gear coefficient; and matching a slope calculation command corresponding to the normal operating condition in response to the current operating condition of the vehicle to calculate the actual slope based on the longitudinal acceleration value, average wheel acceleration value, and gear coefficient.
[0065] It is understood that the past slope value in this embodiment can be understood as the historical slope data previously calculated by the system; the preset past time period refers to the time window used to calculate the average value, for example, set to 2 seconds. The preset past time period can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here. The calibration parameter can be understood as the compensation coefficient set for different obstacle avoidance flag values, used to correct the special dynamic characteristics in the obstacle avoidance process. The calibration parameter can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0066] For example, in the embodiments of this application, the current slope value can be predicted based on past slope values under predicted working conditions. Under predicted working conditions, since the trajectory is about to end and the dynamic state is unstable, the past slope value of the previous cycle is directly reused as the current output to achieve a smooth transition.
[0067] Under static conditions, calculate the past The average longitudinal acceleration value over a given time period is used as the current slope value. Under stationary conditions, the vehicle speed is zero, wheel acceleration is zero, and the longitudinal acceleration is entirely composed of the gravity component of the slope. A preset past time period is used as the slope value. The longitudinal acceleration sampling values within the area are averaged, with a preset past time period of 2 seconds to eliminate instantaneous measurement noise. The actual slope is then obtained through arcsine calculation.
[0068] Under obstacle avoidance conditions, set the calibration parameter 'a', and finely calibrate the value of parameter 'a' based on different obstacle avoidance marker values. The slope calculation formula is as follows: Gradient value = longitudinal acceleration value + a * average wheel acceleration value * gear coefficient.
[0069] Specifically, the obstacle avoidance flag value refers to the status identifier output by the obstacle avoidance system, used to distinguish different obstacle avoidance scenarios and urgency levels. For example, 0 indicates no obstacle avoidance, 1 indicates obstacle avoidance ahead, and 2 indicates emergency braking obstacle avoidance. This application embodiment can establish a mapping table between the obstacle avoidance flag value and the calibration parameter 'a': when the obstacle avoidance flag value is 1 (obstacle avoidance ahead), the calibration parameter 'a' can be set to 0.9; when the obstacle avoidance flag value is 2 (emergency braking obstacle avoidance), the calibration parameter 'a' can be set to 0.7. At this time, the vehicle deceleration changes drastically, and the wheel acceleration signal distortion increases. After detecting the obstacle avoidance condition, the system first reads the obstacle avoidance flag value, then looks up the corresponding calibration parameter 'a' value according to the mapping table, and finally substitutes it into the slope calculation formula: Slope value = longitudinal acceleration value + a * average wheel acceleration value * gear coefficient.
[0070] Under normal operating conditions, the formula for calculating the slope value is as follows: Gradient value = longitudinal acceleration value + average wheel acceleration value * gear coefficient.
[0071] The longitudinal acceleration value includes the superposition of the vehicle's own acceleration component and the gravity component along the slope direction, while the average wheel acceleration value reflects the actual acceleration of the vehicle relative to the ground. The difference or sum of the two (corrected by the gear coefficient) can be used to extract the gravity slope component, and then the slope value can be calculated.
[0072] Furthermore, the required slope value output for the motion control component is generated based on the gear ratio coefficient. The calculation formula is as follows: Gradient output value = Gradient value * Gear coefficient.
[0073] In particular, the embodiments of this application can be specifically adapted to the motion control components of the intelligent parking assistance function to improve the comfort of motion control.
[0074] This application embodiment can select an intelligent slope calculation strategy based on the working condition recognition result. Different slope calculation algorithms are used for predicted working conditions, static working conditions, obstacle avoidance working conditions and normal working conditions. This achieves scene adaptive optimization of slope calculation, and the calculation is simple. It can be performed on a low-computing-power vehicle computing platform and ensures real-time performance. It improves the accuracy and stability of slope calculation results in all scenarios and ensures smooth and reliable execution of torque compensation control actions based on slope data.
[0075] Specifically, it can be combined with Figure 2 As shown, the working principle of the slope calculation method of the road where the vehicle is located in the present application is explained in detail with a specific embodiment.
[0076] like Figure 2 As shown, embodiments of this application may include the following steps: Step S201: Data acquisition and processing.
[0077] In this embodiment, longitudinal acceleration value, average wheel acceleration value, gear coefficient, obstacle avoidance flag value and remaining tracking distance of the current trajectory can be collected. Specifically, the original longitudinal acceleration value and the original average wheel acceleration value are filtered separately before use.
[0078] Step S202: Determine the working condition. If it is a predicted working condition, proceed to step S203; if it is a static working condition, proceed to step S204; if it is an obstacle avoidance working condition, proceed to step S205; if it is a normal working condition, proceed to step S206.
[0079] Step S203: Calculate the slope value under the predicted working conditions.
[0080] Step S204: Calculation of slope value under static conditions.
[0081] Step S205: Calculation of slope value under obstacle avoidance conditions.
[0082] Step S206: Calculation of slope value under normal operating conditions.
[0083] Step S207: Post-processing.
[0084] In this embodiment, the slope value output value required by the motion control module can be generated according to the gear coefficient and slope value, so as to specifically adapt the motion control module of the intelligent parking assistance function and improve the comfort of motion control.
[0085] The slope calculation method for roads where vehicles are located, as proposed in this application, can collect vehicle data when the vehicle is in parking assist mode and call corresponding slope calculation logic according to different operating conditions to autonomously calculate the actual slope of the road. By adopting different calculation methods for different operating conditions, the accuracy and stability of the slope calculation value are improved, providing real-time and accurate slope information for longitudinal torque compensation, and improving the control accuracy and safety of the intelligent parking system on slopes. This solves the problems in related technologies, where slope calculation based on throttle-related driving data is only suitable for manual driving conditions and cannot be adapted to intelligent parking scenarios, while the calculation method using slope sensors has strict hardware requirements and cannot be adapted to vehicles without sensors, resulting in the vehicle control components being unable to effectively obtain slope information in slope scenarios.
[0086] Next, referring to the accompanying drawings, a slope calculation device for the road where the vehicle is located, according to an embodiment of this application, is described.
[0087] Figure 3 This is a schematic diagram of the slope calculation device for the road where the vehicle is located, according to an embodiment of this application.
[0088] like Figure 3 As shown, the slope calculation device 10 for the road where the vehicle is located includes: a data acquisition module 100, an identification module 200, and a calculation module 300.
[0089] The acquisition module 100 is used to acquire vehicle data when the vehicle is in parking assist mode.
[0090] The identification module 200 is used to identify the current operating condition of the vehicle based on vehicle data.
[0091] The calculation module 300 is used to match the slope calculation command according to the current working conditions, and in response to the slope calculation command, calculate the actual slope of the road where the vehicle is located.
[0092] Optionally, in one embodiment of this application, the acquisition module 100 includes: a first acquisition unit, a second acquisition unit, a third acquisition unit, and a fourth acquisition unit.
[0093] The first acquisition unit is used to acquire the original longitudinal acceleration value of the vehicle and filter the original longitudinal acceleration value to obtain the longitudinal acceleration value of the vehicle.
[0094] The second acquisition unit is used to acquire the wheel speed values of the left and right rear wheels of the vehicle, calculate the average wheel speed value of the vehicle based on the wheel speed values of the left and right rear wheels, calculate the original average wheel acceleration value of the vehicle based on the average wheel speed value, and filter the original average wheel acceleration value to obtain the average wheel acceleration value of the vehicle.
[0095] The third acquisition unit is used to acquire the vehicle's original gear value, so as to calculate the vehicle's gear coefficient based on the original gear value and the original longitudinal acceleration value.
[0096] The fourth data acquisition unit is used to collect the obstacle avoidance marker position values of the vehicle and the remaining tracking distance of the current trajectory; The generation unit is used to generate vehicle data based on longitudinal acceleration value, average wheel acceleration value, gear coefficient, obstacle avoidance marker position value and remaining tracking distance of the current trajectory.
[0097] Optionally, in one embodiment of this application, the third acquisition unit includes: a first determination subunit, a second determination subunit, a third determination subunit, and a fourth determination subunit.
[0098] The first determining subunit is used to determine the gear coefficient as the first coefficient in response to the original gear value being forward gear.
[0099] The second determining subunit is used to determine the gear coefficient as the second coefficient in response to the original gear value being reverse gear.
[0100] The third determining subunit is used to determine the gear coefficient value as the second coefficient in response to the original gear value being either parking or neutral and the original longitudinal acceleration value being negative.
[0101] The fourth determining subunit is used to determine the gear coefficient value as the first coefficient in response to the original gear value being either parking or neutral and the original longitudinal acceleration value being positive.
[0102] Optionally, in one embodiment of this application, the identification module 200 includes: a first determining unit, a second determining unit, a third determining unit, and a fourth determining unit.
[0103] The first determining unit is used to determine the current operating condition of the vehicle as the predicted operating condition in response to the remaining tracking distance of the current trajectory being less than a first preset threshold.
[0104] The second determining unit is used to determine that the current working condition is a static working condition in response to the fact that both the left rear wheel speed value and the right rear wheel speed value are preset static values and the duration of maintaining the preset static values exceeds a preset duration.
[0105] The third determining unit is used to determine that the current operating condition of the vehicle is an obstacle avoidance condition in response to the obstacle avoidance flag value not being equal to the second preset threshold.
[0106] The fourth determining unit is used to determine that the current operating condition of the vehicle is a normal operating condition in response to the fact that the current operating condition of the vehicle is not a predicted operating condition, a stationary operating condition, or an obstacle avoidance operating condition.
[0107] Optionally, in one embodiment of this application, the calculation module 300 includes: a first calculation unit, a second calculation unit, a third calculation unit, and a fourth calculation unit.
[0108] The first calculation unit is used to respond to the vehicle's current operating condition as a predicted operating condition, match the slope calculation instruction corresponding to the predicted operating condition, and calculate the actual slope based on past slope values.
[0109] The second calculation unit is used to respond to the current working condition of the vehicle being stationary, match the slope calculation command corresponding to the stationary working condition, calculate the average value of the longitudinal acceleration value in a preset past time period, and determine the actual slope based on the average value of the longitudinal acceleration value.
[0110] The third calculation unit is used to respond to the vehicle's current working condition as obstacle avoidance condition, match the slope calculation command corresponding to the obstacle avoidance condition, determine the vehicle's calibration parameters based on the obstacle avoidance marker position value, and calculate the actual slope based on the longitudinal acceleration value, calibration parameters, average wheel acceleration value and gear coefficient.
[0111] The fourth calculation unit is used to respond to the vehicle's current operating condition being normal operating condition, match the slope calculation command corresponding to normal operating condition, and calculate the actual slope based on the longitudinal acceleration value, the average wheel acceleration value, and the gear coefficient.
[0112] It should be noted that the explanation of the above-described method for calculating the slope of the road where the vehicle is located also applies to the slope calculation device of the road where the vehicle is located in this embodiment, and will not be repeated here.
[0113] The slope calculation device for the road surface where the vehicle is located, as proposed in the embodiments of this application, can collect vehicle data when the vehicle is in parking assist mode and call corresponding slope calculation logic according to different working conditions to autonomously calculate the actual slope of the road. By adopting different calculation methods for different working conditions, the accuracy and stability of the slope calculation value are improved, providing real-time and accurate slope information for longitudinal torque compensation, and improving the control accuracy and safety of the intelligent parking system on slopes. This solves the problems in related technologies, where slope calculation based on throttle-related driving data is only suitable for manual driving conditions and cannot be adapted to intelligent parking scenarios, while the calculation method using slope sensors has strict hardware requirements and cannot be adapted to vehicles without sensors, resulting in the vehicle control components being unable to effectively obtain slope information in slope scenarios.
[0114] Figure 4 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include: The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.
[0115] When the processor 402 executes the program, it implements the slope calculation method for the road where the vehicle is located provided in the above embodiments.
[0116] Furthermore, the vehicle also includes: Communication interface 403 is used for communication between memory 401 and processor 402.
[0117] The memory 401 is used to store computer programs that can run on the processor 402.
[0118] Memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0119] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized into address buses, data buses, control buses, etc. For ease of representation, Figure 4The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0120] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0121] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0122] This application also provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for calculating the slope of the road where the vehicle is located.
[0123] This application also provides a computer program product storing a computer program that, when executed by a processor, implements the above-described method for calculating the slope of the road where the vehicle is located.
[0124] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0125] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0126] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0127] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0128] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0129] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0130] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0131] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for calculating the slope of a road where a vehicle is located, characterized in that, Includes the following steps: When the vehicle is in parking assist mode, vehicle data of the vehicle is collected; The current operating condition of the vehicle is identified based on the vehicle data; Based on the current operating conditions, a slope calculation command is matched, and in response to the slope calculation command, the actual slope of the road where the vehicle is located is calculated.
2. The method according to claim 1, characterized in that, The collection of vehicle data includes: The original longitudinal acceleration value of the vehicle is collected and filtered to obtain the longitudinal acceleration value of the vehicle. The left rear wheel speed value and the right rear wheel speed value of the vehicle are collected. The average wheel speed value of the vehicle is calculated based on the left rear wheel speed value and the right rear wheel speed value. The original average wheel acceleration value of the vehicle is calculated based on the average wheel speed value. The original average wheel acceleration value is filtered to obtain the average wheel acceleration value of the vehicle. The original gear position value of the vehicle is collected, and the gear coefficient of the vehicle is calculated based on the original gear position value and the original longitudinal acceleration value. Collect the obstacle avoidance marker position value and the remaining tracking distance of the current trajectory of the vehicle; The vehicle data is generated based on the longitudinal acceleration value, the average wheel acceleration value, the gear coefficient, the obstacle avoidance marker value, and the remaining tracking distance of the current trajectory.
3. The method according to claim 2, characterized in that, The step of calculating the vehicle's gear coefficient based on the original gear value and the original longitudinal acceleration value includes: In response to the original gear value being a forward gear, the gear coefficient is determined to be a first coefficient; In response to the original gear value being reverse gear, the gear coefficient is determined to be a second coefficient; In response to the original gear value being either parking or neutral, and the original longitudinal acceleration value being negative, the gear coefficient value is determined to be the second coefficient; In response to the original gear value being either parking or neutral, and the original longitudinal acceleration value being positive, the gear coefficient value is determined to be the first coefficient.
4. The method according to claim 2, characterized in that, The step of identifying the current operating condition of the vehicle based on the vehicle data includes: In response to the remaining tracking distance of the current trajectory being less than a first preset threshold, the current operating condition of the vehicle is determined to be the predicted operating condition; In response to the fact that both the left rear wheel speed value and the right rear wheel speed value are preset static values, and the duration of maintaining the preset static values exceeds a preset duration, the current working condition is determined to be a static working condition. In response to the obstacle avoidance flag value not being equal to the second preset threshold, the current operating condition of the vehicle is determined to be an obstacle avoidance condition. In response to the fact that the current operating condition of the vehicle is not the predicted operating condition, the stationary operating condition, or the obstacle avoidance operating condition, the current operating condition of the vehicle is determined to be the normal operating condition.
5. The method according to claim 4, characterized in that, The step of matching a slope calculation command based on the current operating conditions and, in response to the slope calculation command, calculating the actual slope of the road where the vehicle is located includes: In response to the vehicle's current operating condition being the predicted operating condition, the slope calculation instruction corresponding to the predicted operating condition is matched to calculate the actual slope based on past slope values; In response to the vehicle's current operating condition being a stationary condition, the slope calculation command corresponding to the stationary condition is matched to calculate the average value of the longitudinal acceleration value over a preset past time period, and the actual slope is determined based on the average value of the longitudinal acceleration value. In response to the current operating condition of the vehicle being the obstacle avoidance condition, the slope calculation command corresponding to the obstacle avoidance condition is matched to determine the calibration parameters of the vehicle based on the obstacle avoidance flag value, and the actual slope is calculated based on the longitudinal acceleration value, the calibration parameters, the average wheel acceleration value and the gear coefficient. In response to the vehicle's current operating condition being the normal operating condition, the slope calculation command corresponding to the normal operating condition is matched to calculate the actual slope based on the longitudinal acceleration value, the average wheel acceleration value, and the gear coefficient.
6. A device for calculating the slope of a road where a vehicle is located, characterized in that, include: The data acquisition module is used to collect vehicle data when the vehicle is in parking assist mode; The identification module is used to identify the current operating condition of the vehicle based on the vehicle data; The calculation module is used to match the slope calculation command according to the current working condition, and in response to the slope calculation command, calculate the actual slope of the road where the vehicle is located.
7. The apparatus according to claim 6, characterized in that, The acquisition module includes: The first acquisition unit is used to acquire the original longitudinal acceleration value of the vehicle and filter the original longitudinal acceleration value to obtain the longitudinal acceleration value of the vehicle. The second acquisition unit is used to acquire the wheel speed values of the left rear wheel and the right rear wheel of the vehicle, to calculate the average wheel speed value of the vehicle based on the wheel speed values of the left rear wheel and the right rear wheel, to calculate the original average wheel acceleration value of the vehicle based on the average wheel speed value, and to filter the original average wheel acceleration value to obtain the average wheel acceleration value of the vehicle. The third acquisition unit is used to acquire the original gear value of the vehicle, so as to calculate the gear coefficient of the vehicle based on the original gear value and the original longitudinal acceleration value. The fourth acquisition unit is used to acquire the obstacle avoidance marker position value and the remaining tracking distance of the current trajectory of the vehicle; The generation unit is used to generate the vehicle data based on the longitudinal acceleration value, the average wheel acceleration value, the gear coefficient, the obstacle avoidance marker value, and the remaining tracking distance of the current trajectory.
8. A vehicle, characterized in that, include: The memory, the processor, and the computer program stored in the memory and capable of running on the processor, the processor executing the program to implement the method for calculating the slope of the road where the vehicle is located as described in any one of claims 1-5.
9. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method for calculating the slope of the road where the vehicle is located as described in any one of claims 1-5.
10. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the method for calculating the slope of the road where the vehicle is located as described in any one of claims 1-5.