OBD message analysis and attitude rendering method and system based on vehicle dynamics model

By using an OBD message parsing and attitude rendering method based on vehicle dynamics models, the accuracy and stability issues of OBD message attitude estimation under complex working conditions are solved, achieving high-precision, low-latency vehicle attitude estimation and 3D rendering, and reducing system cost and complexity.

CN121441671APending Publication Date: 2026-01-30CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511542248.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing technologies that rely on OBD messages for vehicle attitude estimation suffer from poor accuracy, low robustness, large latency, and easy divergence under complex working conditions. In particular, they cannot meet the requirements for stability and real-time performance under conditions such as rapid acceleration, sudden braking, low-adhesion road surfaces, slopes, and bumpy roads.

Method used

Based on the vehicle dynamics model, CAN or CAN-FD bus messages are received through the OBD interface, vehicle operating parameters are parsed, a unified time base is established, a 15-DOF vehicle dynamics model is constructed, the predicted state and observation data are fused using a nonlinear filter, and the data is mapped to the OBD observable space through the observation function. Gating processing is performed by combining Mahalanobis distance and amplitude threshold to compensate for system delay and adjust the observation noise matrix.

Benefits of technology

It provides continuous and stable attitude estimation output under complex working conditions, with accuracy close to that of IMU/GNSS fusion solutions. This reduces system cost and deployment complexity, suppresses abnormal data interference, and ensures long-term operational stability and smooth 3D rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121441671A_ABST
    Figure CN121441671A_ABST
Patent Text Reader

Abstract

The invention provides an OBD message analysis and attitude rendering method and system based on a vehicle dynamics model, and belongs to the field of vehicle electronics and control. The method comprises the steps that a message is analyzed through an OBD interface, and vehicle operation parameters are obtained; establishing a unified time base and carrying out resampling and synchronous processing on the data of each channel; constructing a fifteen-degree-of-freedom vehicle dynamics model comprising a vehicle body six-degree-of-freedom pose, a vehicle body angular velocity, a four-wheel rotation angular velocity and unsprung mass vertical displacement for state prediction; designing an observation function to map a model state to an OBD observation space, and adopting an observability enhancement strategy; predicting and observing data are fused by using a nonlinear filter, and abnormal observation gating is carried out based on a mahalanobis distance and an amplitude threshold value; compensating system time delay and adaptively adjusting observation noise; and performing three-dimensional real-time rendering on the attitude information. According to the method, high-precision and high-robustness vehicle attitude estimation can be realized only by depending on the OBD message, and the system cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of vehicle electronics and control technology, and particularly relates to an OBD message analysis and attitude rendering method and system based on a vehicle dynamics model. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.

[0003] Vehicle attitude information is a key input for advanced driver assistance systems (ADAS), autonomous driving, and vehicle dynamic monitoring functions. Currently, the main technical solutions for obtaining vehicle attitude in the industry can be divided into the following two categories: The first type of solution relies on additional expensive sensors such as inertial measurement units (IMU), global navigation satellite systems (GNSS), and vehicle-mounted wheel speed signals for multi-source information fusion. This type of solution can provide high-precision attitude estimation in good signal and regular road conditions. The second type of solution attempts to use only the CAN or CAN-FD bus messages provided by the vehicle OBD (On-Board Diagnostics) system to calculate the attitude. This type of solution usually uses empirical filtering algorithms to directly process the analyzed vehicle speed, wheel speed, steering angle, and other signals without increasing hardware costs.

[0004] However, the above-mentioned existing technologies have obvious limitations. The first type of solution, although high in precision, relies on external sensors such as IMU / GNSS, which not only increases hardware costs and installation complexity, but also causes GNSS signals to be easily lost and IMU readings to be easily drifted in tunnel, viaduct, or strong magnetic interference environments, resulting in invalidation or sharp decline in precision of the fusion results.

[0005] The second type of solution relies only on OBD data, but lacks an accurate vehicle dynamics model as a physical constraint. In strong nonlinear and low-observable conditions such as sudden acceleration, sudden braking, low adhesion road surfaces (such as ice and snow, rain), bumps, or slopes, simple empirical filtering can easily cause state estimation divergence, oscillation, or significant lag, which cannot meet the stability and real-time requirements of engineering applications.

[0006] In addition, due to the inconsistent periods, jitter, and timestamp precision of messages from different vehicle ECUs, there is a possibility of late frames, repeated frames, and signal jumps in the network. Moreover, most solutions ignore the six-degree-of-freedom motion characteristics of vehicles and the coupling relationship of the tire-suspension-drive system, resulting in the amplification of state estimation bias, making it difficult to adapt to complex driving conditions. Existing OBD solutions also lack unified time base management and robust data synchronization and gating mechanisms, and direct fusion of asynchronous data can easily introduce errors. SUMMARY

[0007] To overcome the above prior art deficiencies, the application provides an OBD message analysis and attitude rendering method and system based on a vehicle dynamics model, which is used to solve the problems of poor precision, low robustness, large delay and easy divergence in complex working conditions when only relying on OBD messages for vehicle attitude estimation.

[0008] To achieve the above object, one or more embodiments of the application provide the following technical solutions: The application provides an OBD message analysis and attitude rendering method based on a vehicle dynamics model in the first aspect; The OBD message analysis and attitude rendering method based on a vehicle dynamics model comprises: CAN or CAN-FD bus messages are received through a vehicle OBD interface, and vehicle operating parameters are parsed according to a pre-set DBC description file; a unified time base is established based on a local clock, the parsed vehicle operating parameters are resampled and synchronized, and a discrete-time observation vector and an input vector are constructed; A fifteen-degree-of-freedom vehicle dynamics model is constructed, state prediction is performed based on the vehicle dynamics model, the model state is mapped to the OBD observable space through an observation function, and state estimation is constrained using an observability enhancement strategy; a nonlinear filter is used to fuse the predicted state and the observation data, and abnormal observations are gated based on Mahalanobis distance and amplitude threshold; The time delay introduced by the system communication and processing link is compensated, and the observation noise matrix is adjusted online and adaptively based on the innovation sequence; The processed attitude and motion state information is sent to the host computer for three-dimensional real-time rendering, and the vehicle attitude information is output.

[0009] As a further technical solution, CAN or CAN-FD bus messages are received through a vehicle OBD interface, and vehicle operating parameters are parsed according to a pre-set DBC description file, which comprises: The vehicle CAN or CAN-FD bus is accessed through the vehicle OBD-II interface, and the bus transceiver is used to receive the message data transmitted by the bus; The pre-set vehicle DBC description file is called, the signal ID, start bit, length, scaling factor and offset defined in the description file are used to decode the received message data, and four-wheel speed, steering angle, body axis acceleration, brake signal, drive torque, vehicle speed and gear data are extracted.

[0010] As a further technical solution, a unified time base is established based on a local clock, the parsed vehicle operating parameters are resampled and synchronized, and a discrete-time observation vector and an input vector are constructed, which comprises: A fixed sampling period is set based on the built-in local real-time clock, and a discrete unified time sequence is generated; For each vehicle operation parameter channel obtained by analysis, according to the correspondence between the original sampling time and the uniform time sequence, linear interpolation is used to map the non-uniform original data of each parameter channel to the uniform time sequence, so as to realize time base synchronization of multiple parameter channels; In each uniform time sequence, the four-wheel speed, steering angle, body axis acceleration, brake signal, driving torque, vehicle speed and gear position after synchronization processing are combined in a predetermined order to form a discrete-time observation vector; the front wheel steering angle, driving torque, brake signal, gear position and vehicle operation mode after synchronization processing are combined in a predetermined order to form a discrete-time input vector.

[0011] As a further technical solution, a fifteen-degree-of-freedom vehicle dynamics model is constructed, and state prediction is performed based on the vehicle dynamics model, including: A vehicle dynamics model is constructed, which includes six-degree-of-freedom pose of the vehicle body, three-dimensional angular velocity of the vehicle body, four-degree-of-freedom rotation of the four wheels, and four-degree-of-freedom vertical motion of the unsprung mass. Based on the constructed vehicle dynamics model, a model state equation is established according to the linear momentum balance of the vehicle body, the angular momentum balance, the wheel rotation and the vertical motion relationship of the unsprung mass; The filtered state at the previous discrete time and the corresponding input vector are used as inputs, and the prior state at the current time is calculated through the discretized state equation; The Jacobian matrix of the state equation at is calculated, and the state prediction based on the vehicle dynamics model is completed by combining the posterior covariance matrix at the previous time and the process noise covariance matrix.

[0012] As a further technical solution, the model state is mapped to the OBD observable space through the observation function, and the state estimation is constrained by using an observability enhancement strategy, including: An observation function is introduced, as shown below:

[0013] Wherein, is the state vector of the fifteen-degree-of-freedom vehicle dynamics model; is the observation noise; The model state is mapped to the OBD observable space through the observation function, and the specific mapping relationship includes: multiplying the wheel rotation angular velocity in the model by the tire equivalent radius to map it to the OBD observable four-wheel speed; using the coupling relationship of the vehicle body mass center linear velocity, angular velocity and attitude angle in the model, combined with the gravity acceleration component, to map it to the OBD observable body axis acceleration; based on the wheel rotation state in the model and the transmission system characteristics, to map it to the OBD observable vehicle speed; Based on the above mapping, the observation vector predicted by the model is generated Wherein for model state prediction value; Utilize the consistency relationship between the wheel speed and the vehicle speed obtained by the model mapping to construct a constraint condition to optimize the longitudinal speed of the vehicle body The estimation accuracy of the body axis lateral acceleration The lateral acceleration-vehicle body side slip coupling in the model enhances the observability, and the observation weight is adaptively adjusted according to different driving conditions.

[0014] As a further technical solution, a nonlinear filter is used to fuse the predicted state and the observation data, and the abnormal observation is gated based on the Mahalanobis distance and the amplitude threshold, including: An extended Kalman filter is used as the core nonlinear filter, the observation Jacobian matrix is calculated based on the prior state and the prior covariance matrix of the fifteen-degree-of-freedom vehicle dynamics model, and the observation function is combined; The innovation covariance matrix is solved by the formula, and the Kalman gain is calculated; The state update is completed by using the deviation of the actual observation vector and the model predicted observation vector, and the posterior state and the posterior covariance matrix are obtained; For each discrete time observation vector, the Mahalanobis distance between the observation vector and the predicted observation vector is calculated first; when the Mahalanobis distance exceeds the statistical threshold determined based on the chi-square distribution, or any parameter component exceeds the corresponding amplitude threshold, the observation is determined to be abnormal; the abnormal observation is down-weighted, only the normal observation is retained to participate in the state update process of the filter, and the interference of abnormal data on state estimation is suppressed.

[0015] As a further technical solution, the time delay introduced by the communication and processing link of the system is compensated, and the observation noise matrix is adaptively adjusted online based on the innovation sequence, including: The total time delay of the communication and processing link composed of OBD message transmission, data analysis, model calculation and upper computer rendering in the measurement system; Based on the state transition characteristics of the fifteen-degree-of-freedom vehicle dynamics model, a state propagation matrix is constructed, the prior state is extrapolated by using the state propagation matrix, and the compensated prior state is obtained, and the time delay introduced by the communication and processing link of the system is compensated by updating the prior covariance matrix, so that the phase lag of state estimation caused by the time delay is eliminated; The observation innovation sequence of the nonlinear filter output is calculated; the observation noise matrix is updated according to the second-order statistical characteristics of the innovation sequence; The calculation result is amplitude-limited, and the exponential moving average algorithm is used to smooth the update result, so that the observation noise matrix is dynamically matched with the actual working condition.

[0016] The second aspect of the present application provides an OBD message analysis and attitude rendering system based on a vehicle dynamics model; An OBD message parsing and attitude rendering system based on vehicle dynamics models includes: The vehicle operating parameter acquisition module is configured to: receive CAN or CAN-FD bus messages through the vehicle OBD interface and parse the vehicle operating parameters according to the preset DBC description file; establish a unified time base based on the local clock, resample and synchronize the parsed vehicle operating parameters, and construct discrete-time observation vectors and input vectors. The state prediction and gating module is configured to: construct a 15-DOF vehicle dynamics model, perform state prediction based on the vehicle dynamics model, map the model state to the OBD observable space through an observation function, constrain the state estimation using an observability enhancement strategy, fuse the predicted state and observation data using a nonlinear filter, and perform gating processing on abnormal observations based on Mahalanobis distance and amplitude threshold. The delay compensation and noise adaptation module is configured to compensate for the delay introduced by the system communication and processing links, and to adaptively adjust the observation noise matrix online based on the innovative sequence. The output management module is configured to send the processed attitude and motion state information to the host computer for real-time 3D rendering and output the vehicle attitude information.

[0017] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the OBD message parsing and attitude rendering method based on a vehicle dynamics model as described in the first aspect of the present invention.

[0018] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the OBD message parsing and attitude rendering method based on a vehicle dynamics model as described in the first aspect of the present invention.

[0019] The above one or more technical solutions have the following beneficial effects: This invention, based on standard OBD interface data in vehicles, effectively overcomes the inherent shortcomings of traditional pure OBD solutions—such as lack of physical constraints and susceptibility to divergence under nonlinear conditions—by introducing a high-precision 15-DOF vehicle dynamics model as a process prior. Even under complex conditions such as rapid acceleration, deceleration, low-adhesion road surfaces, slopes, and bumpy roads, it can still provide continuous, stable, and drift-free attitude estimation output, with accuracy approaching that of IMU / GNSS-based fusion solutions, but significantly reducing system cost and deployment complexity.

[0020] The application can effectively inhibit the interference of abnormal data such as CAN network delay, message loss, repetition and jump on the estimation process, avoid the divergence and collapse of the filter, and ensure the long-term running stability of the system in the real vehicle network environment, by unifying the time base and the channel independent resampling mechanism, the joint gating strategy based on Mahalanobis distance and amplitude threshold, and the online adaptive adjustment of the observation noise matrix.

[0021] The application effectively shortens the algorithm processing period by adopting the efficient multi-thread architecture, sparse matrix operation and fixed time delay compensation extrapolation technology, and the end-to-end transmission and processing time delay is effectively compensated. Combined with the first-order smoothing filter at the output end, the attitude data finally transmitted to the host computer has the characteristics of low delay and low jitter, ensuring the smoothness, natural feeling and immersive user experience of three-dimensional visualization rendering.

[0022] The advantages of the additional aspects of the application will be partially given in the following description, partially become obvious from the following description, or be known by the practice of the application. BRIEF DESCRIPTION OF DRAWINGS

[0023] The accompanying drawings, which form a part of the present description, are included to provide further understanding of the application, and are incorporated in and constitute a part of the application. The schematic embodiments of the application and their descriptions are used to explain the application, and do not constitute an improper limitation on the application.

[0024] Figure 1 The method flowchart of the first embodiment.

[0025] Figure 2 The system structure diagram of the second embodiment. DETAILED DESCRIPTION

[0026] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the application. Unless otherwise indicated, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the application belongs.

[0027] It should be noted that the terms used herein are only for the purpose of describing the specific embodiments, and are not intended to limit the exemplary embodiments according to the application.

[0028] The embodiments in the application and the features in the embodiments can be combined with each other without conflict.

[0029] Embodiment one The application discloses an OBD message analysis and attitude rendering method based on a vehicle dynamics model. As shown in Figure 1 The OBD message analysis and attitude rendering method based on the vehicle dynamics model comprises: Step S101: Receive CAN or CAN-FD bus messages through the vehicle OBD interface and parse the vehicle operating parameters according to the preset DBC description file; establish a unified time base based on the local clock, resample and synchronize the parsed vehicle operating parameters, and construct discrete-time observation vectors and input vectors. Step S102: Construct a 15-DOF vehicle dynamics model, perform state prediction based on the vehicle dynamics model, and map the model state to the OBD observable space through the observation function. Use the observability enhancement strategy to constrain the state estimation. Use a nonlinear filter to fuse the predicted state and observation data, and perform gating processing on abnormal observations based on Mahalanobis distance and amplitude threshold. Step S103: Compensate for the delay introduced by the system communication and processing links, and adaptively adjust the observation noise matrix online based on the innovative sequence; Step S104: The processed attitude and motion state information is sent to the host computer for real-time 3D rendering, and the vehicle attitude information is output.

[0030] Specifically, it also includes the following: Step S101: Receive CAN or CAN-FD bus messages through the vehicle OBD interface and parse the vehicle operating parameters according to the preset DBC description file; establish a unified time base based on the local clock, resample and synchronize the parsed vehicle operating parameters, and construct discrete-time observation vectors and input vectors.

[0031] In step S101, the vehicle CAN or CAN-FD bus is connected through the vehicle OBD-II interface, and the bus transceiver is used to receive the message data transmitted by the bus. By calling the preset vehicle model DBC description file, the received message data is decoded according to the signal ID, start bit, length, scaling factor and offset defined in the description file, and the four wheel speeds, steering angle, body axle acceleration, braking signal, driving torque, vehicle speed and gear data are extracted.

[0032] The acquired vehicle operating parameters are also preprocessed, including: unifying and correcting the unit, positive, zero point and gravity components; using three-point median and first-order limiting to process wheel speed glitch and tooth jump; performing gravity compensation and low-frequency line drift correction on the body axis acceleration and defining the positive direction of acceleration; and implementing online zero-point drift correction on the steering angle to avoid long-term integral offset.

[0033] Furthermore, a fixed sampling period is set based on the built-in local real-time clock. Generate discrete unified time series :

[0034] wherein, is the starting time, is a non-negative integer discrete index.

[0035] For each vehicle operation parameter channel parsed, according to the correspondence between the original sampling time and the uniform time sequence , respectively, using linear interpolation or zero-order hold algorithm, the non-uniform original data of each parameter channel is mapped to the uniform time sequence , realizing the time base synchronization of multiple parameter channels; according to the timestamp, the repeated frames are processed for de-duplication, and the abnormal parameter values of jump or out-of-bound are marked and temporarily stored; At each uniform time sequence , the measurable parameters such as four-wheel speed, body axis acceleration and vehicle speed after synchronization processing are combined in a predetermined order to form a discrete-time observation vector .

[0036] wherein, is the four-wheel speed; is the steering angle; is the body axis acceleration; is the brake signal; is the driving torque, is the vehicle speed and gear data, is the transpose; The front wheel steering angle, driving torque, brake signal, gear and vehicle operation mode after synchronization processing are combined in a predetermined order to form a discrete-time input vector .

[0037]

[0038] wherein, is the front wheel steering angle; is the gear; is the vehicle operation mode; Step S102, a fifteen-degree-of-freedom vehicle dynamics model is constructed, state prediction is carried out based on the vehicle dynamics model, model state is mapped to OBD observable space through an observation function, and state estimation is constrained by using an observability enhancement strategy; a nonlinear filter is used to fuse the predicted state and observation data, and abnormal observation is processed by gate according to Mahalanobis distance and amplitude threshold.

[0039] A vehicle dynamics model is constructed, which includes six-degree-of-freedom pose of the vehicle body, three-dimensional angular velocity of the vehicle body, four-degree-of-freedom of four-wheel rotation, and four-degree-of-freedom of vertical non-sprung mass, and the state vector is defined as:

[0040] wherein, This represents the position of the vehicle's center of mass in a ground-fixed coordinate system. These are the ZYX Euler angles of the vehicle body, namely the yaw angle, pitch angle, and roll angle. These are the angular velocities of the vehicle body around the X, Y, and Z axes, respectively. These are the rotational angular velocities of the left front, right front, left rear, and right rear wheels, respectively. These represent the vertical displacements of the unsprung masses at the left front, right front, left rear, and right rear, respectively.

[0041] The model's state equations are established based on the relationship between the vehicle body's linear momentum balance, angular momentum balance, wheel rotation, and the vertical motion of the unsprung mass.

[0042] The momentum balance equation for the vehicle body line is:

[0043]

[0044]

[0045] in, , , These are the longitudinal resultant force, the lateral resultant force, and the vertical resultant force, respectively. , , These are the longitudinal velocity, lateral velocity, and vertical velocity, respectively.

[0046] The equation for the balance of angular momentum of the vehicle body is:

[0047]

[0048]

[0049] in, , , These are the principal moments of inertia of the vehicle about the x, y, and z axes at its center of mass; , , These are the resultant external torques acting on the vehicle body about the x, y, and z axes, respectively.

[0050] The equation for wheel rotation is:

[0051] in, Let be the equivalent moment of inertia of the i-th wheel; This is the net driving torque acting at the center of the i-th wheel; The longitudinal tire force of the i-th wheel; Let be the loss torque in the i-th round.

[0052] The equation of motion for the unsprung mass vertically is:

[0053] in, Unsprung mass; This is the non-sprung vertical displacement; Let be the equivalent stiffness of the suspension at position i; This refers to the vertical displacement of the spring load. This refers to the suspension damping coefficient; Let be the tire-road normal force for the i-th round.

[0054] Based on the momentum balance of the vehicle body lines, angular momentum balance, wheel rotation, and the vertical motion relationship of the unsprung mass, the model's state equation is established as follows:

[0055] in, Let k be the system state vector at discrete time k; This is process noise.

[0056] Using the 15-DOF vehicle dynamics model constructed above, at the previous discrete time... Filtered state and corresponding input vector As input, the prior state at time k is calculated using the discretized state equation; simultaneously, the state equation is calculated in... The Jacobian matrix at a given time step, combined with the posterior covariance matrix from the previous time step and the process noise covariance matrix, is used to complete the state prediction based on the vehicle dynamics model. Specifically: Let the continuous model be: The above moments are posterior. and Starting from this point, discretization yields the prior state:

[0057] in, It consists of the equations of linear momentum, angular momentum, wheel rotation, and unsprung vertical load.

[0058] Through Find the Jacobian matrix to obtain the state transition Jacobian matrix:

[0059] in, Let be the state transition Jacobian matrix.

[0060] based on The posterior covariance matrix of the model at time k , combining process noise covariance matrix , the model prior covariance matrix at k+1 time is calculated by formula ; wherein, is the model prior covariance matrix at k+1 time, is the transpose matrix of . Through the above process, the state prediction based on the fifteen-degree-of-freedom vehicle dynamics model is completed, and the model prior state and prior covariance matrix at k+1 time are output, which provide prior information for subsequent observation fusion and state update.

[0061] The observation function is designed as , wherein is the observation noise, and the state parameters of the model are mapped to the OBD measurable parameter space; The model state is mapped to the OBD observable space through the observation function, and the specific mapping relationship includes: the wheel rotational angular velocity in the model is multiplied by the tire equivalent radius R to be mapped to the OBD observable four-wheel speed; the coupling relationship of the body mass center linear velocity , , the angular velocity and the attitude angle in the model is used to map to the OBD observable body axis acceleration , ; based on the wheel rotational state in the model and the transmission system characteristics, the OBD observable vehicle speed is mapped; the observation vector predicted by the model is generated, wherein is the model state prediction value; The consistency relationship between the wheel speed and the vehicle speed obtained by the model mapping is used to construct a constraint condition to optimize the estimation accuracy of the body longitudinal velocity ; the body axis lateral acceleration and the observability of the yaw-roll coupling enhancement and in the model are used to adaptively adjust the observation weight for different driving conditions. Specifically, in the low-speed large-angle turning condition, the steering angle observation weight is increased and the acceleration observation weight is weakened, and the geometric and steering constraints are preferentially relied on; in the bump or slope condition, the non-sprung mass vertical displacement observation weight is increased to strengthen the constraint on the pitch angle; based on the deviation between the model prediction observation vector and the actual observation vector , the posterior state and the posterior covariance matrix are obtained through Kalman filtering update, so as to realize effective constraint on the state estimation.

[0062] ​The extended Kalman filter (EKF) is used as the core nonlinear filter, based on the prior states of the 15-DOF vehicle dynamics model. and prior covariance matrix The observation Jacobian matrix is ​​calculated by combining the observation function. Through formula Solve the innovation covariance matrix and based on Calculate Kalman gain ; using actual observation vectors With model-predicted observation vectors deviation ,pass and Complete the state update and obtain the posterior state. and posterior covariance matrix When the linearization error exceeds the limit, it automatically switches to unscented Kalman filtering, which generates 2n+1 sigma points (n is the state dimension) to propagate the state distribution and achieve nonlinear fusion of the predicted state and the observed data. The observation vector at each discrete time k First, calculate its relationship with the predicted observation vector. Mahal distance Meanwhile, targeting Each parameter component (such as wheel speed, acceleration, and steering angle) is assigned an amplitude threshold. When the Mahalanobis distance exceeds the statistical threshold determined based on the chi-square distribution, or when any parameter component exceeds the corresponding amplitude threshold, the observation is determined to be an abnormal observation. Abnormal observations are downweighted or masked, and only normal observations are retained to participate in the state update process of the filter, thus suppressing the interference of abnormal data on state estimation.

[0063] Step S103: Compensate for the delay introduced by the system communication and processing link, and adjust the observation noise matrix online adaptively based on the innovative sequence; when the observation data is abnormal or missing, adopt the order reduction or state freezing mechanism to maintain the estimation, and smooth the attitude information of the final output.

[0064] The total latency of the communication and processing links in the measurement system, consisting of OBD message transmission, data parsing, model calculation, and host computer rendering. Based on the state transition characteristics of the 15-DOF vehicle dynamics model, a state propagation matrix is ​​constructed. This matrix is ​​obtained by applying the state equation to the predicted state. The Jacobian matrix at the given location is obtained by exponential operation; before the nonlinear filter performs state update, the state propagation matrix is ​​used. For prior states Extrapolation is performed to obtain the compensated prior state. Meanwhile, the prior covariance matrix is updated to compensate for the time delay introduced by the communication and processing link of the system, and to eliminate the phase lag of state estimation caused by the time delay. Meanwhile, the prior covariance matrix is updated to compensate for the time delay introduced by the communication and processing link of the system, and to eliminate the phase lag of state estimation caused by the time delay.

[0065] The observation innovation sequence of the nonlinear filter output is calculated , wherein is an actual observation vector, is an observation function; according to the second-order statistical characteristics of the innovation sequence, the observation noise matrix is updated online by formula , wherein is an adaptive step, is an observation noise matrix at a previous moment, is an observation Jacobian matrix, represents taking diagonal elements to form a diagonal matrix; the calculation result of is subjected to amplitude limiting processing, and an exponential moving average algorithm is used for smooth updating of the result, so as to avoid that the observation noise matrix is subjected to severe fluctuation caused by instantaneous abnormal innovation values, and to realize dynamic matching of the observation noise matrix and actual working conditions.

[0066] In step S104, the processed attitude and motion state information are sent to the upper computer for three-dimensional real-time rendering, and vehicle attitude information is output.

[0067] From the state after fusion, compensation and other processing, the body attitude angle, angular velocity and key motion speed are selected and integrated into a standardized data frame with a time stamp and a health degree index. A transmission link between the vehicle end and the upper computer is established through a Bluetooth or USB module, and the data frame is sent at a frequency of 50-100 Hz according to a preset protocol. Meanwhile, the data and logs are locally backed up. A vehicle 3D model is loaded and the coordinate system is calibrated, a data and model parameter mapping is established, the model is updated in attitude and position by using a rendering engine to drive the model to update the attitude and position, and the trajectory is rendered. The vehicle model, trajectory, parameter curve and health degree are displayed in different regions of the interface, and recording, playback and other operations are supported.

[0068] Embodiment Two The embodiment discloses an OBD message analysis and attitude rendering system based on a vehicle dynamics model; As shown in Figure 2 , the OBD message analysis and attitude rendering system based on the vehicle dynamics model comprises: A vehicle operating parameter acquisition module is configured to receive CAN or CAN-FD bus messages through a vehicle OBD interface, and parse vehicle operating parameters according to a preset DBC description file; a unified time base is established based on a local clock, and the parsed vehicle operating parameters are resampled and synchronized to construct discrete-time observation vectors and input vectors; ​The state prediction and gating processing module is configured to: construct a 15-degree-of-freedom vehicle dynamics model, perform state prediction based on the vehicle dynamics model, and map model states to an OBD observable space through an observation function, and constrain state estimation by using an observability enhancement strategy; adopt a nonlinear filter to fuse predicted states and observation data, and perform gating processing on abnormal observations based on Mahalanobis distance and amplitude threshold values. The time delay compensation and noise adaptive module is configured to: compensate for time delays introduced by system communication and processing links, and adaptively adjust an observation noise matrix online based on innovation sequences. The output management module is configured to: send processed attitude and motion state information to an upper computer for three-dimensional real-time rendering, and output vehicle attitude information.

[0069] Embodiment three The purpose of this embodiment is to provide a computer-readable storage medium.

[0070] A computer-readable storage medium has a computer program stored thereon, which, when executed by a processor, implements the steps in the OBD message analysis and attitude rendering method based on a vehicle dynamics model as described in Embodiment 1.

[0071] Embodiment four The purpose of this embodiment is to provide an electronic device.

[0072] An electronic device includes a memory, a processor, and a program stored on the memory and executable on the processor, and the processor implements the steps in the OBD message analysis and attitude rendering method based on a vehicle dynamics model as described in Embodiment 1 when executing the program.

[0073] The steps and methods involved in the devices of Embodiments Two, Three, and Four above correspond to Embodiment One, and the specific embodiments can be referred to the relevant description part of Embodiment One. The term "computer-readable storage medium" should be understood to include a single medium or multiple media of one or more instruction sets; it should also be understood to include any medium that can store, encode, or carry instruction sets for execution by a processor and cause the processor to perform any of the methods in the present application.

[0074] Those skilled in the art should understand that the above-mentioned modules or steps of the present application can be realized by a general computer device, alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device for execution by a computing device, or they can be made into individual integrated circuit modules, or a plurality of modules or steps among them can be made into a single integrated circuit module. The present application is not limited to any specific combination of hardware and software.

[0075] The above describes the specific embodiments of the present application in combination with the drawings, but is not a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.

Claims

1. A method for OBD message analysis and pose rendering based on vehicle dynamics model, characterized in that, The application comprises the following steps: Receiving CAN or CAN-FD bus messages through the vehicle OBD interface, and parsing the vehicle operating parameters according to the preset DBC description file; Based on the local clock, a unified time base is established, and the parsed vehicle operating parameters are resampled and synchronized to construct discrete-time observation vectors and input vectors; A fifteen-degree-of-freedom vehicle dynamics model is constructed, and state prediction is performed based on the vehicle dynamics model, and the model state is mapped to the OBD observable space through the observation function, and the state estimation is constrained by the observability enhancement strategy; a nonlinear filter is used to fuse the predicted state and the observation data, and the abnormal observation is gated based on the Mahalanobis distance and the amplitude threshold; The time delay introduced by the system communication and processing link is compensated, and the observation noise matrix is adjusted online based on the innovation sequence; The processed attitude and motion state information is sent to the host computer for three-dimensional real-time rendering, and the vehicle attitude information is output.

2. The OBD message parsing and pose rendering method based on vehicle dynamics model according to claim 1, characterized in that, The application comprises the following steps: Accessing the vehicle CAN or CAN-FD bus through the vehicle OBD-II interface, and receiving the message data transmitted by the bus through the bus transceiver; Calling the preset vehicle DBC description file, decoding the received message data according to the signal ID, start bit, length, scaling factor and offset defined in the description file, and extracting four-wheel speed, steering angle, body axis acceleration, brake signal, drive torque, vehicle speed and gear data.

3. The OBD message parsing and pose rendering method based on vehicle dynamics model according to claim 1, characterized in that, Based on the local clock, a unified time base is established, and the parsed vehicle operating parameters are resampled and synchronized to construct discrete-time observation vectors and input vectors, including: Taking the built-in local real-time clock as the reference, a fixed sampling period is set to generate a discrete unified time sequence; According to the correspondence between the original sampling time and the unified time sequence, the non-uniform original data of each parameter channel is mapped to the unified time sequence by linear interpolation, and the time base synchronization of multiple parameter channels is realized; At each unified time sequence, the synchronized four-wheel speed, steering angle, body axis acceleration, brake signal, drive torque, vehicle speed and gear are combined in a predetermined order to form a discrete-time observation vector; the synchronized front wheel steering angle, drive torque, brake signal, gear and vehicle operating mode are combined in a predetermined order to form a discrete-time input vector.

4. The OBD message parsing and pose rendering method based on vehicle dynamics model according to claim 1, characterized in that, A fifteen-degree-of-freedom vehicle dynamics model is constructed, and state prediction is performed based on the vehicle dynamics model, including: A vehicle dynamics model is constructed, which includes six-degree-of-freedom pose of the vehicle body, three-dimensional angular velocity of the vehicle body, four-degree-of-freedom rotation of the four wheels, and four-degree-of-freedom vertical motion of the unsprung mass; Based on the constructed vehicle dynamics model, the model state equation is established according to the vehicle body linear momentum balance, angular momentum balance, wheel rotation and unsprung mass vertical motion relationship; The filtered state at the previous discrete time and the corresponding input vector are used as inputs to calculate the prior state at the current time through the discretized state equation; The Jacobian matrix of the state equation at the time point is calculated, combined with the posterior covariance matrix and the process noise covariance matrix at the previous time point, to complete the state prediction based on the vehicle dynamics model.

5. The OBD message parsing and pose rendering method based on vehicle dynamics model according to claim 1, characterized in that, The model state is mapped to the OBD observable space by the observation function, and the state estimation is constrained by the observability enhancement strategy, including: An observation function is introduced, as shown below: wherein, is the state vector of the fifteen degrees of freedom vehicle dynamics model; is the observation noise; The model state is mapped to the OBD observable space by the observation function, and the specific mapping relationship includes: multiplying the wheel rotational angular velocity in the model by the tire equivalent radius to map it to the OBD observable four-wheel speed; using the coupling relationship between the body mass center linear velocity, angular velocity and attitude angle in the model, combined with the gravity acceleration component, to map it to the OBD observable body axis acceleration; based on the wheel rotational state in the model and the transmission system characteristics, mapping to the OBD observable vehicle speed; an observation vector predicted based on the mapping generating model wherein is a model state prediction value; The consistency relationship between the wheel speed and the vehicle speed obtained by the model is used to construct a constraint condition to optimize the estimation accuracy of the body longitudinal velocity; the body axis lateral acceleration is enhanced in observability by the yaw-sideslip coupling in the model, and the observation weight is adjusted adaptively for different driving conditions.

6. The OBD message parsing and pose rendering method based on vehicle dynamics model according to claim 1, characterized in that, A nonlinear filter is used to fuse the predicted state and the observation data, and the abnormal observation is gated based on the Mahalanobis distance and the amplitude threshold, including: An extended Kalman filter is used as the core nonlinear filter, and the observation Jacobian matrix is calculated based on the prior state and the prior covariance matrix of the fifteen-degree-of-freedom vehicle dynamics model, combined with the observation function; The innovation covariance matrix is solved by the formula, and the Kalman gain is calculated according to the formula; The deviation between the actual observation vector and the model predicted observation vector is used to complete the state update, and the posterior state and the posterior covariance matrix are obtained; For each discrete time observation vector, first calculate its Mahalanobis distance with the predicted observation vector; when the Mahalanobis distance exceeds the statistical threshold determined based on the chi-square distribution, or any parameter component exceeds the corresponding amplitude threshold, the observation is determined to be abnormal; the abnormal observation is down-weighted, only the normal observation is retained to participate in the state update process of the filter, and the interference of abnormal data on state estimation is suppressed.

7. The OBD message parsing and pose rendering method based on vehicle dynamics model according to claim 1, characterized in that, The time delay introduced by the communication and processing link of the system is compensated, and the observation noise matrix is adjusted online based on the innovation sequence, including: The total time delay of the communication and processing link composed of OBD message transmission, data analysis, model calculation and host computer rendering in the measurement system is measured; Based on the state transition characteristics of the fifteen-degree-of-freedom vehicle dynamics model, a state propagation matrix is constructed, the prior state is extrapolated using the state propagation matrix to obtain the compensated prior state, and the prior covariance matrix is updated to compensate for the time delay introduced by the communication and processing link of the system, and to eliminate the phase lag of state estimation caused by the time delay; The observation innovation sequence of the nonlinear filter output is calculated; the observation noise matrix is updated according to the second-order statistical characteristics of the innovation sequence; The calculation result is limited in amplitude, and the exponential moving average algorithm is used to smooth the update result, so as to realize the dynamic matching of the observation noise matrix with the actual working condition.

8. An OBD message parsing and pose rendering system based on vehicle dynamics model, characterized in that: including: The vehicle operation parameter acquisition module is configured to receive CAN or CAN-FD bus messages through a vehicle OBD interface, and parse vehicle operation parameters according to a preset DBC description file; a unified time base is established based on a local clock, the parsed vehicle operation parameters are resampled and synchronized, and a discrete-time observation vector and an input vector are constructed; The state prediction and gating processing module is configured to construct a fifteen-degree-of-freedom vehicle dynamics model, perform state prediction based on the vehicle dynamics model, map the model state to an OBD observable space through an observation function, and constrain state estimation by using an observability enhancement strategy; a nonlinear filter is used to fuse the predicted state and the observation data, and abnormal observations are gated based on Mahalanobis distance and amplitude threshold; The time delay compensation and noise adaptive module is configured to compensate for the time delay introduced by the system communication and processing link, and adaptively adjust the observation noise matrix based on the innovation sequence online; The output management module is configured to send the processed attitude and motion state information to an upper computer for three-dimensional real-time rendering, and output vehicle attitude information.

9. A computer-readable storage medium having stored thereon a program, characterized in that, The program is executed by the processor to implement the steps in the OBD message parsing and attitude rendering method based on a vehicle dynamics model according to any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps in the OBD message parsing and attitude rendering method based on a vehicle dynamics model according to any one of claims 1-7.

Citation Information

Cited By

  • Vehicle-oriented asynchronous multi-mode continuous space-time occupancy state modeling method and system

    CN122135329A

  • A vehicle-oriented asynchronous multi-modal continuous spatio-temporal occupancy state modeling method and system

    CN122135329B